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

Missing -lgomp when installing #3

Closed
wzchen opened this issue May 17, 2014 · 5 comments
Closed

Missing -lgomp when installing #3

wzchen opened this issue May 17, 2014 · 5 comments

Comments

@wzchen
Copy link

wzchen commented May 17, 2014

I get the following output when I try to run make in the python directory. Do you know what may be wrong?

Williams-MacBook-Air:python william$ make
g++ -Wall -O3 -msse2  -Wno-unknown-pragmas -fopenmp -fPIC -pthread -lm  -shared -o libxgboostpy.so xgboost_python.cpp
In file included from xgboost_python.cpp:3:
In file included from ./../regrank/xgboost_regrank.h:12:
In file included from ./../regrank/xgboost_regrank_eval.h:13:
./../regrank/../utils/xgboost_omp.h:13:2: warning: "OpenMP is not available, compile to single thread code" [-W#warnings]
#warning "OpenMP is not available, compile to single thread code"
 ^
1 warning generated.
ld: library not found for -lgomp
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [libxgboostpy.so] Error 1
@antinucleon
Copy link
Contributor

You need to install OpenMP library before build XGBoost. You can search in Google to find how to install OpenMP on MacOSX

@tqchen
Copy link
Member

tqchen commented May 17, 2014

This is because your compiler does not support OpenMP. While the linker tries to link OpenMP -_-

@tqchen
Copy link
Member

tqchen commented May 17, 2014

This seems due to the fact that the compiler is not configured correctly(otherwise -fopenmp will be ignored), one way is to use single thread mode, remove -fopenmp in the Makefile, this will give you a single thread version of xgboost. Or you can try to install OpenMP

@tqchen
Copy link
Member

tqchen commented May 17, 2014

Maybe we should add instructions to the wiki

@tqchen tqchen reopened this May 17, 2014
@tqchen tqchen closed this as completed May 17, 2014
@wzchen
Copy link
Author

wzchen commented May 17, 2014

@tqchen thank you! removing the -fopenmp flag worked. I will try to install OpenMP later.

terrytangyuan pushed a commit that referenced this issue Nov 10, 2015
Getting latest version from dmlc
tqchen added a commit that referenced this issue Mar 11, 2016
adjust the API signature as well as the docs
headupinclouds added a commit to headupinclouds/xgboost that referenced this issue Oct 5, 2016
Rturn value in {GBLinear,GBTree}::DumpModel() even on assert(false)
hcho3 pushed a commit to hcho3/xgboost that referenced this issue May 9, 2018
Bugfix: libdmlc.a compiling error: fp not define
@lock lock bot locked as resolved and limited conversation to collaborators Oct 27, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants