-
Notifications
You must be signed in to change notification settings - Fork 845
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
Postgres cartridge build fails under Ubuntu #4681
Comments
@SPKorhonen Thanks for providing details regarding your installation. I'll try to reproduce this over the next few days. Could you please also share your |
Here is the relevant portion of our build script:
|
@SPKorhonen Thanks! |
ptosco
pushed a commit
to ptosco/rdkit
that referenced
this issue
Nov 12, 2021
greglandrum
pushed a commit
that referenced
this issue
Nov 20, 2021
* fixes #4681 * fixes a few Windows build problems * added comments to adapter.cpp to explain the changes * get PostgreSQL to build on Windows with both MSVC and MinGW compilers Co-authored-by: Tosco, Paolo <paolo.tosco@novartis.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
I have trouble building Postgres cartridge under Linux. All other parts of RDKit compile and pass tests (with -DRDK_BUILD_PGSQL=OFF, Windows compilation of cartridge also works)
The problem is that cartridge build fails due to invalid link command:
/BUILD/boost/lib/libboost_iostreams-mt-d-x64.so -loptimized_static /BUILD/boost/lib/libboost_regex-mt-x64.so -ldebug_static /BUILD/boost/lib/libboost_regex-mt-d-x64.so ../../GraphMol/MolAlign/libRDKitMolAlign_static.a
It seems that whatever code automatically adds boost libraries is somehow mangling in configuration information. I also get both debug and release versions of boost libraries in link command
../../Catalogs/libRDKitCatalogs_static.a /BUILD/boost/lib/libboost_serialization-mt-x64.so /BUILD/boost/lib/libboost_serialization-mt-d-x64.so /usr/lib/x86_64-linux-gnu/libfreetype.so
though I'm not sure if this is an issue also.To Reproduce
I'm building RDKit from source using boost 1.76 built locally. Postgres 12 is installed from PostgreSQL Apt Repository. Cmake 3.21.3 is installed from KitWare apt repository.
Run cmake referencing custom boost:
cmake -DBOOST_ROOT:PATHNAME=$BOOST_BASE_PATH -DBoost_LIBRARY_DIRS=$BOOST_LIBRARYDIR -DBoost_NO_SYSTEM_PATHS=ON -DBoost_NO_BOOST_CMAKE=TRUE -DBoost_ARCHITECTURE=-x64 -DRDK_BUILD_PYTHON_WRAPPERS=ON -DPYTHON_EXECUTABLE:FILEPATH=$PYTHONBIN_DIR -DPYTHON_LIBRARY=$PYTHON_LIBRARY -DPYTHON_INCLUDE_DIR=$PYTHON_INCLUDE_DIR -DPYTHON_NUMPY_INCLUDE_PATH=$PYTHON_NUMPY_INCLUDE_PATH -DRDK_BUILD_INCHI_SUPPORT=ON -DRDK_BUILD_AVALON_SUPPORT=ON -DRDK_BUILD_FREESASA_SUPPORT=ON -DRDK_BUILD_YAEHMOP_SUPPORT=ON -DRDK_BUILD_MOLINTERCHANGE_SUPPORT=ON -DRDK_BUILD_PGSQL=ON -DPostgreSQL_CONFIG=$POSTGRES_CONFIG ..
Run make
Expected behavior
Cartridge is built successfully.
Configuration (please complete the following information):
Additional context
Link.txt generated by CMake:
/usr/bin/c++ -fPIC -mpopcnt -Wno-deprecated -Wno-unused-function -fno-strict-aliasing -Wall -Wextra -fPIC -O3 -DNDEBUG -shared -Wl,-soname,librdkit.so -o librdkit.so CMakeFiles/rdkit.dir/adapter.cpp.o CMakeFiles/rdkit.dir/bfp_op.c.o CMakeFiles/rdkit.dir/cache.c.o CMakeFiles/rdkit.dir/guc.c.o CMakeFiles/rdkit.dir/low_gist.c.o CMakeFiles/rdkit.dir/mol_op.c.o CMakeFiles/rdkit.dir/rdkit_gist.c.o CMakeFiles/rdkit.dir/bfp_gist.c.o CMakeFiles/rdkit.dir/bfp_gin.c.o CMakeFiles/rdkit.dir/bitstring.c.o CMakeFiles/rdkit.dir/rdkit_io.c.o CMakeFiles/rdkit.dir/rxn_op.c.o CMakeFiles/rdkit.dir/sfp_op.c.o -L/BUILD/rdkit/lib -Wl,-rpath,/BUILD/rdkit/lib:/BUILD/boost/lib /usr/lib/x86_64-linux-gnu/libpq.so ../../../External/AvalonTools/libRDKitAvalonLib_static.a ../../../External/AvalonTools/libRDKitavalon_clib_static.a ../../../External/INCHI-API/libRDKitRDInchiLib_static.a ../../../External/INCHI-API/libRDKitInchi_static.a ../../GraphMol/MolInterchange/libRDKitMolInterchange_static.a ../../GraphMol/MolDraw2D/libRDKitMolDraw2D_static.a ../../GraphMol/MolTransforms/libRDKitMolTransforms_static.a ../../GraphMol/MolHash/libRDKitMolHash_static.a ../../GraphMol/FMCS/libRDKitFMCS_static.a ../../GraphMol/ChemReactions/libRDKitChemReactions_static.a ../../GraphMol/ChemTransforms/libRDKitChemTransforms_static.a ../../GraphMol/FileParsers/libRDKitFileParsers_static.a ../../GraphMol/SmilesParse/libRDKitSmilesParse_static.a ../../GraphMol/Fingerprints/libRDKitFingerprints_static.a ../../GraphMol/Subgraphs/libRDKitSubgraphs_static.a ../../GraphMol/Descriptors/libRDKitDescriptors_static.a ../../GraphMol/PartialCharges/libRDKitPartialCharges_static.a ../../GraphMol/Substruct/libRDKitSubstructMatch_static.a ../../GraphMol/libRDKitGraphMol_static.a ../../Numerics/EigenSolvers/libRDKitEigenSolvers_static.a ../../DataStructs/libRDKitDataStructs_static.a ../../GraphMol/Depictor/libRDKitDepictor_static.a ../../Geometry/libRDKitRDGeometryLib_static.a ../../RDGeneral/libRDKitRDGeneral_static.a ../../../External/RingFamilies/libRDKitRingDecomposerLib_static.a ../../GraphMol/FilterCatalog/libRDKitFilterCatalog_static.a ../../Catalogs/libRDKitCatalogs_static.a /BUILD/boost/lib/libboost_serialization-mt-x64.so /BUILD/boost/lib/libboost_serialization-mt-d-x64.so /usr/lib/x86_64-linux-gnu/libfreetype.so ../../GraphMol/Subgraphs/libRDKitSubgraphs_static.a ../../GraphMol/FileParsers/libRDKitFileParsers_static.a /usr/lib/x86_64-linux-gnu/libz.so ../../GraphMol/SmilesParse/libRDKitSmilesParse_static.a ../../GraphMol/Depictor/libRDKitDepictor_static.a ../../../External/CoordGen/libRDKitmaeparser_static.a /BUILD/boost/lib/libboost_system-mt-x64.so /BUILD/boost/lib/libboost_system-mt-d-x64.so /BUILD/boost/lib/libboost_iostreams-mt-x64.so /BUILD/boost/lib/libboost_iostreams-mt-d-x64.so -loptimized_static /BUILD/boost/lib/libboost_regex-mt-x64.so -ldebug_static /BUILD/boost/lib/libboost_regex-mt-d-x64.so ../../GraphMol/MolAlign/libRDKitMolAlign_static.a ../../GraphMol/MolTransforms/libRDKitMolTransforms_static.a ../../Numerics/EigenSolvers/libRDKitEigenSolvers_static.a ../../GraphMol/Substruct/libRDKitSubstructMatch_static.a ../../GraphMol/libRDKitGraphMol_static.a ../../Numerics/Alignment/libRDKitAlignment_static.a ../../Geometry/libRDKitRDGeometryLib_static.a ../../DataStructs/libRDKitDataStructs_static.a ../../RDGeneral/libRDKitRDGeneral_static.a ../../../External/CoordGen/libRDKitcoordgen_static.a -lpthread
The text was updated successfully, but these errors were encountered: