Forum Message

 

 

We have moved the forum to https://forum.ngsolve.org . This is an archived version of the topics until 05/05/23. All the topics were moved to the new forum and conversations can be continued there. This forum is just kept as legacy to not invalidate old links. If you want to continue a conversation just look for the topic in the new forum.

Notice

The forum is in read only mode.

Building NGSolve on M1 Mac

More
2 years 5 months ago #4080 by alex.v
I am trying to install NGSolve from source on my M1 Mac, for arm rather than intel. I am doing this since I am working with python 3.9, but the distributed executable is only available for python 3.8.

My install script is:
Code:
export NGROOT=/Users/alex/Documents/GitHub/ngsolve mkdir $NGROOT/ngsolve-build cd $NGROOT/ngsolve-build cmake $NGROOT/ngsolve-src -DPYTHON_LIBRARY=$(python3 -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR')+'/libpython3.9.dylib')") -DPYTHON_INCLUDE_DIR=$(python3 -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())") make make install

The cmake command returns:
Code:
Configure Netgen from submodule... ... -- Found Pybind11: /Users/alex/Documents/GitHub/ngsolve/ngsolve-src/external_dependencies/netgen/external_dependencies/pybind11/include -- Found PythonInterp: /opt/homebrew/bin/python3 (found suitable version "3.9.8", minimum required is "3") -- Found PythonLibs: /opt/homebrew/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/lib/libpython3.9.dylib (found suitable version "3.9.8", minimum required is "3")

So it seems to have found python correctly. However, when I run make, I get the following error:
Code:
Install the project... -- Install configuration: "" -- Installing: /Applications/Netgen.app/Contents/MacOS/tkdnd2.8/libtkdnd2.8.dylib -- Installing: /Applications/Netgen.app/Contents/MacOS/tkdnd2.8/pkgIndex.tcl -- Up-to-date: /Applications/Netgen.app/Contents/MacOS/tkdnd2.8/tkdnd.tcl -- Up-to-date: /Applications/Netgen.app/Contents/MacOS/tkdnd2.8/tkdnd_generic.tcl -- Up-to-date: /Applications/Netgen.app/Contents/MacOS/tkdnd2.8/tkdnd_compat.tcl -- Up-to-date: /Applications/Netgen.app/Contents/MacOS/tkdnd2.8/tkdnd_macosx.tcl -- Up-to-date: /Applications/Netgen.app/Contents/MacOS/tkdnd2.8/tkdnd_unix.tcl -- Up-to-date: /Applications/Netgen.app/Contents/MacOS/tkdnd2.8/tkdnd_windows.tcl [ 70%] Completed 'project_tkdnd' [ 70%] Built target project_tkdnd [ 73%] Creating directories for 'netgen' [ 76%] No download step for 'netgen' [ 79%] No update step for 'netgen' [ 82%] No patch step for 'netgen' [ 85%] Performing configure step for 'netgen' -- The C compiler identification is AppleClang 13.0.0.13000029 -- The CXX compiler identification is AppleClang 13.0.0.13000029 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found Git: /usr/bin/git (found version "2.30.1 (Apple Git-130)") -- Found PythonInterp: /opt/homebrew/bin/python3 (found suitable version "3.9.8", minimum required is "3") CMake Error at /opt/homebrew/Cellar/cmake/3.21.4/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Could NOT find PythonLibs (missing: PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS) (Required is at least version "3") Call Stack (most recent call first): /opt/homebrew/Cellar/cmake/3.21.4/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE) /opt/homebrew/Cellar/cmake/3.21.4/share/cmake/Modules/FindPythonLibs.cmake:310 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) CMakeLists.txt:126 (find_package) -- Configuring incomplete, errors occurred! See also "/Users/alex/Documents/GitHub/ngsolve/ngsolve-build/netgen/netgen/CMakeFiles/CMakeOutput.log". See also "/Users/alex/Documents/GitHub/ngsolve/ngsolve-build/netgen/netgen/CMakeFiles/CMakeError.log". make[5]: *** [dependencies/src/netgen-stamp/netgen-configure] Error 1 make[4]: *** [CMakeFiles/netgen.dir/all] Error 2 make[3]: *** [all] Error 2 make[2]: *** [dependencies/src/netgen_project-stamp/netgen_project-build] Error 2 make[1]: *** [CMakeFiles/netgen_project.dir/all] Error 2 make: *** [all] Error 2

Any idea of what's going wrong?
Time to create page: 0.144 seconds