Closed hgascon closed 6 years ago
Hi there, it seems the error is related to RDKIT, since the function 'SmilesMolSupplier...' belongs to rdkit.
To make several things clear: 1) which version of rdkit did you use? I used https://github.com/rdkit/rdkit/releases/tag/Release_2017_09_1
2) In the Makefile, the include path is set to $RDBASE/Code, and the lib path is set to $RDBASE/lib So make sure the lib files are there.
Let me know if that works.
I used rdkit from the repository. Now I have tried with the Release_2017_09_1 version and it compiles without errors. However, I compile harvard_cep and get the same error when executing for example:
python mol_lib.py
What version of boost have you used?
I was using boost 1.64.0, but I don't think it is due to boost c++.
Also is the error reported during compilation or execution?
Execution.
This is the output from ldd build/dll/libmol.so
:
linux-vdso.so.1 => (0x00007ffc80359000)
libRDKitGraphMol.so.1 => [...]/rdkit-Release_2017_09_1/lib/libRDKitGraphMol.so.1 (0x00007f57385d9000)
libRDKitRDGeneral.so.1 => [...]/rdkit-Release_2017_09_1/lib/libRDKitRDGeneral.so.1 (0x00007f57383bb000)
libRDKitFileParsers.so.1 => [...]/rdkit-Release_2017_09_1/lib/libRDKitFileParsers.so.1 (0x00007f57380e3000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f5737d44000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f5737b2d000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f5737763000)
libRDKitRDGeometryLib.so.1 => [...]/rdkit-Release_2017_09_1/lib/libRDKitRDGeometryLib.so.1 (0x00007f5737537000)
libboost_thread.so.1.65.1 => [...]/boost_1_65_1/stage/lib/libboost_thread.so.1.65.1 (0x00007f573730e000)
libboost_system.so.1.65.1 => [...]/boost_1_65_1/stage/lib/libboost_system.so.1.65.1 (0x00007f573710a000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f5736eec000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f5736be3000)
libRDKitSmilesParse.so.1 => [...]/rdkit-Release_2017_09_1/lib/libRDKitSmilesParse.so.1 (0x00007f5736973000)
/lib64/ld-linux-x86-64.so.2 (0x000055fde423a000)
libRDKitDataStructs.so.1 => [...]/rdkit-Release_2017_09_1/lib/libRDKitDataStructs.so.1 (0x00007f573665d000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f5736454000)
Ok, problem solved. Apparently, as described here, ctypes does not use LD_LIBRARY_PATH in linux and the solution is to pass the linker the relative path of the libraries needed:
-Wl,-rpath='.',-rpath='./another/relative/rpath'
That's great! Thanks for investigating into the issue!
But it seems your linker tells the right path already. I've added -L$RDBASE/lib to the Makefile, it should be able to find the right file. Maybe you can check whether your desired rdkit lib has highest priority in LD_LIBRARY_PATH
Hi @Hanjun-Dai, I have installed rdkit from source and was able to compile the harvard cep. However, when I try to run the example experiment, loading libmol.so in mol_lib.py line 12:
returns an undefined symbol error:
Any hints here? Thanks!