I now figured out that the problem is with static build boost libraries. It
works fine with dynamic build boost libraries. Why does the python wrapping
not work with static build boost libraries, and is it possible for it to
work with static libraries?

Regards
Rasmus

On Wed, Apr 8, 2020 at 7:58 PM Rasmus "Termo" Lundsgaard <
termope...@gmail.com> wrote:

> Dear all.
>
> I am trying to compile RDKit with boost from vcpkg which by standard use
> latest which is boost 1.72, and link against python37.
>
> All none python crests pass fine, but most python tests keeps failing for
> me with something the "did not match C++ signature" error. Here is a
> minimal example that fails:
>
> In [7]: mol = Chem.MolFromSmiles('CCCC')
>     In [8]: mol.GetNumAtoms()
>       Out[8]: 4
> In [9]: mol.Debug()
>     Atoms:
> 0 6 C chg: 0  deg: 1 exp: 1 imp: 3 hyb: 4 arom?: 0 chi: 0
> 1 6 C chg: 0  deg: 2 exp: 2 imp: 2 hyb: 4 arom?: 0 chi: 0
> 2 6 C chg: 0  deg: 2 exp: 2 imp: 2 hyb: 4 arom?: 0 chi: 0
> 3 6 C chg: 0  deg: 1 exp: 1 imp: 3 hyb: 4 arom?: 0 chi: 0
> Bonds:
> 0 0->1 order: 1 conj?: 0 aromatic?: 0
> 1 1->2 order: 1 conj?: 0 aromatic?: 0
> 2 2->3 order: 1 conj?: 0 aromatic?: 0
> In [10]: molh = Chem.AddHs(mol)
>
> ---------------------------------------------------------------------------
> ArgumentError                             Traceback (most recent call last)
> <ipython-input-10-9a58211410d1> in <module>
> ----> 1 molh = Chem.AddHs(mol)
>
> ArgumentError: Python argument types in
>     rdkit.Chem.rdmolops.AddHs(Mol)
> did not match C++ signature:
>     AddHs(RDKit::ROMol mol, bool explicitOnly=False, bool addCoords=False,
> boost::python::api::object onlyOnAtoms=None, bool addResidueInfo=False)
>
> Do you have any idea of why that is? My only suspiscion right now is if it
> can because it is linking to the found numpy (which is in and conda
> environment I am using for testing), if this is using another boost
> version, can that be it?
>
> my cmake call:
> cmake -DPy_ENABLE_SHARED=1 \
>   -DPYTHON_EXECUTABLE=/home/hafnium/miniconda3/envs/py37/bin/python3 \
>   -DRDK_BUILD_COORDGEN_SUPPORT=OFF \
>   -DRDK_INSTALL_INTREE=OFF \
>   -DRDK_INSTALL_STATIC_LIBS=OFF \
>   -DRDK_BUILD_CPP_TESTS=ON \
>   -DRDK_USE_BOOST_IOSTREAMS=OFF \
>   -DBoost_NO_SYSTEM_PATHS=ON \
>
> -DCMAKE_INSTALL_PREFIX=/home/hafnium/Hflabs-sync/HFgit/External/rdkit/rdkit-install
> \
>   -DCMAKE_BUILD_TYPE=Release \
>
> -DCMAKE_TOOLCHAIN_FILE=/home/hafnium/Hflabs-sync/vcpkg/scripts/buildsystems/vcpkg.cmake
> \
>   ..
>
>
>
> The following tests FAILED:
> 17 - pyAlignment (Failed)
> 21 - pyForceFieldConstraints (Failed)
> 41 - pyDepictor (Failed)
> 62 - pyChemReactions (Failed)
> 63 - pyChemReactionEnumerations (Failed)
> 64 - pyChemReactionSanitize (Failed)
> 70 - pyFilterCatalog (Failed)
> 72 - pyFragCatalog (Failed)
> 87 - pyMolDescriptors (Child aborted)
> 88 - pyMolDescriptors3D (Failed)
> 93 - pyTestGenerator (Failed)
> 94 - pyTestMHFP (Failed)
> 96 - pyPartialCharges (Failed)
> 98 - pyMolTransforms (Failed)
> 103 - pyForceFieldHelpers (Failed)
> 105 - pyDistGeomHelpers (Failed)
> 107 - pyMolAlign (Failed)
> 109 - pyChemicalFeatures (Failed)
> 111 - pyShapeHelpers (Failed)
> 113 - pyMolCatalog (Failed)
> 117 - pyMolDraw2D (Failed)
> 119 - pyFMCS (Failed)
> 123 - pyMolHash (Failed)
> 125 - pyMMPA (Failed)
> 127 - pyReducedGraphs (Failed)
> 130 - pySubstructLibrary (Failed)
> 132 - pyRGroupDecomposition (Failed)
> 134 - pyMolInterchange (Failed)
> 137 - pyGraphMolWrap (Failed)
> 138 - pyTestConformerWrap (Failed)
> 139 - pyTestTrajectory (Failed)
> 140 - pyTestSGroups (Failed)
> 142 - pyTestPropertyLists (Failed)
> 151 - pyMolStandardize (Failed)
> 153 - pyScaffoldNetwork (Failed)
> 157 - pyMatCalc (Failed)
> 160 - pySimDivPickers (Failed)
> 161 - pyRanker (Failed)
> 163 - pyFeatures (Failed)
> 164 - pythonTestDbCLI (Failed)
> 165 - pythonTestDirML (Failed)
> 166 - pythonTestDirDataStructs (Failed)
> 168 - pythonTestDirSimDivFilters (Failed)
> 169 - pythonTestDirVLib (Failed)
> 170 - pythonTestDirChem (Failed)
>
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to