Hanjun-Dai / pytorch_structure2vec

pytorch implementation of structure2vec (https://arxiv.org/abs/1603.05629)
MIT License
305 stars 76 forks source link

Error compiling harvard_cep: Cannot find rdkit files #10

Closed cothurn closed 5 years ago

cothurn commented 6 years ago

I have installed rdkit from source and running ctest for rdkit shows that everything but pythonTestDirChem pass.

This is what i can for compiling harvard_cep:

g++ -shared -Wall -O3 -std=c++11 -I./include -I/home/gtj/summer2018/pytorch_structure2vec/RDKIT/rdkit-Release_2018_03_2/Code -Wno-unused-local-typedef -fPIC -MMD -o build/dll/libmol.so src/mol_lib.cpp build/lib/mol_utils.o -lm -L/home/gtj/summer2018/pytorch_structure2vec/RDKIT/rdkit-Release_2018_03_2/lib -lRDKitGraphMol -lRDKitRDGeneral -lRDKitSmilesParse -lRDKitDepictor -lRDKitSmilesParse -lRDKitFileParsers -lRDKitFingerprints /usr/bin/ld: cannot find -lRDKitGraphMol /usr/bin/ld: cannot find -lRDKitRDGeneral /usr/bin/ld: cannot find -lRDKitSmilesParse /usr/bin/ld: cannot find -lRDKitDepictor /usr/bin/ld: cannot find -lRDKitSmilesParse /usr/bin/ld: cannot find -lRDKitFileParsers /usr/bin/ld: cannot find -lRDKitFingerprints collect2: error: ld returned 1 exit status Makefile:35: recipe for target 'build/dll/libmol.so' failed

cothurn commented 6 years ago

I think I found the problem. The corresponding files in RDkit are .a files, not .so files. And in different names. Changing the -lxxx to -lxxx_static fixed the problem.

Hanjun-Dai commented 6 years ago

cool. You may also want to build the rdkit for dynamic libraries. In this way you can get rid of those static linking.

cothurn commented 6 years ago

It seems like they changed the structure RDkit. Using the version that you mentioned in the other issue seems to have fixed the problem without any other alteration. Maybe update the readme with the version of RDkit that you used?