Skip to content

Trouble installing xgboost on OSX 10.14 #4949

@allisonmcampbell

Description

@allisonmcampbell

Hi there,

I feel like I've tried everything under the sun to install xgboost on my mac (mohave), but I'm still running into dead ends.

Some things I've tried:
#4477
When I run the step

$ cmake ..

I get this error:

`-- The CXX compiler identification is GNU 5.5.0
-- The C compiler identification is GNU 5.5.0
-- Checking whether CXX compiler has -isysroot
-- Checking whether CXX compiler has -isysroot - yes
-- Checking whether CXX compiler supports OSX deployment target flag
-- Checking whether CXX compiler supports OSX deployment target flag - yes
-- Check for working CXX compiler: /usr/local/bin/g++-5
-- Check for working CXX compiler: /usr/local/bin/g++-5 -- broken
CMake Error at /usr/local/Cellar/cmake/3.15.4/share/cmake/Modules/CMakeTestCXXCompiler.cmake:53 (message):
The C++ compiler

"/usr/local/bin/g++-5"

is not able to compile a simple test program.

It fails with the following output:

Change Dir: /Users/camp426/xgboost/build/CMakeFiles/CMakeTmp

Run Build Command(s):/Users/camp426/anaconda3/bin/make cmTC_55296/fast && /Users/camp426/anaconda3/bin/make -f CMakeFiles/cmTC_55296.dir/build.make CMakeFiles/cmTC_55296.dir/build
make[1]: Entering directory '/Users/camp426/xgboost/build/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_55296.dir/testCXXCompiler.cxx.o
/usr/local/bin/g++-5    -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -std=c++14 -fmessage-length=0  -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -mmacosx-version-min=10.14   -o CMakeFiles/cmTC_55296.dir/testCXXCompiler.cxx.o -c /Users/camp426/xgboost/build/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
g++-5: error: unrecognized command line option '-stdlib=libc++'
make[1]: *** [CMakeFiles/cmTC_55296.dir/build.make:66: CMakeFiles/cmTC_55296.dir/testCXXCompiler.cxx.o] Error 1
make[1]: Leaving directory '/Users/camp426/xgboost/build/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_55296/fast] Error 2

CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:2 (project)

-- Configuring incomplete, errors occurred!
See also "/Users/camp426/xgboost/build/CMakeFiles/CMakeOutput.log".
See also "/Users/camp426/xgboost/build/CMakeFiles/CMakeError.log".`

I have homebrew, I've updated homebrew, I've tried installing xgboost (using both pip and pip3) with gcc5, gcc8, and gcc9.2 (newest version), none work. I get the same error:

Command "python setup.py egg_info" failed with error code 1

Which I see by the multiple issues that I found googling that this is a known issue.

I'm in dead-end land. Help please.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions