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

fix for conf-rdkit to support upcoming version of rdkit #10926

Merged

Conversation

UnixJunkie
Copy link
Contributor

@UnixJunkie UnixJunkie commented Dec 6, 2017

In the upcoming version of rdkit, installed libraries have new names.

I want this conf package to support any installed version of rdkit.
If, in the future, there is a need to detect the specific rdkit version installed, I will break this conf package into several ones.

PS: the package that relies on this conf one should arrive this week into the opam repo.

I want this conf package to support any installed version of rdkit.
If, in the future, there is a need to detect the specific rdkit version installed, I will break this conf package into several ones.
@UnixJunkie UnixJunkie changed the title in the upcoming version of rdkit, installed libraries have new names. fix for conf-rdkit to support upcoming version of rdkit Dec 6, 2017
@UnixJunkie
Copy link
Contributor Author

it fails on osx, maybe the way to install rdkit on osx has changed. If someone has a mac under the hand to test that:
'brew install rdkit'
If that works, then I could update the os=darwin section in the opam file.
The previous recipe to install rdkit on osx was:
'brew tap rdkit/rdkit && brew install rdkit'.
Thanks,
F.

@UnixJunkie
Copy link
Contributor Author

I don't have a mac under the hand to test any fix for the OS X failure.
Some Linux distro will not build this package since they miss the system package rdkit (a good hint that
this Linux distro is not widespread).

@shonfeder
Copy link
Collaborator

I am trying to be some help, but I may need more guidance than it is worth. So just let me know if I'm being more bother than help here.

I'm running on

$ sw_vers
ProductName:	Mac OS X
ProductVersion:	10.11.6
BuildVersion:	15G1217

$ uname -a
Darwin comp.local 15.6.0 Darwin Kernel Version 15.6.0: Mon Jan  9 23:07:29 PST 2017; root:xnu-3248.60.11.2.1~1/RELEASE_X86_64 x86_64

I can confirm that rdkit is still not available on default homebrew repositories:

# after a fresh update
$ brew search rdkit
==> Searching local taps...
==> Searching taps on GitHub...
==> Searching blacklisted, migrated and deleted formulae...
No formula found for "rdkit".

and that the rdkit repo must still be tapped:

$ brew tap rdkit/rdkit && brew install rdkit

The build on my system failed due to missing numpy:

######################################################################## 100.0%
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named 'numpy'

Apparently an existing python2 version of numpy can cause some sort of problems in satisfying this dependency if the package isn't already installed for python3, so they recommend:

pip install numpy
pip3 install numpy
brew install rdkit --with-python3 --without-numpy

That is easily resolved. The more troubling problem is:

$ brew install rdkit
==> Installing rdkit from rdkit/rdkit
==> Downloading https://github.com/rdkit/rdkit/archive/Release_2017_03_3.tar.gz
Already downloaded: /Users/sf/Library/Caches/Homebrew/rdkit-2017.03.3.tar.gz
==> cmake -DCMAKE_C_FLAGS_RELEASE=-DNDEBUG -DCMAKE_CXX_FLAGS_RELEASE=-DNDEBUG -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/rdkit/2017.03.3 -DCMAKE_BUILD_TYPE=Release -DCMAKE_FIND_FRAMEWORK=LAST -DCMAKE_VERBOSE_MAKEF
==> make
Last 15 lines from /Users/sf/Library/Logs/Homebrew/rdkit/02.make:
cd /tmp/rdkit-20171211-52609-1fn1z6o/rdkit-Release_2017_03_3/Code/DataStructs && /usr/local/Homebrew/Library/Homebrew/shims/super/clang++  -DDataStructs_EXPORTS -DRDK_64BIT_BUILD -DRDK_BUILD_DESCRIPTORS3D -DRDK_HAS_EIGEN3 -DRDK_TEST_MULTITHREADED -DRDK_USE_STRICT_ROTOR_DEFINITION -DUSE_BUILTIN_POPCOUNT -I/Users/sf/.pyenv/versions/3.5.1/include/python3.5m -I/Users/sf/.pyenv/versions/3.5.1/lib/python3.5/site-packages/numpy/core/include -isystem /usr/local/include -I/tmp/rdkit-20171211-52609-1fn1z6o/rdkit-Release_2017_03_3/Code -I/usr/local/include/eigen3  -mpopcnt -std=c++11 -stdlib=libc++ -Wall -Wextra -Wno-deprecated -Wno-unused-function -fno-strict-aliasing -fPIC -DNDEBUG -fPIC   -DRDK_THREADSAFE_SSS -DBOOST_ALL_NO_LIB -o CMakeFiles/DataStructs.dir/BitOps.cpp.o -c /tmp/rdkit-20171211-52609-1fn1z6o/rdkit-Release_2017_03_3/Code/DataStructs/BitOps.cpp
[  7%] Building CXX object Code/DataStructs/CMakeFiles/DataStructs.dir/DiscreteDistMat.cpp.o
cd /tmp/rdkit-20171211-52609-1fn1z6o/rdkit-Release_2017_03_3/Code/DataStructs && /usr/local/Homebrew/Library/Homebrew/shims/super/clang++  -DDataStructs_EXPORTS -DRDK_64BIT_BUILD -DRDK_BUILD_DESCRIPTORS3D -DRDK_HAS_EIGEN3 -DRDK_TEST_MULTITHREADED -DRDK_USE_STRICT_ROTOR_DEFINITION -DUSE_BUILTIN_POPCOUNT -I/Users/sf/.pyenv/versions/3.5.1/include/python3.5m -I/Users/sf/.pyenv/versions/3.5.1/lib/python3.5/site-packages/numpy/core/include -isystem /usr/local/include -I/tmp/rdkit-20171211-52609-1fn1z6o/rdkit-Release_2017_03_3/Code -I/usr/local/include/eigen3  -mpopcnt -std=c++11 -stdlib=libc++ -Wall -Wextra -Wno-deprecated -Wno-unused-function -fno-strict-aliasing -fPIC -DNDEBUG -fPIC   -DRDK_THREADSAFE_SSS -DBOOST_ALL_NO_LIB -o CMakeFiles/DataStructs.dir/DiscreteDistMat.cpp.o -c /tmp/rdkit-20171211-52609-1fn1z6o/rdkit-Release_2017_03_3/Code/DataStructs/DiscreteDistMat.cpp
[  8%] Building CXX object Code/DataStructs/CMakeFiles/DataStructs.dir/DiscreteValueVect.cpp.o
cd /tmp/rdkit-20171211-52609-1fn1z6o/rdkit-Release_2017_03_3/Code/DataStructs && /usr/local/Homebrew/Library/Homebrew/shims/super/clang++  -DDataStructs_EXPORTS -DRDK_64BIT_BUILD -DRDK_BUILD_DESCRIPTORS3D -DRDK_HAS_EIGEN3 -DRDK_TEST_MULTITHREADED -DRDK_USE_STRICT_ROTOR_DEFINITION -DUSE_BUILTIN_POPCOUNT -I/Users/sf/.pyenv/versions/3.5.1/include/python3.5m -I/Users/sf/.pyenv/versions/3.5.1/lib/python3.5/site-packages/numpy/core/include -isystem /usr/local/include -I/tmp/rdkit-20171211-52609-1fn1z6o/rdkit-Release_2017_03_3/Code -I/usr/local/include/eigen3  -mpopcnt -std=c++11 -stdlib=libc++ -Wall -Wextra -Wno-deprecated -Wno-unused-function -fno-strict-aliasing -fPIC -DNDEBUG -fPIC   -DRDK_THREADSAFE_SSS -DBOOST_ALL_NO_LIB -o CMakeFiles/DataStructs.dir/DiscreteValueVect.cpp.o -c /tmp/rdkit-20171211-52609-1fn1z6o/rdkit-Release_2017_03_3/Code/DataStructs/DiscreteValueVect.cpp
[  8%] Building CXX object Code/DataStructs/CMakeFiles/DataStructs.dir/FPBReader.cpp.o
cd /tmp/rdkit-20171211-52609-1fn1z6o/rdkit-Release_2017_03_3/Code/DataStructs && /usr/local/Homebrew/Library/Homebrew/shims/super/clang++  -DDataStructs_EXPORTS -DRDK_64BIT_BUILD -DRDK_BUILD_DESCRIPTORS3D -DRDK_HAS_EIGEN3 -DRDK_TEST_MULTITHREADED -DRDK_USE_STRICT_ROTOR_DEFINITION -DUSE_BUILTIN_POPCOUNT -I/Users/sf/.pyenv/versions/3.5.1/include/python3.5m -I/Users/sf/.pyenv/versions/3.5.1/lib/python3.5/site-packages/numpy/core/include -isystem /usr/local/include -I/tmp/rdkit-20171211-52609-1fn1z6o/rdkit-Release_2017_03_3/Code -I/usr/local/include/eigen3  -mpopcnt -std=c++11 -stdlib=libc++ -Wall -Wextra -Wno-deprecated -Wno-unused-function -fno-strict-aliasing -fPIC -DNDEBUG -fPIC   -DRDK_THREADSAFE_SSS -DBOOST_ALL_NO_LIB -o CMakeFiles/DataStructs.dir/FPBReader.cpp.o -c /tmp/rdkit-20171211-52609-1fn1z6o/rdkit-Release_2017_03_3/Code/DataStructs/FPBReader.cpp
[  8%] Building CXX object Code/DataStructs/CMakeFiles/DataStructs.dir/MultiFPBReader.cpp.o
cd /tmp/rdkit-20171211-52609-1fn1z6o/rdkit-Release_2017_03_3/Code/DataStructs && /usr/local/Homebrew/Library/Homebrew/shims/super/clang++  -DDataStructs_EXPORTS -DRDK_64BIT_BUILD -DRDK_BUILD_DESCRIPTORS3D -DRDK_HAS_EIGEN3 -DRDK_TEST_MULTITHREADED -DRDK_USE_STRICT_ROTOR_DEFINITION -DUSE_BUILTIN_POPCOUNT -I/Users/sf/.pyenv/versions/3.5.1/include/python3.5m -I/Users/sf/.pyenv/versions/3.5.1/lib/python3.5/site-packages/numpy/core/include -isystem /usr/local/include -I/tmp/rdkit-20171211-52609-1fn1z6o/rdkit-Release_2017_03_3/Code -I/usr/local/include/eigen3  -mpopcnt -std=c++11 -stdlib=libc++ -Wall -Wextra -Wno-deprecated -Wno-unused-function -fno-strict-aliasing -fPIC -DNDEBUG -fPIC   -DRDK_THREADSAFE_SSS -DBOOST_ALL_NO_LIB -o CMakeFiles/DataStructs.dir/MultiFPBReader.cpp.o -c /tmp/rdkit-20171211-52609-1fn1z6o/rdkit-Release_2017_03_3/Code/DataStructs/MultiFPBReader.cpp
[  8%] Linking CXX shared library ../../lib/libRDKitDataStructs.dylib
cd /tmp/rdkit-20171211-52609-1fn1z6o/rdkit-Release_2017_03_3/Code/DataStructs && /usr/local/Cellar/cmake/3.10.0/bin/cmake -E cmake_link_script CMakeFiles/DataStructs.dir/link.txt --verbose=1
/usr/local/Homebrew/Library/Homebrew/shims/super/clang++  -mpopcnt -std=c++11 -stdlib=libc++ -Wall -Wextra -Wno-deprecated -Wno-unused-function -fno-strict-aliasing -fPIC -DNDEBUG -dynamiclib -Wl,-headerpad_max_install_names -compatibility_version 1.0.0 -current_version 2017.3.3 -o ../../lib/libRDKitDataStructs.2017.03.3.dylib -install_name /tmp/rdkit-20171211-52609-1fn1z6o/rdkit-Release_2017_03_3/lib/libRDKitDataStructs.1.dylib CMakeFiles/DataStructs.dir/BitVect.cpp.o CMakeFiles/DataStructs.dir/SparseBitVect.cpp.o CMakeFiles/DataStructs.dir/ExplicitBitVect.cpp.o CMakeFiles/DataStructs.dir/Utils.cpp.o CMakeFiles/DataStructs.dir/base64.cpp.o CMakeFiles/DataStructs.dir/BitOps.cpp.o CMakeFiles/DataStructs.dir/DiscreteDistMat.cpp.o CMakeFiles/DataStructs.dir/DiscreteValueVect.cpp.o CMakeFiles/DataStructs.dir/FPBReader.cpp.o CMakeFiles/DataStructs.dir/MultiFPBReader.cpp.o ../../lib/libRDKitRDGeneral.2017.03.3.dylib /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-20171211-52609-1fn1z6o/rdkit-Release_2017_03_3/Code/DataStructs && /usr/local/Cellar/cmake/3.10.0/bin/cmake -E cmake_symlink_library ../../lib/libRDKitDataStructs.2017.03.3.dylib ../../lib/libRDKitDataStructs.1.dylib ../../lib/libRDKitDataStructs.dylib
[  8%] Built target DataStructs
make: *** [all] Error 2

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
https://github.com/rdkit/homebrew-rdkit/issues

These open issues may also help:
Installing RDKit on Mac OSX 10.10.2 with java and inchi https://github.com/rdkit/homebrew-rdkit/issues/25

A similar problem also appears in rdkit/homebrew-rdkit#41, but the "fix" there did nothing for me.

On the other hand, rdkit/homebrew-rdkit#25 is still open (since April), and while there is a closed PR associated with it, I had no better luck with brew install --HEAD rdkit.

My impression is that RDKit is not very well supported via homebrew at the moment...

Let me know if there's anything else I can due to help.

@UnixJunkie
Copy link
Contributor Author

thanks for the help. I think I will stop pushing this package on the osx side: rdkit should be available by default with homebrew (I already overreached by trying to install a tap for rdkit). If it is not, then my package is not supposed to work on osx.

@UnixJunkie
Copy link
Contributor Author

The package is only broken on osx, because install of rdkit via brew is currently broken.
I have notified interested parties but this will not be fixed anytime soon, I am afraid.
This update to the package is still good to accept.

@UnixJunkie
Copy link
Contributor Author

for the record; install instructions of rdkit for the mac are there:
https://github.com/rdkit/homebrew-rdkit
I guess that in many cases 'brew install rdkit' doesn't work.
Other commands need to be entered before.
I will investigate when I have a Mac under the hand.

@rgrinberg
Copy link
Member

If a package is unavailable for a particular platform it's best to mark it as such. Here's an example of how to do it for OSX: #10990

@UnixJunkie
Copy link
Contributor Author

the package is not missing, it is just currently broken or requires to be installed with specific options.
I rarely have access to a mac to test it.

@kit-ty-kate
Copy link
Member

@UnixJunkie is this fixed upstream ? That would be awesome to have it tested for mac as well.
Is the problem going to end up in a compilation failure ? Otherwise it's better than nothing I think.

@UnixJunkie
Copy link
Contributor Author

fixed upstream: no.
Installing rdkit on a mac requires trial and error.
I do not understand why they don't make it fully automatic and able to work whatever the user configuration is.

@kit-ty-kate
Copy link
Member

Ok, I see. Let's merge this for now and worry about OSX later then. Thanks and sorry for the delay.

@kit-ty-kate kit-ty-kate merged commit 0980345 into ocaml:master Feb 1, 2018
@dra27 dra27 mentioned this pull request Mar 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants