[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: llvm with pkgsrc libexecinfo
On 2020-09-07, Edgar Fuß <ef%math.uni-bonn.de@localhost> wrote:
>> This causes it to find libexecinfo in the real /usr/pkg
> I guess this needs to be patched out. Or we need a Cmake wrapper to stop
It's a bit tricky, since when used outside of pkgsrc, you *do* want
cmake to search for libraries in /usr/pkg.
I see that pkgsrc supplies cmake with a custom UnixPaths.cmake module
which appends the BUILDLINK_DIR paths into CMAKE_SYSTEM_INCLUDE_PATH
and CMAKE_SYSTEM_LIBRARY_PATH. I tried altering those to replace the
variables instead of appending to them in hopes that this would
prevent cmake from finding libraries in /usr/pkg that are not present
in BUILDLINK_DIR. However, this didn't seem to work.
It turns out that this is due to cmake policy CMP0017 . Projects
that use cmake_required_version higher than 2.8.4 automatically have
this policy, which causes the pkgsrc
mk/cmake-Modules/Platform/UnixPaths.cmake to be ignored in favor of
the original. As a result, dependencies are detected based on their
presence in /usr/pkg alone, and then it is assumed that they will be
found in BUILDLINK_DIR after the wrapper transformations.
I am not really sure how this situation can be improved. But
regardless of all this, I think Greg is right in that it is better for
llvm to be built with backtrace support. Adding
libexecinfo/buildlink3.mk to llvm/Makefile will fix the immediate
issue on platforms such as linux-musl, while preserving the existing
behavior on the others.
Main Index |
Thread Index |