Skip to content
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

CMake Path Issue when Using RDKit Conda Install #10

Open
kheyer opened this issue Jan 23, 2021 · 2 comments
Open

CMake Path Issue when Using RDKit Conda Install #10

kheyer opened this issue Jan 23, 2021 · 2 comments

Comments

@kheyer
Copy link

kheyer commented Jan 23, 2021

Thanks for making this available through RDKit!

When I compiled the code, I ran into issues with CMake not finding RDKit libs. I believe this is because I have RDKit installed through Anaconda. Specifically I found ${RDKIT_LIBRARIES} was not set and CMake was picking up a Python install outside of the Anaconda installation I was trying to use. The solution was to add more compile flags:

cmake   -D CMAKE_INSTALL_PREFIX=<install location> \
        -D CMAKE_PREFIX_PATH=$CONDA_PREFIX \
        -D BUILD_RDKIT_SUPPORT=ON \
        -D BUILD_PYTHON_SUPPORT=ON \
        -D RDKIT_INCLUDE_DIR=/anaconda3/envs/myenv/include/rdkit \
        -D Boost_INCLUDE_DIR=/anaconda3/envs/myenv/include \
        -D Python3_FIND_STRATEGY=LOCATION \
        -D PYTHON_INSTDIR=lib/python3.6/site-packages ..

After adding the additional flags, I was able to successfully compile the code.

@TannerW-STX
Copy link

TannerW-STX commented Apr 29, 2021

@kheyer We too had some headaches getting shapeit to compile in conda envs. Thankfully your comment saved us a little time debugging. We also needed to install gxx_linux-64.

Here is a copy and paste of my terminal if it is fruitful for anyone out there:

conda create --name shapeit
conda activate shapeit
conda install -y -c conda-forge rdkit cmake
conda install -y gxx_linux-64
git clone https://github.com/rdkit/shape-it.git
mkdir shape-it_install
cd shape-it
mkdir build && cd build
cmake -D CMAKE_PREFIX_PATH=$CONDA_PREFIX \
-D CMAKE_INSTALL_PREFIX=<path>/shape-it_install/ \
-D BUILD_RDKIT_SUPPORT=ON \
-D BUILD_PYTHON_SUPPORT=ON \
-D PYTHON_INSTDIR=$CONDA_PREFIX/lib/python3.9/site-packages \
-D Boost_INCLUDE_DIR=$CONDA_PREFIX/include/Boost \
-D RDKIT_INCLUDE_DIR=$CONDA_PREFIX/include/rdkit \
-D Python3_FIND_STRATEGY=LOCATION ..
make -j12
make install

@dww100
Copy link

dww100 commented Nov 10, 2021

Doing this today required a small edit - changing the Boost include directory:

-D Boost_INCLUDE_DIR=$CONDA_PREFIX/include/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants