Xgboost: pip install xgboost fails on macOS with gcc 7

Created on 29 Aug 2017  路  1Comment  路  Source: dmlc/xgboost

For bugs or installation issues, please provide the following information.
The more information you provide, the more easily we will be able to offer
help and advice.

Environment info

Operating System:
MacOS 10.12.6
Compiler:

I used brew install gcc --without-multilib
Successfully install but I got following warning
Warning: gcc: this formula has no --without-multilib option so it will be ignored!

>brew info gcc
gcc: stable 7.2.0 (bottled), HEAD
GNU compiler collection
https://gcc.gnu.org/
/usr/local/Cellar/gcc/7.2.0 (1,487 files, 284MB) *

Package used (python/R/jvm/C++):
2.7.9

xgboost version used:
0.6a2

If installing from source, please provide

  1. The commit hash (git rev-parse HEAD)
  2. Logs will be helpful (If logs are large, please upload as attachment).

If you are using jvm package, please

  1. add [jvm-packages] in the title to make it quickly be identified
  2. the gcc version and distribution

If you are using python package, please provide

  1. The python version and distribution
    brew, python 2.7.9

  2. The command to install xgboost if you are not installing from source
    pip install xgboost

If you are using R package, please provide

  1. The R sessionInfo()
  2. The command to install xgboost if you are not installing from source

Steps to reproduce

  1. brew install gcc --without-multilib
    However I got following warning
    Warning: gcc: this formula has no --without-multilib option so it will be ignored!

  2. pip install xgboost

> pip install xgboost
Collecting xgboost
  Using cached xgboost-0.6a2.tar.gz
    Complete output from command python setup.py egg_info:
    rm -f -rf build build_plugin lib bin *~ */*~ */*/*~ */*/*/*~ */*.o */*/*.o */*/*/*.o xgboost
    clang-omp++ -std=c++0x -Wall -O3 -msse2  -Wno-unknown-pragmas -funroll-loops -Iinclude   -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/learner.o src/learner.cc >build/learner.d
    /bin/sh: clang-omp++: command not found
    make: *** [build/learner.o] Error 127
    make: *** Waiting for unfinished jobs....
    clang-omp++ -std=c++0x -Wall -O3 -msse2  -Wno-unknown-pragmas -funroll-loops -Iinclude   -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/logging.o src/logging.cc >build/logging.d
    /bin/sh: clang-omp++: command not found
    make: *** [build/logging.o] Error 127
    -----------------------------
    Building multi-thread xgboost failed
    Start to build single-thread xgboost
    rm -f -rf build build_plugin lib bin *~ */*~ */*/*~ */*/*/*~ */*.o */*/*.o */*/*/*.o xgboost
    clang-omp++ -std=c++0x -Wall -O3 -msse2  -Wno-unknown-pragmas -funroll-loops -Iinclude   -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/learner.o src/learner.cc >build/learner.d
    /bin/sh: clang-omp++: command not found
    make: *** [build/learner.o] Error 127
    make: *** Waiting for unfinished jobs....
    clang-omp++ -std=c++0x -Wall -O3 -msse2  -Wno-unknown-pragmas -funroll-loops -Iinclude   -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/logging.o src/logging.cc >build/logging.d
    /bin/sh: clang-omp++: command not found
    make: *** [build/logging.o] Error 127
    Successfully build single-thread xgboost
    If you want multi-threaded version
    See additional instructions in doc/build.md
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/yc/mh8578l534x93z2jp1sw54kr0000gp/T/pip-build-mHYzY6/xgboost/setup.py", line 29, in <module>
        LIB_PATH = libpath['find_lib_path']()
      File "/private/var/folders/yc/mh8578l534x93z2jp1sw54kr0000gp/T/pip-build-mHYzY6/xgboost/xgboost/libpath.py", line 45, in find_lib_path
        'List of candidates:\n' + ('\n'.join(dll_path)))
    __builtin__.XGBoostLibraryNotFound: Cannot find XGBoost Libarary in the candicate path, did you install compilers and run build.sh in root path?
    List of candidates:
    /private/var/folders/yc/mh8578l534x93z2jp1sw54kr0000gp/T/pip-build-mHYzY6/xgboost/xgboost/libxgboost.so
    /private/var/folders/yc/mh8578l534x93z2jp1sw54kr0000gp/T/pip-build-mHYzY6/xgboost/xgboost/../../lib/libxgboost.so
    /private/var/folders/yc/mh8578l534x93z2jp1sw54kr0000gp/T/pip-build-mHYzY6/xgboost/xgboost/./lib/libxgboost.so

What have you tried?

  1. tried compiling from the code version v0.60 and got same error
  2. https://github.com/dmlc/xgboost/issues/1728 and few other related bugs

Most helpful comment

I was able to make it work with gcc5 but not with 6 or 7

brew install gcc@5
env CC=gcc CXX=gcc pip install xgboost

>All comments

I was able to make it work with gcc5 but not with 6 or 7

brew install gcc@5
env CC=gcc CXX=gcc pip install xgboost
Was this page helpful?
0 / 5 - 0 ratings

Related issues

uasthana15 picture uasthana15  路  4Comments

wenbo5565 picture wenbo5565  路  3Comments

nicoJiang picture nicoJiang  路  4Comments

pplonski picture pplonski  路  3Comments

vkuznet picture vkuznet  路  3Comments