5

While installing LightGBM on Mac OS, I got the following error:

CMake Error at /usr/local/Cellar/cmake/3.12.4/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find OpenMP_C (missing: OpenMP_C_FLAGS OpenMP_C_LIB_NAMES)
Call Stack (most recent call first): 
  /usr/local/Cellar/cmake/3.12.4/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  /usr/local/Cellar/cmake/3.12.4/share/cmake/Modules/FindOpenMP.cmake:466 (find_package_handle_standard_args)
  CMakeLists.txt:82 (find_package)

enter image description here

I am following the official manual, the error comes at cmake .. step:

enter image description here

Thank you for your help if you can help me.

Tsyvarev
  • 60,011
  • 17
  • 110
  • 153
big bai
  • 61
  • 1
  • 4
  • The error message is about missing OpenMP support. Are you sure that you have performed step `brew install libomp`? – Tsyvarev Nov 16 '18 at 12:39
  • Yes ,I'm sure done it ! but I still fail ! I try to solve the problem by the information ——'OpenMP_C' – big bai Nov 18 '18 at 11:02
  • My ability is limited, don't know how to solve the 'OpenMP_C' problem. – big bai Nov 18 '18 at 11:04
  • Please, add the error message into the question post as **text**, not as image. It is a requirement of the Stack Overflow. – Tsyvarev Nov 18 '18 at 17:15
  • CMake Error at /usr/local/Cellar/cmake/3.12.4/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:137 (message): Could NOT find OpenMP_C (missing: OpenMP_C_FLAGS OpenMP_C_LIB_NAMES) Call Stack (most recent call first): /usr/local/Cellar/cmake/3.12.4/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE) /usr/local/Cellar/cmake/3.12.4/share/cmake/Modules/FindOpenMP.cmake:466 (find_package_handle_standard_args) CMakeLists.txt:82 (find_package) – big bai Nov 19 '18 at 02:58
  • this is the information . I'm sorry I didn't do it before. – big bai Nov 19 '18 at 02:59
  • 1
    I am having a similar issue, please let me know if you figure out how to fix this. – Harrison W. Nov 21 '18 at 18:23

1 Answers1

4

The solution from the Darts installation guide worked for me. You need to downgrade the libomp library:

wget https://raw.githubusercontent.com/Homebrew/homebrew-core/fb8323f2b170bd4ae97e1bac9bf3e2983af3fdb0/Formula/libomp.rb
brew unlink libomp
brew install libomp.rb
janmonko
  • 121
  • 1
  • 4