[Rdkit-discuss] Building RDKit on Windows. Only static libraries produced? How to make the Python w
Open-Source Cheminformatics and Machine Learning
Brought to you by:
glandrum
|
From: pgchem p. <pg...@tu...> - 2023-05-10 14:44:44
|
Hello all, I'm currently trying to build RDKit 2023_03_1 on Windows 11 with Visual Studio 2022 Community. The building itself works: - No errors during the build - I get a working extension against PostgreSQL 15.2 - I get working static libraries for Visual Studio (RDGeneral.lib etc.) - I get a rdkit package for Python 3.10 BUT this does not work: from rdkit import Chem Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\RDKit\lib\site-packages\rdkit\__init__.py", line 6, in <module> from . import rdBase ImportError: DLL load failed while importing rdBase: The specified module could not be found. I am pretty sure, that the environment is ok, I have checked with the dependency walker that rdBase.pyd sees everything it needs. However, when I take a look at the rdkit package from PyPI, there are a lot of *.dlls. while my build only produces static libraries (*.lib). When I compare the sizes of rdBase.pyd from PyPI and mine, mine is much larger, so I assume that it also is statically linked - so it should work?, but it doesn't. Any pointers to what I am doing wrong here? This is my cmake command: c:/cmake/bin/cmake -DRDK_BUILD_PYTHON_WRAPPERS=ON -DBOOST_ROOT=C:/Devel/RDBuild/boost -DRDK_BUILD_CAIRO_SUPPORT=ON -DRDK_BUILD_INCHI_SUPPORT=ON -DRDK_BUILD_AVALON_SUPPORT=ON -DRDK_BUILD_PGSQL=ON -DPostgreSQL_ROOT="C:\PostgreSQL\15" -DRDK_INSTALL_INTREE=OFF -DCMAKE_INSTALL_PREFIX=c:/RDKit -DEIGEN3_INCLUDE_DIR=C:/Devel/RDBuild/eigen3 -DFREETYPE_INCLUDE_DIRS=c:/Devel/RDbuild/freetype/include -DFREETYPE_LIBRARY="c:/Devel/RDBuild/freetype/release dll/win64/freetype.lib" -DZLIB_INCLUDE_DIR=c:/Devel/RDBuild/zlib/include -DZLIB_LIBRARY=c:/Devel/RDBuild/zlib/libz.lib -DCAIRO_INCLUDE_DIRS=c:/Devel/RDBuild/cairo/include -DCAIRO_LIBRARIES=c:/Devel/RDBuild/cairo/lib/x64/cairo.lib -DRDK_BUILD_FREETYPE_SUPPORT=ON -DRDK_BUILD_COMPRESSED_SUPPLIERS=ON -G"Visual Studio 17 2022" -A x64 .. and the MSBuild command: & "C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\MSBuild.exe" /p:Configuration=Release INSTALL.vcxproj best regards Ernst-Georg |