Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
natthab opened this issue Jul 7, 2022 · 5 comments

Comments

@natthab
Copy link

natthab commented Jul 7, 2022

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!

@cyang-kth
Copy link
Owner

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

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

@stanleyshly
Copy link

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

@timminata
Copy link

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

@Mchristos
Copy link

Mchristos commented May 30, 2023

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!

@Ianc98
Copy link

Ianc98 commented Jul 31, 2023

darktable-org/darktable#13376 (comment)

This solution works for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants