Undefined symbol boost::archive::basic_text_iprimitive<std::istream>::~basic_text_iprimitive() #1182

Open
adalke opened this Issue Nov 26, 2016 · 0 comments

Projects

None yet

1 participant

@adalke
Contributor
adalke commented Nov 26, 2016

I'm compiling rdkit_2016_09_2 using boost_1_62_0 on OS X 10.10.5 using clang Apple LLVM version 7.0.2 (clang-700.1.81) and a locally built Python 3.5 in its own virturalenv.

During the build process I get the following error:

[ 74%] Linking CXX shared library ../../../lib/libFilterCatalog.dylib
Undefined symbols for architecture x86_64:
  "boost::archive::basic_text_iprimitive<std::istream>::~basic_text_iprimitive()", referenced from:
      RDKit::FilterCatalogParams::initFromStream(std::istream&) in FilterCatalog.cpp.o
      RDKit::FilterCatalog::FilterCatalog(std::string const&) in FilterCatalog.cpp.o
      boost::archive::text_iarchive::~text_iarchive() in FilterCatalog.cpp.o
      boost::archive::text_iarchive::~text_iarchive() in FilterCatalog.cpp.o
      RDKit::FilterCatalogEntry::initFromStream(std::istream&) in FilterCatalogEntry.cpp.o
      boost::archive::text_iarchive::~text_iarchive() in FilterCatalogEntry.cpp.o
      boost::archive::text_iarchive::~text_iarchive() in FilterCatalogEntry.cpp.o
      ...
  "boost::archive::basic_text_oprimitive<std::ostream>::~basic_text_oprimitive()", referenced from:
      RDKit::FilterCatalogParams::toStream(std::ostream&) const in FilterCatalog.cpp.o
      RDKit::FilterCatalog::Serialize() const in FilterCatalog.cpp.o
      boost::archive::text_oarchive::~text_oarchive() in FilterCatalog.cpp.o
      boost::archive::text_oarchive::~text_oarchive() in FilterCatalog.cpp.o
      RDKit::FilterCatalogEntry::toStream(std::ostream&) const in FilterCatalogEntry.cpp.o
      boost::archive::text_oarchive::~text_oarchive() in FilterCatalogEntry.cpp.o
      boost::archive::text_oarchive::~text_oarchive() in FilterCatalogEntry.cpp.o
      ...
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

With a "make DEBUG=1" the error is more specifically from:

[local:Code/GraphMol/FilterCatalog]% /Library/Developer/CommandLineTools/usr/bin/c++ -mpopcnt -stdlib=libstdc++ -Wall -Wextra -Wno-unused-local-typedef -Wno-deprecated -Wno-unused-function -fno-strict-aliasing -fPIC -O3 -DNDEBUG -dynamiclib -Wl,-headerpad_max_install_names -compatibility_version 1.0.0 -current_version 2016.9.2 -o ../../../lib/libFilterCatalog.2016.09.2.dylib -install_name /Users/dalke/ftps/rdkit-Release_2016_09_2/build/lib/libFilterCatalog.1.dylib CMakeFiles/FilterCatalog.dir/Filters.cpp.o CMakeFiles/FilterCatalog.dir/FilterCatalog.cpp.o CMakeFiles/FilterCatalog.dir/FilterCatalogEntry.cpp.o CMakeFiles/FilterCatalog.dir/FilterMatchers.cpp.o CMakeFiles/FilterCatalog.dir/FunctionalGroupHierarchy.cpp.o -L/Users/dalke/venvs/py35-rdkit_2016_09_2/lib ../../../lib/libSubgraphs.2016.09.2.dylib ../../../lib/libSubstructMatch.2016.09.2.dylib ../../../lib/libSmilesParse.2016.09.2.dylib ../../../lib/libGraphMol.2016.09.2.dylib ../../../lib/libRDGeometryLib.2016.09.2.dylib ../../../lib/libCatalogs.2016.09.2.dylib /Users/dalke/venvs/py35-rdkit_2016_09_2/lib/libboost_serialization.dylib ../../../lib/libDataStructs.2016.09.2.dylib ../../../lib/libRDGeneral.2016.09.2.dylib /Users/dalke/venvs/py35-rdkit_2016_09_2/lib/libboost_thread.dylib /Users/dalke/venvs/py35-rdkit_2016_09_2/lib/libboost_system.dylib -Wl,-rpath,/Users/dalke/venvs/py35-rdkit_2016_09_2/lib

There was a Boost error related to this at https://svn.boost.org/trac/boost/ticket/11671 but that was in 1.59.0 and should have been fixed.

I configured the RDKit build similar to how I did the spring release:

cmake .. -DCMAKE_INSTALL_PREFIX=/Users/dalke/venvs/py35-rdkit_2016_09_2 -DBoost_LIBRARY_DIR=/Users/dalke/venvs/py35-rdkit_2016_09_2/lib -DBoost_INCLUDE_DIR=/Users/dalke/venvs/py35-rdkit_2016_09_2/include -DRDK_BUILD_AVALON_SUPPORT=ON -DRDK_BUILD_INCHI_SUPPORT=ON -DBoost_ATOMIC_LIBRARY_DEBUG=/Users/dalke/venvs/py35-rdkit_2016_09_2/lib/libboost_atomic.dylib -DBoost_ATOMIC_LIBRARY_RELEASE=/Users/dalke/venvs/py35-rdkit_2016_09_2/lib/libboost_atomic.dylib -DBoost_CHRONO_LIBRARY_DEBUG=/Users/dalke/venvs/py35-rdkit_2016_09_2/lib/libboost_chrono.dylib -DBoost_CHRONO_LIBRARY_RELEASE=/Users/dalke/venvs/py35-rdkit_2016_09_2/lib/libboost_chrono.dylib -DBoost_DATE_TIME_LIBRARY_DEBUG=/Users/dalke/venvs/py35-rdkit_2016_09_2/lib/libboost_date_time.dylib -DBoost_DATE_TIME_LIBRARY_RELEASE=/Users/dalke/venvs/py35-rdkit_2016_09_2/lib/libboost_date_time.dylib -DBoost_LIBRARY_DIR_DEBUG:PATH=/Users/dalke/venvs/py35-rdkit_2016_09_2/lib -DBoost_LIBRARY_DIR_RELEASE:PATH=/Users/dalke/venvs/py35-rdkit_2016_09_2/lib -DBoost_PYTHON_LIBRARY_DEBUG=/Users/dalke/venvs/py35-rdkit_2016_09_2/lib/libboost_python.dylib -DBoost_PYTHON_LIBRARY_RELEASE=/Users/dalke/venvs/py35-rdkit_2016_09_2/lib/libboost_python.dylib -DBoost_REGEX_LIBRARY_DEBUG=/Users/dalke/venvs/py35-rdkit_2016_09_2/lib/libboost_regex.dylib -DBoost_REGEX_LIBRARY_RELEASE=/Users/dalke/venvs/py35-rdkit_2016_09_2/lib/libboost_regex.dylib -DBoost_SERIALIZATION_LIBRARY_DEBUG=/Users/dalke/venvs/py35-rdkit_2016_09_2/lib/libboost_serialization.dylib -DBoost_SERIALIZATION_LIBRARY_RELEASE=/Users/dalke/venvs/py35-rdkit_2016_09_2/lib/libboost_serialization.dylib -DBoost_SYSTEM_LIBRARY_DEBUG=/Users/dalke/venvs/py35-rdkit_2016_09_2/lib/libboost_system.dylib -DBoost_SYSTEM_LIBRARY_RELEASE=/Users/dalke/venvs/py35-rdkit_2016_09_2/lib/libboost_system.dylib -DBoost_THREAD_LIBRARY_DEBUG=/Users/dalke/venvs/py35-rdkit_2016_09_2/lib/libboost_thread.dylib -DBoost_THREAD_LIBRARY_RELEASE=/Users/dalke/venvs/py35-rdkit_2016_09_2/lib/libboost_thread.dylib

(Surely there's a better way to compile into a virtual env?)

As I workaround, I disabled serialization (which was enabled in spring 2016 with #691 ) using -DRDK_USE_BOOST_SERIALIZATION=OFF and compilation finishes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment