installation problems with OS X 10.11 and anaconda
cranmer opened this issue · 6 comments
I see the documentation gives the warning Mac OS: the libstdc++ and libc++ ABIs are not compatible.
and the solution there is
brew install --HEAD root
However, I'm building ROOT (root-v6-06-02) on my own system from source from cloning the repo instead of using brew. I recently started using anaconda and I had some problems building ROOT. See here:
https://root.cern.ch/phpBB3/viewtopic.php?t=17714#p92208
the solution there was quite a hack
install_name_tool -change libpython2.7.dylib /anaconda/lib/libpython2.7.dylib lib/libPyROOT.so
Now I'm trying to install root_numpy and I see:
clang: error: invalid deployment target for -stdlib=libc++ (requires OS X 10.7 or later)
but it looks like the libraries are using libc++ not
$ otool -L /Users/cranmer/projects/roostats/root-v6-06-02/lib/libPyROOT.so
/Users/cranmer/projects/roostats/root-v6-06-02/lib/libPyROOT.so:
@rpath/libPyROOT.so (compatibility version 0.0.0, current version 0.0.0)
@rpath/libTree.so (compatibility version 0.0.0, current version 0.0.0)
/anaconda/lib/libpython2.7.dylib (compatibility version 2.7.0, current version 2.7.0)
@rpath/libRIO.so (compatibility version 0.0.0, current version 0.0.0)
@rpath/libCore.so (compatibility version 0.0.0, current version 0.0.0)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.1.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)
I also didn't follow the documentation where it says
This issue also comes up if you’re using a Python bundle such as Anaconda or Enthought Canopy. These bundles build against libstdc++, the GCC C++ standard library, which is used in Mac OSX 10.5 and later. On Mac OSX 10.7 and later, the default compiler links against libc++, the Clang C++ standard library.
It says libstdc++ 10.5 and later (which would include 10.11) and then it says libc++ for 10.7 and later (which also includes 10.11 and is contradictory). Maybe that should be reworded.
Any suggestions here?
As a side note it would be valuable to have some (somewhere) some suggestions for OS X, anaconda, ROOT, PyROOT, rootpy, and root_numpy. After a long time of no problems with ROOT, pyroot, etc. I'm having all sorts of problems recently. Thanks.
Hi again
after some searching I tried this:
export MACOSX_DEPLOYMENT_TARGET=10.9
and then I was able to build. However, when running I ran into issues with libmkl_intel_lp64.dylib
and anaconda. My current work around for that is:
export DYLD_FALLBACK_LIBRARY_PATH=//anaconda/lib/
Yeah that warning should be reworded. I'm going to use a spare Mac at work on Wednesday to help investigate. Would be useful to have a section in the installation docs on exactly this.
Regarding the docs, it means to say that for 10.7 and later you could have issues installing packages with extension modules since beyond that point the default compiler clang links against libc++, but the anaconda bundle would have been built against libstdc++. Is it the case that libstdc++ is only available for Mac 10.5 and later?
Does this work for you?
conda install -c NLeSC root_numpy
That channel also has an OSX build.
anaconda search -t conda root_numpy
Using Anaconda Cloud api site https://api.anaconda.org
Run 'anaconda show <USER/PACKAGE>' to get more details:
Packages:
Name | Version | Package Types | Platforms
------------------------- | ------ | --------------- | ---------------
NLeSC/root_numpy | 4.4.0 | conda | linux-64, osx-64
jsw-fnal/root_numpy | 3.3.1 | conda | linux-64
: An interface between ROOT and NumPy
kcolletti1/root_numpy | 3.3.1 | conda | linux-64
: An interface between ROOT and NumPy
remenska/root_numpy | 4.3.0 | conda | linux-64
Found 4 packages
(for reference) If you still want to compile root_numpy from source on OSX with anaconda:
OSX 10.11.4
python --version
Python 2.7.12 :: Anaconda 4.1.1 (x86_64)
g++ --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 7.3.0 (clang-703.0.31)
Target: x86_64-apple-darwin15.4.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
you need to specify -mmacosx-version-min=10.7
to root_numpy at compile-time.
as in this gist:
https://gist.github.com/jpata/1fd7a3c65ed9f17c99c2743fe1b49701