fmm icon indicating copy to clipboard operation
fmm copied to clipboard

Cannot install FMM on mac M1 2020 : Could NOT find OpenMP_C (missing: OpenMP_C_FLAGS OpenMP_C_LIB_NAMES)

Open natthab opened this issue 1 year ago • 5 comments

I am installing FMM on mac M1 2020 which I followed the instructions for mac (https://fmm-wiki.github.io/docs/installation/mac.html). However, at the step of the command line "cmake ..", I got an error

CMake Error at /Applications/CMake.app/Contents/share/cmake-3.23/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Could NOT find OpenMP_C (missing: OpenMP_C_FLAGS OpenMP_C_LIB_NAMES) Call Stack (most recent call first): /Applications/CMake.app/Contents/share/cmake-3.23/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE) /Applications/CMake.app/Contents/share/cmake-3.23/Modules/FindOpenMP.cmake:545 (find_package_handle_standard_args) CMakeLists.txt:68 (find_package)

Should I update or install any packages before cmake step ?

Thank You!

natthab avatar Jul 07 '22 15:07 natthab

Perhaps there is some problem with the compiler. You can check some online resources

https://stackoverflow.com/questions/46414660/macos-cmake-and-openmp

cyang-kth avatar Jul 08 '22 07:07 cyang-kth

Same thing, the mac and linux install instructions don't work at all for me.

stanleyshly avatar Jan 21 '23 06:01 stanleyshly

We also ran into this issue. Seems quite tricky to get it installed on Mac. Works well in Ubuntu WSL.

timminata avatar May 15 '23 10:05 timminata

I overcame the OpenMP error by setting the following env variables (from this SO)[https://stackoverflow.com/questions/48825416/missing-openmp-c-flags-openmp-c-lib-names]:

export CC=/usr/local/opt/llvm/bin/clang
export CXX=/usr/local/opt/llvm/bin/clang++
export LDFLAGS="-L/usr/local/opt/llvm/lib"
export CPPFLAGS="-I/usr/local/opt/llvm/include"

I also had to install the following:

brew install llvm 
brew install swig 

Using python3.10 the cmake .. step succeeds. I'm now stuck on the make -j4 step with unhelpful errors. I know nothing about C++ which doesn't help!

Mchristos avatar May 30 '23 10:05 Mchristos

https://github.com/darktable-org/darktable/issues/13376#issuecomment-1397038135

This solution works for me

Ianc98 avatar Jul 31 '23 03:07 Ianc98