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

pip install fails when install 0.90, gcc-7, macOS 10.15 #4925

Closed
zerobeanny opened this issue Oct 9, 2019 · 2 comments
Closed

pip install fails when install 0.90, gcc-7, macOS 10.15 #4925

zerobeanny opened this issue Oct 9, 2019 · 2 comments

Comments

@zerobeanny
Copy link

zerobeanny commented Oct 9, 2019

++ pwd

  • oldpath=/Users/zerobeanny/Downloads/xgboost-0.90
  • cd ./xgboost/
  • echo darwin19
  • grep -q darwin
  • LIB_XGBOOST=libxgboost.dylib
  • which g++-5
  • which g++-7
    /usr/local/bin/g++-7
  • export CC=gcc-7
  • CC=gcc-7
  • export CXX=g++-7
  • CXX=g++-7
  • make clean
    Makefile:31: MAKE [/Library/Developer/CommandLineTools/usr/bin/make] - checked OK
    rm -f -rf build build_plugin lib bin *~ /~ //*~ ///~ /.o //.o ///*.o #xgboost
    rm -f -rf build_tests *.gcov tests/cpp/xgboost_test
    if [ -d "R-package/src" ]; then
    cd R-package/src;
    rm -f -rf rabit src include dmlc-core amalgamation *.so *.dll;
    cd /Users/zerobeanny/Downloads/xgboost-0.90/xgboost;
    fi
  • make lib/libxgboost.dylib -j4
    Makefile:31: MAKE [/Library/Developer/CommandLineTools/usr/bin/make] - checked OK
    g++-7 -DDMLC_LOG_CUSTOMIZE=1 -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude -Idmlc-core/include -Irabit/include -I/include -O3 -funroll-loops -msse2 -fPIC -fopenmp -MM -MT build/learner.o src/learner.cc >build/learner.d
    g++-7 -DDMLC_LOG_CUSTOMIZE=1 -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude -Idmlc-core/include -Irabit/include -I/include -O3 -funroll-loops -msse2 -fPIC -fopenmp -MM -MT build/logging.o src/logging.cc >build/logging.d
    g++-7 -DDMLC_LOG_CUSTOMIZE=1 -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude -Idmlc-core/include -Irabit/include -I/include -O3 -funroll-loops -msse2 -fPIC -fopenmp -MM -MT build/c_api/c_api.o src/c_api/c_api.cc >build/c_api/c_api.d
    g++-7 -DDMLC_LOG_CUSTOMIZE=1 -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude -Idmlc-core/include -Irabit/include -I/include -O3 -funroll-loops -msse2 -fPIC -fopenmp -MM -MT build/c_api/c_api_error.o src/c_api/c_api_error.cc >build/c_api/c_api_error.d
    g++-7 -c -DDMLC_LOG_CUSTOMIZE=1 -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude -Idmlc-core/include -Irabit/include -I/include -O3 -funroll-loops -msse2 -fPIC -fopenmp src/c_api/c_api_error.cc -o build/c_api/c_api_error.o
    In file included from /usr/local/Cellar/gcc/7.2.0/include/c++/7.2.0/bits/postypes.h:40:0,
    from /usr/local/Cellar/gcc/7.2.0/include/c++/7.2.0/bits/char_traits.h:40,
    from /usr/local/Cellar/gcc/7.2.0/include/c++/7.2.0/string:40,
    from /usr/local/Cellar/gcc/7.2.0/include/c++/7.2.0/stdexcept:39,
    from /usr/local/Cellar/gcc/7.2.0/include/c++/7.2.0/array:39,
    from /usr/local/Cellar/gcc/7.2.0/include/c++/7.2.0/tuple:39,
    from /usr/local/Cellar/gcc/7.2.0/include/c++/7.2.0/mutex:38,
    from dmlc-core/include/dmlc/thread_local.h:9,
    from src/c_api/c_api_error.cc:6:
    /usr/local/Cellar/gcc/7.2.0/include/c++/7.2.0/cwchar:44:10: fatal error: wchar.h: No such file or directory
    #include <wchar.h>
    ^~~~~~~~~
    compilation terminated.
    make: *** [build/c_api/c_api_error.o] Error 1
    make: *** Waiting for unfinished jobs....
    g++-7 -c -DDMLC_LOG_CUSTOMIZE=1 -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude -Idmlc-core/include -Irabit/include -I/include -O3 -funroll-loops -msse2 -fPIC -fopenmp src/logging.cc -o build/logging.o
    g++-7 -c -DDMLC_LOG_CUSTOMIZE=1 -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude -Idmlc-core/include -Irabit/include -I/include -O3 -funroll-loops -msse2 -fPIC -fopenmp src/c_api/c_api.cc -o build/c_api/c_api.o
    g++-7 -c -DDMLC_LOG_CUSTOMIZE=1 -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude -Idmlc-core/include -Irabit/include -I/include -O3 -funroll-loops -msse2 -fPIC -fopenmp src/learner.cc -o build/learner.o
    In file included from include/xgboost/data.h:10:0,
    from src/c_api/c_api.cc:3:
    dmlc-core/include/dmlc/base.h:190:10: fatal error: sys/types.h: No such file or directory
    #include <sys/types.h>
    ^In file included from /usr/local/Cellar/gcc/7.2.0/include/c++/7.2.0/bits/postypes.h:40:0,
    from /usr/local/Cellar/gcc/7.2.0/include/c++/7.2.0/bits/char_traits.h:40,
    from /usr/local/Cellar/gcc/7.2.0/include/c++/7.2.0/string:40,
    from rabit/include/rabit/rabit.h:13,
    from src/logging.cc:7:
    /usr/local/Cellar/gcc/7.2.0/include/c++/7.2.0/cwchar:44:10: fatal error: wchar.h: No such file or directory
    #include <wchar.h>
    ^~~~~~~~~
compilation terminated.
compilation terminated.
make: *** [build/c_api/c_api.o] Error 1
make: *** [build/logging.o] Error 1
In file included from dmlc-core/include/dmlc/io.h:8:0,
                 from src/learner.cc:7:
/usr/local/Cellar/gcc/7.2.0/include/c++/7.2.0/cstdio:42:10: fatal error: stdio.h: No such file or directory
 #include <stdio.h>
          ^~~~~~~~~
compilation terminated.
make: *** [build/learner.o] Error 1
+ echo -----------------------------
-----------------------------
+ echo 'Building multi-thread xgboost failed'
Building multi-thread xgboost failed
+ echo 'Start to build single-thread xgboost'
Start to build single-thread xgboost
+ make clean
Makefile:31: MAKE [/Library/Developer/CommandLineTools/usr/bin/make] - checked OK
rm -f -rf build build_plugin lib bin *~ */*~ */*/*~ */*/*/*~ */*.o */*/*.o */*/*/*.o #xgboost
rm -f -rf build_tests *.gcov tests/cpp/xgboost_test
if [ -d "R-package/src" ]; then \
                cd R-package/src; \
                rm -f -rf rabit src include dmlc-core amalgamation *.so *.dll; \
                cd /Users/zerobeanny/Downloads/xgboost-0.90/xgboost; \
        fi
+ make lib/libxgboost.dylib -j4 USE_OPENMP=0
Makefile:31: MAKE [/Library/Developer/CommandLineTools/usr/bin/make] - checked OK
g++-7 -DDMLC_LOG_CUSTOMIZE=1 -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude   -Idmlc-core/include -Irabit/include -I/include -O3 -funroll-loops -msse2 -fPIC -DDISABLE_OPENMP -MM -MT build/learner.o src/learner.cc >build/learner.d
g++-7 -DDMLC_LOG_CUSTOMIZE=1 -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude   -Idmlc-core/include -Irabit/include -I/include -O3 -funroll-loops -msse2 -fPIC -DDISABLE_OPENMP -MM -MT build/logging.o src/logging.cc >build/logging.d
g++-7 -DDMLC_LOG_CUSTOMIZE=1 -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude   -Idmlc-core/include -Irabit/include -I/include -O3 -funroll-loops -msse2 -fPIC -DDISABLE_OPENMP -MM -MT build/c_api/c_api.o src/c_api/c_api.cc >build/c_api/c_api.d
g++-7 -DDMLC_LOG_CUSTOMIZE=1 -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude   -Idmlc-core/include -Irabit/include -I/include -O3 -funroll-loops -msse2 -fPIC -DDISABLE_OPENMP -MM -MT build/c_api/c_api_error.o src/c_api/c_api_error.cc >build/c_api/c_api_error.d
g++-7 -c -DDMLC_LOG_CUSTOMIZE=1 -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude   -Idmlc-core/include -Irabit/include -I/include -O3 -funroll-loops -msse2 -fPIC -DDISABLE_OPENMP src/c_api/c_api_error.cc -o build/c_api/c_api_error.o
In file included from /usr/local/Cellar/gcc/7.2.0/include/c++/7.2.0/bits/postypes.h:40:0,
                 from /usr/local/Cellar/gcc/7.2.0/include/c++/7.2.0/bits/char_traits.h:40,
                 from /usr/local/Cellar/gcc/7.2.0/include/c++/7.2.0/string:40,
                 from /usr/local/Cellar/gcc/7.2.0/include/c++/7.2.0/stdexcept:39,
                 from /usr/local/Cellar/gcc/7.2.0/include/c++/7.2.0/array:39,
                 from /usr/local/Cellar/gcc/7.2.0/include/c++/7.2.0/tuple:39,
                 from /usr/local/Cellar/gcc/7.2.0/include/c++/7.2.0/mutex:38,
                 from dmlc-core/include/dmlc/thread_local.h:9,
                 from src/c_api/c_api_error.cc:6:
/usr/local/Cellar/gcc/7.2.0/include/c++/7.2.0/cwchar:44:10: fatal error: wchar.h: No such file or directory
 #include <wchar.h>
          ^~~~~~~~~
compilation terminated.
make: *** [build/c_api/c_api_error.o] Error 1
make: *** Waiting for unfinished jobs....
g++-7 -c -DDMLC_LOG_CUSTOMIZE=1 -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude   -Idmlc-core/include -Irabit/include -I/include -O3 -funroll-loops -msse2 -fPIC -DDISABLE_OPENMP src/logging.cc -o build/logging.o
g++-7 -c -DDMLC_LOG_CUSTOMIZE=1 -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude   -Idmlc-core/include -Irabit/include -I/include -O3 -funroll-loops -msse2 -fPIC -DDISABLE_OPENMP src/c_api/c_api.cc -o build/c_api/c_api.o
g++-7 -c -DDMLC_LOG_CUSTOMIZE=1 -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude   -Idmlc-core/include -Irabit/include -I/include -O3 -funroll-loops -msse2 -fPIC -DDISABLE_OPENMP src/learner.cc -o build/learner.o
In file included from /usr/local/Cellar/gcc/7.2.0/include/c++/7.2.0/bits/postypes.h:40:0,
                 from /usr/local/Cellar/gcc/7.2.0/include/c++/7.2.0/bits/char_traits.h:40,
                 from /usr/local/Cellar/gcc/7.2.0/include/c++/7.2.0/string:40,
                 from rabit/include/rabit/rabit.h:13,
                 from src/logging.cc:7:
/usr/local/Cellar/gcc/7.2.0/include/c++/7.2.0/cwchar:44:10: fatal error: wchar.h: No such file or directory
 #include <wchar.h>
          ^~~~~~~~~
In file included from include/xgboost/data.h:10:0,
                 from src/c_api/c_api.cc:3:
dmlc-core/include/dmlc/base.h:190:10: fatal error: sys/types.h: No such file or directory
 #include <sys/types.h>
          ^~~~~~~~~~~~~
In file included from dmlc-core/include/dmlc/io.h:8:0,
                 from src/learner.cc:7:
/usr/local/Cellar/gcc/7.2.0/include/c++/7.2.0/cstdio:42:10: fatal error: stdio.h: No such file or directory
 #include <stdio.h>
          ^~~~~~~~~
compilation terminated.
compilation terminated.
compilation terminated.
make: *** [build/learner.o] Error 1
make: *** [build/c_api/c_api.o] Error 1
make: *** [build/logging.o] Error 1
Traceback (most recent call last):
  File "setup.py", line 42, in <module>
    LIB_PATH = libpath['find_lib_path']()
  File "xgboost/libpath.py", line 48, in find_lib_path
    'List of candidates:\n' + ('\n'.join(dll_path)))
XGBoostLibraryNotFound: Cannot find XGBoost Library in the candidate path, did you install compilers and run build.sh in root path?
List of candidates:
/Users/zerobeanny/Downloads/xgboost-0.90/xgboost/libxgboost.dylib
/Users/zerobeanny/Downloads/xgboost-0.90/xgboost/../../lib/libxgboost.dylib
/Users/zerobeanny/Downloads/xgboost-0.90/xgboost/./lib/libxgboost.dylib


**and i have tried 
CFLAGS="-I$(xcrun --show-sdk-path)/usr/include" pip install xgboost
it just gave me the same error mesg.just like  $(xcrun --show-sdk-path) didn't work
any ideas?**
ps in macos 10.15,there is no  /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg 
@zerobeanny
Copy link
Author

and i have tried
CFLAGS="-I$(xcrun --show-sdk-path)/usr/include" pip install xgboost
it just gave me the same error mesg.just like $(xcrun --show-sdk-path) didn't work
any ideas?

ps in macos 10.15,there is no /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg

@hcho3
Copy link
Collaborator

hcho3 commented Oct 15, 2019

Take a look at #4949 (comment)

@hcho3 hcho3 closed this as completed Oct 15, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jan 13, 2020
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

2 participants