-
Notifications
You must be signed in to change notification settings - Fork 996
rdkit 2021.09.4 fails to build due to failure to install fonts #4892
Description
Describe the bug
When attempting to compile the latest version of rdkit (2021.09.4), a CMake issue prevents the compilation from proceeding. The offending code downloads a font bundle from google fonts, and checks the md5sum against a known value to ensure that the download has not been compromised. I guess google must have updated the bundles on their sir (I'm guessing to bump the copyright to 2022), but the hashes are not matching. after patching the hash value to the one that the error message reports, compilation proceeds smoothly. The error report was:
Downloading https://fonts.google.com/download?family=Comic%20Neue...
CMake Error at Code/cmake/Modules/RDKitUtils.cmake:235 (MESSAGE):
The md5 checksum for
$HOME/rdkit/Code/GraphMol/MolDraw2D/Comic_Neue.zip
is incorrect; expected: 23ed3f833c1ae0adb141a26b4a30d73e, found:
850b0df852f1cda4970887b540f8f333
Call Stack (most recent call first):
Code/GraphMol/MolDraw2D/CMakeLists.txt:16 (downloadAndCheckMD5)
-- Configuring incomplete, errors occurred!
See also "$HOME/rdkit/build/CMakeFiles/CMakeOutput.log".
See also "$HOME/rdkit/build/CMakeFiles/CMakeError.log".
ERROR: cmake failed. See output above for details.
To Reproduce
my installer script looks like this:
wget https://github.com/rdkit/rdkit/archive/Release_2021_09_4.tar.gz -O rdkit.tgz \
&& mkdir $RDBASE \
&& tar xzvf rdkit.tgz -C $RDBASE --strip-components 1 \
&& cd $RDBASE \
&& mkdir build \
&& cd build \
&& cmake -DRDK_BUILD_INCHI_SUPPORT=ON -DPYTHON_EXECUTABLE=/usr/bin/python3 -DPYTHON_INCLUDE_DIR=/usr/include/python3.8 -DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.8.so .. \
&& make \
&& make install
Expected behavior
The code should be looking for the current version of the hash instead of an older one... or we should self-host the font somehow.
Configuration (please complete the following information):
- RDKit version: 2021.09.4
- OS: [e.g. Ubuntu 20.04] ubuntu 20.04 (both within docker and in regular env)
- Python version (if relevant): 3.8
- Are you using conda? No
- If you are using conda, which channel did you install the rdkit from? N/A
- If you are not using conda: how did you install the RDKit? I'm attempting to build from source
Additional context
the following bash one-liner fixed the issue for me:
sed 's/23ed3f833c1ae0adb141a26b4a30d73e/850b0df852f1cda4970887b540f8f333/g' Code/GraphMol/MolDraw2D/CMakeLists.txt > Code/GraphMol/MolDraw2D/CMakeLists.txt