homebrew-cheminformatics
homebrew-cheminformatics copied to clipboard
Troubles with rdkit on MacOS 10.12.4
Installation for python 3 worked perfectly:
brew install --with-python3 rdkit
but installation for python 2 failed:
brew uninstall -f rdkit
brew install rdkit
Last 15 lines from /Users/andreas/Library/Logs/Homebrew/rdkit/02.make:
/usr/bin/ar qc libRDInchiLib_static.a CMakeFiles/RDInchiLib_static.dir/inchi.cpp.o
/usr/bin/ranlib libRDInchiLib_static.a
[ 2%] Built target RDInchiLib_static
[ 2%] Linking CXX shared library ../../lib/libRDGeneral.dylib
cd /tmp/rdkit-20170429-33867-18zdqrb/rdkit-Release_2016_09_4/Code/RDGeneral && /usr/local/Cellar/cmake/3.8.0/bin/cmake -E cmake_link_script CMakeFiles/RDGeneral.dir/link.txt --verbose=1
/usr/local/Homebrew/Library/Homebrew/shims/super/clang++ -mpopcnt -std=c++11 -stdlib=libc++ -Wall -Wextra -Wno-unused-local-typedef -Wno-deprecated -Wno-unused-function -fno-strict-aliasing -fPIC -DNDEBUG -dynamiclib -Wl,-headerpad_max_install_names -compatibility_version 1.0.0 -current_version 2016.9.4 -o ../../lib/libRDGeneral.2016.09.4.dylib -install_name /tmp/rdkit-20170429-33867-18zdqrb/rdkit-Release_2016_09_4/lib/libRDGeneral.1.dylib CMakeFiles/RDGeneral.dir/Invariant.cpp.o CMakeFiles/RDGeneral.dir/types.cpp.o CMakeFiles/RDGeneral.dir/utils.cpp.o CMakeFiles/RDGeneral.dir/RDLog.cpp.o CMakeFiles/RDGeneral.dir/Dict.cpp.o CMakeFiles/RDGeneral.dir/LocaleSwitcher.cpp.o CMakeFiles/RDGeneral.dir/versions.cpp.o /usr/local/lib/libboost_thread-mt.dylib /usr/local/lib/libboost_system-mt.dylib /usr/local/lib/libboost_thread-mt.dylib /usr/local/lib/libboost_system-mt.dylib
cd /tmp/rdkit-20170429-33867-18zdqrb/rdkit-Release_2016_09_4/Code/RDGeneral && /usr/local/Cellar/cmake/3.8.0/bin/cmake -E cmake_symlink_library ../../lib/libRDGeneral.2016.09.4.dylib ../../lib/libRDGeneral.1.dylib ../../lib/libRDGeneral.dylib
[ 2%] Built target RDGeneral
[ 2%] Linking CXX static library libRDGeneral_static.a
cd /tmp/rdkit-20170429-33867-18zdqrb/rdkit-Release_2016_09_4/Code/RDGeneral && /usr/local/Cellar/cmake/3.8.0/bin/cmake -P CMakeFiles/RDGeneral_static.dir/cmake_clean_target.cmake
cd /tmp/rdkit-20170429-33867-18zdqrb/rdkit-Release_2016_09_4/Code/RDGeneral && /usr/local/Cellar/cmake/3.8.0/bin/cmake -E cmake_link_script CMakeFiles/RDGeneral_static.dir/link.txt --verbose=1
/usr/bin/ar qc libRDGeneral_static.a CMakeFiles/RDGeneral_static.dir/Invariant.cpp.o CMakeFiles/RDGeneral_static.dir/types.cpp.o CMakeFiles/RDGeneral_static.dir/utils.cpp.o CMakeFiles/RDGeneral_static.dir/RDLog.cpp.o CMakeFiles/RDGeneral_static.dir/Dict.cpp.o CMakeFiles/RDGeneral_static.dir/LocaleSwitcher.cpp.o CMakeFiles/RDGeneral_static.dir/versions.cpp.o
/usr/bin/ranlib libRDGeneral_static.a
[ 2%] Built target RDGeneral_static
make: *** [all] Error 2
If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
https://github.com/mcs07/homebrew-cheminformatics/issues
Looking at the gist log
brew gist-logs rdkit
shows the following (https://gist.github.com/anonymous/54edc245bc38d5572be49f23675a4e86):
...
cd /tmp/rdkit-20170428-50140-10loi4b/External/INCHI-API && /usr/local/Homebrew/Library/Homebrew/shims/super/clang++ -DBUILD_INCHI_SUPPORT -DRDK_64BIT_BUILD -DRDK_BUILD_DESCRIPTORS3D -DRDK_HAS_EIGEN3 -DRDK_TEST_MULTITHREADED -DRDK_USE_STRICT_ROTOR_DEFINITION -I/usr/local/include/inchi -I/usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I/usr/local/lib/python2.7/site-packages/numpy/core/include -isystem /usr/local/include -I/tmp/rdkit-20170428-50140-10loi4b/Code -I/usr/local/include/eigen3 -mpopcnt -std=c++11 -stdlib=libc++ -Wall -Wextra -Wno-deprecated -Wno-unused-function -fno-strict-aliasing -fPIC -DNDEBUG -DRDK_THREADSAFE_SSS -DBOOST_ALL_NO_LIB -o CMakeFiles/RDInchiLib_static.dir/inchi.cpp.o -c /tmp/rdkit-20170428-50140-10loi4b/External/INCHI-API/inchi.cpp
In file included from /tmp/rdkit-20170428-50140-10loi4b/Code/RDBoost/Wrap.cpp:16:
In file included from /tmp/rdkit-20170428-50140-10loi4b/Code/RDBoost/Wrap.h:19:
In file included from /usr/local/include/boost/python.hpp:11:
In file included from /usr/local/include/boost/python/args.hpp:8:
In file included from /usr/local/include/boost/python/detail/prefix.hpp:13:
/usr/local/include/boost/python/detail/wrap_python.hpp:50:11: fatal error: 'pyconfig.h' file not found
# include <pyconfig.h>
...
This is very curious, because the file "pyconfig.h" exists within /usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/include/python2.7, which is listed as one of the -I flags to clang.
What worked for me was to create symlinks for all the files in /usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/include/python2.7 in /usr/local/include, but this is hardly a good fix.
This is very odd, given that the full python include path is correctly listed as one of the -I flags for clang, as you say. You obviously shouldn't have to make the symlinks.
I can't reproduce this, however I do have python 2.7.13 installed, not 2.7.12_2, but that shouldn't really make any difference.
All I can recommend is doing brew update, brew upgrade, brew doctor to see if that does anything useful... then maybe try reinstalling boost-python, explicitly giving both python versions: --with-python --with-python3?
I noticed there is a thing called "superenv", which I do not really understand, but which left in my mind the possibility that it somehow overrides the -I command line flag, which could explain the odd behavior. "superenv" seems to be a homebrew thing, and not really understanding it, I might be spewing nonsense here.
I did do most of the things you recommend, including reinstalling boost, to no effect. If it was just me, it wouldn't be much of a problem, but I noticed there was a very recent update to Xcode (which, I believe, includes clang), and I fear that might be what caused it. If this is the case, the problem would rear its ugly head for real, soon. Have you applied all the most recent Apple upgrades?
On 5/2/17 4:28 PM, Matt Swain wrote:
This is very odd, given that the full python include path is correctly listed as one of the |-I| flags for clang, as you say. You obviously shouldn't have to make the symlinks.
I can't reproduce this, however I do have python 2.7.13 installed, not 2.7.12_2, but that shouldn't really make any different.
All I can recommend is doing |brew update|, |brew upgrade|, |brew doctor| to see if that does anything useful... then maybe try reinstalling boost-python, explicitly giving both python versions: |--with-python --with-python3|?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mcs07/homebrew-cheminformatics/issues/23#issuecomment-298751333, or mute the thread https://github.com/notifications/unsubscribe-auth/ACWdoPosf3-p2MTMkSRaHF3pJPSAuyzIks5r15HtgaJpZM4NMTcL.