- Thank you received: 0
Apple Silicon
3 years 3 months ago #3915
by alex.v
Replied by alex.v on topic Apple Silicon
I have had time to get back to this. The currently prebuilt .dmg is currently built for python3.8, but I am using python3.9 so instead I am trying to build from source.
I have cloned the ngsolve repo into /Users/alex/Documents/GitHub/ngsolve/ngsolve-source, and then am running the following code, one line at a time.
I get the following error "ld: in '/opt/homebrew/opt/llvm/lib/libunwind.dylib', building for macOS-x86_64 but attempting to link with file built for macOS-arm64" in "/Users/alex/Documents/GitHub/ngsolve/ngsolve-build/netgen/dependencies/src/project_tkdnd-stamp/project_tkdnd-build-err.log".
I have tried it without the "-DUSE_NATIVE_ARCH=ON", same issue.
Any help on what I should do to fix this?
I have cloned the ngsolve repo into /Users/alex/Documents/GitHub/ngsolve/ngsolve-source, and then am running the following code, one line at a time.
I get the following error "ld: in '/opt/homebrew/opt/llvm/lib/libunwind.dylib', building for macOS-x86_64 but attempting to link with file built for macOS-arm64" in "/Users/alex/Documents/GitHub/ngsolve/ngsolve-build/netgen/dependencies/src/project_tkdnd-stamp/project_tkdnd-build-err.log".
I have tried it without the "-DUSE_NATIVE_ARCH=ON", same issue.
Any help on what I should do to fix this?
Code:
export NGROOT=/Users/alex/Documents/GitHub/ngsolve
mkdir $NGROOT/ngsolve-build
cd $NGROOT/ngsolve-build
cmake $NGROOT/ngsolve-src -DPYTHON_INCLUDE_DIR=$(python3 -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())") -DPYTHON_LIBRARY=$(python3 -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR')+'/libpython3.9.dylib')") -DUSE_NATIVE_ARCH=ON
make -j 8
make install
export PYTHONPATH=$PYTHONPATH:/Applications/Netgen.app/Contents/Resources/lib/python3.9/site-packages:.
export NETGENDIR=/Applications/Netgen.app/Contents/MacOS
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$NETGENDIR
export DYLD_FRAMEWORK_PATH=$DYLD_FRAMEWORK_PATH:$NETGENDIR/../Frameworks
export PATH=$NETGENDIR:$PATH
3 years 3 months ago - 3 years 3 months ago #3917
by matthiash
Replied by matthiash on topic Apple Silicon
Hi Alex,
could you attach ngsolve-buid/netgen/CMakeCache.txt ?
I suspect that you are mixing compilers here for some reason ("ld: in '/opt/homebrew/opt/llvm/lib/libunwind.dylib', why not using the system toolchain?)
Best,
Matthias
could you attach ngsolve-buid/netgen/CMakeCache.txt ?
I suspect that you are mixing compilers here for some reason ("ld: in '/opt/homebrew/opt/llvm/lib/libunwind.dylib', why not using the system toolchain?)
Best,
Matthias
Last edit: 3 years 3 months ago by matthiash.
3 years 3 months ago #3918
by alex.v
Replied by alex.v on topic Apple Silicon
Hi Matthias,
I am not sure why it used ld form /opt/homebrew. If I run
I get
I have attached CMakeCache.txt.
Alex
I am not sure why it used ld form /opt/homebrew. If I run
Code:
which ld
Code:
/usr/bin/ld
I have attached CMakeCache.txt.
Alex
Attachments:
Time to create page: 0.112 seconds