Hi Paolo, You hit the nail right on the head: I defined the _GLIBCXX_USE_CXX11_ABI=0 macro and RDKit compiled and linked normally. I still need to figure out what exactly happened (I compiled Boost in my project space because I do not have admin privileges to update the precompiled version SBU supercomputer has) and I want to leave precise instructions to present and future grad students and potential users of my code. I'm very glad it worked, though!
Thanks so much! On Wed, Apr 28, 2021 at 1:26 PM Paolo Tosco <paolo.tosco.m...@gmail.com> wrote: > Hi Guilherme, > > it looks like it might be this: > > https://github.com/rdkit/rdkit/issues/2013#issuecomment-553563418 > > This can happen if you are using pre-compiled Boost libraries that were > compiled with a different compiler from the one you are using for RDKit. > > To check if that's the case, compare the symbols for one of those > undefined references between your RDKit binary and your Boost library, e.g.: > > $ nm /path/to/boost/lib/lib/libboost_serialization.so.1.74.0 | grep > 'common_oarchive.*text_oarchive.*save.*class_name_type' > 0000000000023b10 W > _ZN5boost7archive6detail15common_oarchiveINS0_13text_oarchiveEE5vsaveERKNS0_15class_name_typeE > $ nm > ./Code/GraphMol/ChemReactions/CMakeFiles/testEnumeration.dir/Enumerate/testEnumerate.cpp.o > | grep 'common_oarchive.*text_oarchive.*save.*class_name_type' > 0000000000000000 W > _ZN5boost7archive6detail15common_oarchiveINS0_13text_oarchiveEE5vsaveERKNS0_15class_name_typeE > > They should be identical as in my example above. > If they aren't, you might need to define the _GLIBCXX_USE_CXX11_ABI=0 macro > as explained in the GitHub comment I linked above. > > HTH, cheers > p. > > On Wed, Apr 28, 2021 at 6:48 PM Guilherme Duarte Ramos Matos < > guilherme.duarteramosma...@stonybrook.edu> wrote: > >> Dear RDKit community, >> >> I use the RDKit C++ libraries (version 2019_09_1) in one of my projects >> and I have a linking problem that I am having a hard time troubleshooting. >> >> When I try to compile and link using the CMake command below >> >> * cmake .. -DRDK_INSTALL_INTREE=OFF \ * >> *-DCMAKE_INSTALL_PREFIX=path/to/rdkit-Release_2019_09_1 \ * >> *-DBOOST_ROOT= path/to/boost \* >> *-DBoost_USE_STATIC_LIBS=OFF \ * >> *-DBOOST_LIBRARYDIR=path/to/boost/lib \ * >> *-DBoost_NO_SYSTEM_PATHS=ON \ * >> *-DEIGEN3_INCLUDE_DIR=/path/to/eigen-3.3.9 \ * >> *-DPYTHON_EXECUTABLE=/path/to/python3 \ * >> *-DRDK_BUILD_PYTHON_WRAPPERS=OFF* >> >> >> I get the following error message: >> >> *[ 70%] Linking CXX executable testEnumeration* >> *CMakeFiles/testEnumeration.dir/Enumerate/testEnumerate.cpp.o: In >> function >> boost::archive::detail::common_oarchive<boost::archive::text_oarchive>::vsave(boost::archive::class_name_type >> const&)': >> testEnumerate.cpp:(.text._ZN5boost7archive6detail15common_oarchiveINS0_13text_oarchiveEE5vsaveERKNS0_15class_name_typeE[_ZN5boost7archive6detail15common_oarchiveINS0_13text_oarchiveEE5vsaveERKNS0_15class_name_typeE]+0x32): >> undefined reference >> toboost::archive::text_oarchive_implboost::archive::text_oarchive::save(std::string >> const&)'* >> *CMakeFiles/testEnumeration.dir/Enumerate/testEnumerate.cpp.o: In >> function boost::archive::detail::iserializer<boost::archive::text_iarchive, >> RDKit::EnumerateLibraryBase>::load_object_data(boost::archive::detail::basic_iarchive&, >> void*, unsigned int) const': >> testEnumerate.cpp:(.text._ZNK5boost7archive6detail11iserializerINS0_13text_iarchiveEN5RDKit20EnumerateLibraryBaseEE16load_object_dataERNS1_14basic_iarchiveEPvj[_ZNK5boost7archive6detail11iserializerINS0_13text_iarchiveEN5RDKit20EnumerateLibraryBaseEE16load_object_dataERNS1_14basic_iarchiveEPvj]+0x97): >> undefined reference >> toboost::archive::text_iarchive_implboost::archive::text_iarchive::load(std::string&)'* >> *testEnumerate.cpp:(.text._ZNK5boost7archive6detail11iserializerINS0_13text_iarchiveEN5RDKit20EnumerateLibraryBaseEE16load_object_dataERNS1_14basic_iarchiveEPvj[_ZNK5boost7archive6detail11iserializerINS0_13text_iarchiveEN5RDKit20EnumerateLibraryBaseEE16load_object_dataERNS1_14basic_iarchiveEPvj]+0xd9): >> undefined reference to >> boost::archive::text_iarchive_impl<boost::archive::text_iarchive>::load(std::string&)' >> CMakeFiles/testEnumeration.dir/Enumerate/testEnumerate.cpp.o: In >> functionboost::archive::detail::oserializer<boost::archive::text_oarchive, >> RDKit::EnumerateLibraryBase>::save_object_data(boost::archive::detail::basic_oarchive&, >> void const*) const':* >> *testEnumerate.cpp:(.text._ZNK5boost7archive6detail11oserializerINS0_13text_oarchiveEN5RDKit20EnumerateLibraryBaseEE16save_object_dataERNS1_14basic_oarchiveEPKv[_ZNK5boost7archive6detail11oserializerINS0_13text_oarchiveEN5RDKit20EnumerateLibraryBaseEE16save_object_dataERNS1_14basic_oarchiveEPKv]+0x56): >> undefined reference to >> boost::archive::text_oarchive_impl<boost::archive::text_oarchive>::save(std::string >> const&)' >> testEnumerate.cpp:(.text._ZNK5boost7archive6detail11oserializerINS0_13text_oarchiveEN5RDKit20EnumerateLibraryBaseEE16save_object_dataERNS1_14basic_oarchiveEPKv[_ZNK5boost7archive6detail11oserializerINS0_13text_oarchiveEN5RDKit20EnumerateLibraryBaseEE16save_object_dataERNS1_14basic_oarchiveEPKv]+0xa1): >> undefined reference >> toboost::archive::text_oarchive_implboost::archive::text_oarchive::save(std::string >> const&)'* >> *CMakeFiles/testEnumeration.dir/Enumerate/testEnumerate.cpp.o: In >> function boost::archive::detail::oserializer<boost::archive::text_oarchive, >> RDKit::EnumerateLibrary>::save_object_data(boost::archive::detail::basic_oarchive&, >> void const*) const': >> testEnumerate.cpp:(.text._ZNK5boost7archive6detail11oserializerINS0_13text_oarchiveEN5RDKit16EnumerateLibraryEE16save_object_dataERNS1_14basic_oarchiveEPKv[_ZNK5boost7archive6detail11oserializerINS0_13text_oarchiveEN5RDKit16EnumerateLibraryEE16save_object_dataERNS1_14basic_oarchiveEPKv]+0x15a): >> undefined reference >> toboost::archive::text_oarchive_implboost::archive::text_oarchive::save(std::string >> const&)'* >> *CMakeFiles/testEnumeration.dir/Enumerate/testEnumerate.cpp.o: In >> function void >> RDKit::EnumerateLibrary::load<boost::archive::text_iarchive>(boost::archive::text_iarchive&, >> unsigned int)': >> testEnumerate.cpp:(.text._ZN5RDKit16EnumerateLibrary4loadIN5boost7archive13text_iarchiveEEEvRT_j[_ZN5RDKit16EnumerateLibrary4loadIN5boost7archive13text_iarchiveEEEvRT_j]+0x18a): >> undefined reference >> toboost::archive::text_iarchive_implboost::archive::text_iarchive::load(std::string&)'* >> *collect2: error: ld returned 1 exit status* >> >> >> *make[2]: *** [Code/GraphMol/ChemReactions/testEnumeration] Error >> 1make[1]: *** >> [Code/GraphMol/ChemReactions/CMakeFiles/testEnumeration.dir/all] Error >> 2make: *** [all] Error 2* >> >> >> As far as I can tell, it is an "*undefined reference to undefined >> reference to >> `boost::archive::text_iarchive_impl<boost::archive::text_iarchive>::load(std::string&)'*". >> Trying to compile and link RDKit using the cmake flag >> -DRDK_USE_BOOST_SERIALIZATION=OFF works, but it is not enough for my >> project; undefined references to RDKit::SmartsToMol pop up everywhere in >> the linking phase. My Boost version is 1.70.0. >> >> My question is simple: where do you think I should look at in my Boost or >> RDKit installation to track where the problem is? It seems something in >> serialization is not properly done. Any advice would be very much >> appreciated. >> >> Thanks so much! >> >> -- >> ***************************************************** >> Guilherme Duarte Ramos Matos >> Ph.D. in Chemistry, UC Irvine (2018) >> Postdoctoral Associate, Rizzo Lab >> >> ***************************************************** >> _______________________________________________ >> Rdkit-discuss mailing list >> Rdkit-discuss@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss >> > -- ***************************************************** Guilherme Duarte Ramos Matos Ph.D. in Chemistry, UC Irvine (2018) Postdoctoral Associate, Rizzo Lab *****************************************************
_______________________________________________ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss