Open jabraham17 opened 2 days ago
Maybe a dumb question, but can we have chapel-py
use cmake?
Not a dumb question, I think chapel-py
using cmake is a possibility. We use setuptools because that is simplest and requires the least extra dependencies. Based on https://packaging.python.org/en/latest/guides/tool-recommendations/#build-backends, [scikit-build-core](https://packaging.python.org/en/latest/key_projects/#scikit-build-core)
may be a good alternative that allows us to use CMake.
However, I am not sure just switching to CMake solves the problem automatically. We would still need to handle the different install scenarios and integrate with our existing chpl-venv stuff. But I would also like to see us improve the build system for chapel-py
so this may be a good opportunity.
However, I am not sure just switching to CMake solves the problem automatically.
We still need to pay attention to it and plan for it in the cmake sources. But the fact that CMake has builtin support for doing rpath adjustments when installing means we can get that as well without having to get too fancy with scripts etc.
When non-cmake related binaries are built, they use the RPATHs from the
chpl
compiler in the source tree. If the RPATHs are embedded in the binary, then if those binaries are installed they will have the wrong paths.For binaries like
chpl
andlibFrontendShared
, cmake handles the fixups needed for the RPATHs. However, something likechapel-py
does not use cmake, and so will have the wrong RPATH.Steps to replicate
This problem exists for something like the linux packages, but is worked around by running
util/packaging/common/fixpaths.py
as a post-processing step.However, this problem exists for users who may wish to run
make install
themselves. To fix this, I think we can just move thefixpaths
script out of the packaging builds and intoutil/buildRelease/install.sh
Related issue: https://github.com/chapel-lang/chapel/issues/25356