You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using Clang compiler with OSX on Apple M1 chip, after building PyNomad successfully, when importing PyNomad in Python
import PyNomad
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: dlopen(/Users/christophe/.local/lib/python3.9/site-packages/PyNomad.cpython-39-darwin.so, 0x0002): symbol not found in flat namespace '__ZN9NOMAD_4_210Parameters17_typeOfAttributesE'
or
ImportError: dlopen(xxxx/PyNomad.cpython-39-darwin.so, 0x0002) ....
(mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64'))
This issue can be resolved by forcing the architecture to X86_64 when configuring the cmake build with a flag like -DCMAKE_OSX_ARCHITECTURES=x86_64. This is required when Python binaries for the API are x86_64. This can be tested with the command file. For example,
In this case, the nomad binaries must all be x86_64, which is not the default when building with Clang.
It is important, to remove the build directory and the PyNomad.cpython-39-darwin.so in
$NOMAD_HOME/interfaces/PyNomad to make sure all PyNomad binaries are deleted before building again.
The text was updated successfully, but these errors were encountered:
When using Clang compiler with OSX on Apple M1 chip, after building PyNomad successfully, when importing PyNomad in Python
or
This issue can be resolved by forcing the architecture to X86_64 when configuring the cmake build with a flag like
-DCMAKE_OSX_ARCHITECTURES=x86_64
. This is required when Python binaries for the API are x86_64. This can be tested with the commandfile
. For example,In this case, the nomad binaries must all be x86_64, which is not the default when building with Clang.
It is important, to remove the build directory and the PyNomad.cpython-39-darwin.so in
$NOMAD_HOME/interfaces/PyNomad to make sure all PyNomad binaries are deleted before building again.
The text was updated successfully, but these errors were encountered: