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

Update OSX build instructions #2784

Merged
merged 5 commits into from
Nov 6, 2017

Conversation

lenguyenthedat
Copy link
Contributor

@lenguyenthedat lenguyenthedat commented Oct 11, 2017

Keeping things simpler for OS X users:

  • tested on macOS Sierra 10.12.6
  • brew install gcc is now at v 0.7.2,
  • --without-multilib isn't an option anymore:
$ 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) *
  Poured from bottle on 2017-10-11 at 23:04:26
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/gcc.rb
==> Dependencies
Required: gmp ✔, libmpc ✔, mpfr ✔, isl ✔
==> Options
--with-jit
	Build just-in-time compiler
--with-nls
	Build with native language support (localization)
--HEAD
	Install HEAD version

(it's actually not needed in our case as there is no incompatibility between OpenMP and multilib support Homebrew/homebrew-core#16751)

@lenguyenthedat lenguyenthedat changed the title Xgboost osx build Update OSX build instructions Oct 11, 2017
@codecov-io
Copy link

codecov-io commented Oct 11, 2017

Codecov Report

Merging #2784 into master will decrease coverage by 0.07%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #2784      +/-   ##
============================================
- Coverage     43.16%   43.08%   -0.08%     
- Complexity      192      200       +8     
============================================
  Files           150      151       +1     
  Lines         11368    11519     +151     
  Branches       1148     1167      +19     
============================================
+ Hits           4907     4963      +56     
- Misses         6135     6225      +90     
- Partials        326      331       +5
Impacted Files Coverage Δ Complexity Δ
include/xgboost/tree_model.h 33.08% <0%> (-7.6%) 0% <0%> (ø)
src/predictor/cpu_predictor.cc 69.62% <0%> (-2.64%) 0% <0%> (ø)
src/learner.cc 25.92% <0%> (-0.36%) 0% <0%> (ø)
.../scala/ml/dmlc/xgboost4j/scala/spark/XGBoost.scala 73.02% <0%> (-0.19%) 0% <0%> (ø)
python-package/xgboost/core.py 80.97% <0%> (-0.13%) 0% <0%> (ø)
src/c_api/c_api.cc 17.92% <0%> (-0.04%) 0% <0%> (ø)
tests/cpp/predictor/test_cpu_predictor.cc 100% <0%> (ø) 0% <0%> (ø) ⬇️
include/xgboost/gbm.h 14.28% <0%> (ø) 0% <0%> (ø) ⬇️
include/xgboost/predictor.h 75% <0%> (ø) 0% <0%> (ø) ⬇️
src/common/row_set.h 0% <0%> (ø) 0% <0%> (ø) ⬇️
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ff9180c...14784b7. Read the comment docs.

@lenguyenthedat
Copy link
Contributor Author

Any chance this get merged? The original instructions are duplicative and quite confusing sometimes.

doc/build.md Outdated
@@ -59,20 +59,12 @@ cd xgboost; make -j4

### Building on OSX
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you mention that Clang is OK if OMP support is not needed?

@lenguyenthedat
Copy link
Contributor Author

@superbobry Done.

Also, I'm wondering if we should include an instruction for pip install method.
Currently if you want to use pip install xgboost, you can only do it with gcc5. More info: https://medium.com/@lenguyenthedat/installing-xgboost-on-os-x-1f63c1ed042

Lots of people have been facing that problem too: https://github.com/dmlc/xgboost/issues?utf8=%E2%9C%93&q=%22failed%20with%20error%20code%201%22

@superbobry
Copy link
Contributor

Good idea, please go ahead.

@lenguyenthedat
Copy link
Contributor Author

Done 😄

@lenguyenthedat
Copy link
Contributor Author

Shall we merge? 😄

@superbobry superbobry merged commit 77ae4c8 into dmlc:master Nov 6, 2017
@superbobry
Copy link
Contributor

Thanks @lenguyenthedat!

CodingCat pushed a commit to CodingCat/xgboost that referenced this pull request Dec 29, 2017
* Update xgboost build for OS X

* Add notes on gcc and brew

* Update build.md

* Update build.md

* Update build.md
@lock lock bot locked as resolved and limited conversation to collaborators Jan 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants