You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have tried many different ways to get this package to compile, but, even if I can get the initial build process to work, I always run into issues during the run the shared libraries not linking.
Does the RDKit licensing prevent you from including RDKit as part of the GitHub directory itself? It seems like it would be simpler and more self-contained to just have all of the RDKit dependencies as part of the git and not reference outside libraries. You might have a lot of good reasons why not to do this, I just thought I should mention it.
I haven't found any installation instructions that specify where the custom RDKit build is to be installed anywhere on the git, are any available? I even tried reworking the old script that was being used to generate the RDKit Debian package from the RDKit git and that did not work either.
I could be doing something completely wrong, but "dynamic-linking-from-conda" does not work at all for me either. I looked at build.rs under rdkit-sys and it seems to be requesting directories that aren't there in my conda files.
I was previously able to get the other rdkit rust interface -rdkit cffi - to compile, but that interface is relatively limited in features compared to yours.
I would greatly appreciate any help with this issue.
Here is a much better explanation/procedure that should fix any issues with Boost dependencies by building the code yourself from source:
1:
Install the required dependencies of boost libraries, cmake, make, etc. The example they gave in the workflow was the following: sudo apt-get update | sudo apt-get install -y build-essential libssl-dev libboost-iostreams-dev libboost-serialization-dev pkg-config curl tar
I used the boost packages for Rocky Linux 9.5 (Version 1.75.0-10.el9) from the standard @appstream repositories and it worked fine without modification; I think using the pre-compiled libraries creates a lot of issues for people who aren't using that specific version of ubuntu with that specific version of boost and CPU architecture. In a way, it is much easier to just build from source, so that it will work with what is currently installed on your system.
2:
Download an RDKit Release. Go to https://github.com/rdkit/rdkit/releases and download an archive of a suitable release. I choose to use 2024_09_6 since it was similar to the 2024_09_1 version they used but contained some bug fixes.
3:
Extract said archive somewhere, in a temporary location if you want. In my example, we'll call it folder:
/folder/rdkit-Release_2024_09_6 would be the extracted contents of my example archive.
4:
In terminal, navigate to /folder/rdkit-Release_2024_09_6 or the appropriate version/location for you. Enter the commands:
and, finally: sudo make install -j 10
The number after -j meaning how many CPU cores you want to allocate to the build. This part I modified from this dockerfile for the old debian package for this project. Keep this terminal window open to see where the installed files went.
5:
In your cargo project (with rdkit already added as a dependency) in another terminal screen, run "cargo clean" and then "cargo run". If you get an error about missing shared libraries, you just need to add the containing folder to your LD_LIBRARY_PATH. For example, I got this error:
target/debug/rdkit-rust: error while loading shared libraries: libRDKitDataStructs.so.1: cannot open shared object file: No such file or directory
I solved this by adding the /usr/local/lib directory to my LD_LIBRARY_PATH in terminal:
You can put that line in the end of your .bashrc file in your home folder if you don't want to have to put that line through every time you open a terminal to work on your project. Now, cargo run with an example program should work. I hope this helps someone.
#57 replaces the old installation guidance with exact distro-package instructions and CI for Ubuntu 26.04 (RDKit 2025.03.6) and Ubuntu 24.04 (2023.09.3). It documents compiler/dependency headers, runtime loader paths and explicit prefix overrides. Matching RDKit/Boost packages are required; cross-version Boost SONAME symlinks are not a supported fix. Keeping this open until the documentation/build changes land.
Activity
bmp192529 commentedon Apr 8, 2025
bmp192529 commentedon Jun 20, 2025
Here is a much better explanation/procedure that should fix any issues with Boost dependencies by building the code yourself from source:
1:
Install the required dependencies of boost libraries, cmake, make, etc. The example they gave in the workflow was the following:
sudo apt-get update | sudo apt-get install -y build-essential libssl-dev libboost-iostreams-dev libboost-serialization-dev pkg-config curl tarI used the boost packages for Rocky Linux 9.5 (Version 1.75.0-10.el9) from the standard @appstream repositories and it worked fine without modification; I think using the pre-compiled libraries creates a lot of issues for people who aren't using that specific version of ubuntu with that specific version of boost and CPU architecture. In a way, it is much easier to just build from source, so that it will work with what is currently installed on your system.
2:
Download an RDKit Release. Go to https://github.com/rdkit/rdkit/releases and download an archive of a suitable release. I choose to use 2024_09_6 since it was similar to the 2024_09_1 version they used but contained some bug fixes.
3:
Extract said archive somewhere, in a temporary location if you want. In my example, we'll call it folder:
/folder/rdkit-Release_2024_09_6 would be the extracted contents of my example archive.
4:
In terminal, navigate to /folder/rdkit-Release_2024_09_6 or the appropriate version/location for you. Enter the commands:
mkdir buildcd buildand, finally:
sudo make install -j 10The number after -j meaning how many CPU cores you want to allocate to the build. This part I modified from this dockerfile for the old debian package for this project. Keep this terminal window open to see where the installed files went.
5:
In your cargo project (with rdkit already added as a dependency) in another terminal screen, run "cargo clean" and then "cargo run". If you get an error about missing shared libraries, you just need to add the containing folder to your LD_LIBRARY_PATH. For example, I got this error:
target/debug/rdkit-rust: error while loading shared libraries: libRDKitDataStructs.so.1: cannot open shared object file: No such file or directoryI solved this by adding the /usr/local/lib directory to my LD_LIBRARY_PATH in terminal:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/libYou can put that line in the end of your .bashrc file in your home folder if you don't want to have to put that line through every time you open a terminal to work on your project. Now, cargo run with an example program should work. I hope this helps someone.
Add installation and setup instructions
xrl commentedon Oct 9, 2026
#57 replaces the old installation guidance with exact distro-package instructions and CI for Ubuntu 26.04 (RDKit 2025.03.6) and Ubuntu 24.04 (2023.09.3). It documents compiler/dependency headers, runtime loader paths and explicit prefix overrides. Matching RDKit/Boost packages are required; cross-version Boost SONAME symlinks are not a supported fix. Keeping this open until the documentation/build changes land.