conda-forge / rdkit-feedstock

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

build py310hd272ba4_1 of the osx-arm64 package for RDKit 2022.09.1 includes a broken cmake config file #114

Open rvianello opened 1 year ago

rvianello commented 1 year ago

Solution to issue cannot be found in the documentation.

Issue

The cmake configuration file /lib/cmake/rdkit/rdkit-targets.cmake available with build py310hd272ba4_1 of the osx-arm64 package for RDKit 2022.09.1 contains an invalid path that references the _build_env environment that was presumably available when the package was created:

/Users/runner/miniforge3/conda-bld/rdkit_1666713427998/_build_env/venv/lib/python3.10/site-packages/numpy/core/include

Relocation doesn't apply to this path when the RDKit package is installed into a conda environment and the cmake configuration of a project that uses this config file fails with error messages similar to the following

Imported target "RDKit::MolHash" includes non-existent path

  "/Users/runner/miniforge3/conda-bld/rdkit_1666713427998/_build_env/venv/lib/python3.10/site-packages/numpy/core/include"

in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:

* The path was deleted, renamed, or moved to another location.

* An install or uninstall procedure did not complete successfully.

* The installation package was faulty and references files it does not
provide.

The problem appears to be specific to the cross-compilation of the osx-arm64 package and I suspect it could be due to RDKit's FindNumpy.cmake using the python interpreter and numpy package that are found installed with the build requirements, instead of the host ones.

Installed packages

not relevant

Environment info

not relevant