conda-forge / rdkit-feedstock

A conda-smithy repository for rdkit.
BSD 3-Clause "New" or "Revised" License
8 stars 22 forks source link

the windows rdkit package installs incomplete cmake config files #60

Open rvianello opened 3 years ago

rvianello commented 3 years ago

Issue: I'm trying to use the rdkit conda-forge packages to build a C/C++ package that depends from RDKit. This apparently works fine on linux and osx (*), but fails at cmake configuration stage on windows. Based on some initial investigation, I suspect the problem is related to the approach used in producing a dev subpackage for this platform.

The rdkit package is built on windows with RDK_INSTALL_DEV_COMPONENT=OFF, and I think this implies that the installation rule for the library targets are not executed, which means the corresponding targets are not exported into the generated Library/lib/cmake/rdkit/rdkit-targets.cmake. CMake projects that rely on the rdkit-config.cmake file are therefore unable to configure successfully (this is independent from the availability of headers and libraries from a separate package, because the problem occurs at configuration time).

Please feel free to consider this issue with a very low priority. It's very unlikely to affect many users, and I'm not looking at windows with a particularly urgent interest. I think the problem could be addressed in a couple of ways, but some changes in the upstream cmake scripts could also make things easier. If I find the time I might try to explore a bit of these options.


Environment: rdkit 2020.09.1

(*) anyways, my user experience with the linux and osx packages was so far just excellent, thanks a lot for your work on this project and making rdkit available in conda-forge.

mcs07 commented 3 years ago

Does it help to depend on the rdkit-dev package? https://anaconda.org/conda-forge/rdkit-dev

The following issues/PRs resulted in this separation: https://github.com/conda-forge/rdkit-feedstock/issues/15 https://github.com/conda-forge/rdkit-feedstock/pull/16 https://github.com/conda-forge/rdkit-feedstock/issues/36 https://github.com/conda-forge/rdkit-feedstock/pull/46 https://github.com/conda-forge/rdkit-feedstock/pull/47

Edit: Just read your post more closely, I see that the cmake files aren't in the rdkit-dev package so this probably won't help. That should probably be fixed.

rvianello commented 3 years ago

Yes, the cmake config files are not in the rdkit-dev package (although it would probably make sense to move them in there). They are generated at cmake configuration time, and I'm afraid they will require to run cmake with RDK_INSTALL_DEV_COMPONENT=ON, which means that the strategy for performing a two steps installation may probably require some changes.