Skip to content

Commit

Permalink
[MRG] DOC Adds explicit reference to clang (#13093)
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasjpfan authored and jnothman committed Feb 19, 2019
1 parent adfc044 commit e5e8546
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions doc/developers/advanced_installation.rst
Expand Up @@ -165,6 +165,31 @@ On Red Hat and clones (e.g. CentOS), install the dependencies using::

sudo yum -y install gcc gcc-c++ numpy python-devel scipy

Mac OSX
-------

The default C compiler, Apple-clang, on Mac OSX does not directly support
OpenMP. The first solution to build scikit-learn is to install another C
compiler such as gcc or llvm-clang. Another solution is to enable OpenMP
support on the default Apple-clang. In the following we present how to
configure this second option.

You first need to install the OpenMP library::

brew install libomp

Then you need to set the following environment variables::

export CC=/usr/bin/clang
export CXX=/usr/bin/clang++
export CPPFLAGS="$CPPFLAGS -Xpreprocessor -fopenmp"
export CFLAGS="$CFLAGS -I/usr/local/opt/libomp/include"
export CXXFLAGS="$CXXFLAGS -I/usr/local/opt/libomp/include"
export LDFLAGS="$LDFLAGS -L/usr/local/opt/libomp/lib -lomp"
export DYLD_LIBRARY_PATH=/usr/local/opt/libomp/lib

Finally you can build the package using the standard command.


Windows
-------
Expand Down

0 comments on commit e5e8546

Please sign in to comment.