ld: library not found for -lomp

后端 未结 3 1339
不知归路
不知归路 2021-01-06 08:17

In macOS Sierra, installation for xgboost with openmp enabled always fails.

From https://xgboost.readthedocs.io/en/latest/build.html,

I\'ve trie

相关标签:
3条回答
  • 2021-01-06 08:52

    In my case I used a version of clang that came with Homebrew's llvm instead of the one that came with the Laptop from the factory, and it worked.

    0 讨论(0)
  • 2021-01-06 09:08

    In my case I solved adding the following linker flag in addition to -lomp:

    -Lpath_to_libomp.dylib_folder

    or something like:

    -Llib/

    0 讨论(0)
  • 2021-01-06 09:10

    SOLVED

    cd /usr/local/lib
    ln -s /usr/local/Cellar/llvm/4.0.0_1/lib/libomp.dylib libomp.dylib
    

    llvm installation miss its symbolic link.

    0 讨论(0)
提交回复
热议问题