tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: cmake radical proposal



* On 2021-10-18 at 15:51 BST, Greg Troxel wrote:

Jonathan Perkin <jperkin%joyent.com@localhost> writes:

* On 2021-10-16 at 18:22 BST, Greg Troxel wrote:

Thomas Klausner <wiz%NetBSD.org@localhost> writes:

I don't think that cmake is doing a relinking step during installation
(like e.g. libtool). So having /path/to/build/dir in the rpath at all
seems wrong to me.

I used to think that too, but I have seen the scheme I describe in
action with geos (3.10, not yet in pkgsrc) as verified by objdump -x.

Are you explicitly running with PKG_DEVELOPER turned off or something?

no

Leaking RPATHs to the build dir is obviously completely broken, and
check-shlibs should be catching that unless we're hitting a bug
somewhere.

I think we aren't understanding each other.

In order to be able to runs tests in the build directory, there has to
be some scheme for build directory binaries to get not-yet-installed
shlibs from the build directory.  cmake does that by including RPATH of
the build directory.

When the install step happens, binaries seem to be relinked and the
files that are in work/.destdir/usr/pkg/{bin,lib} and so on have RPATH
that has /usr/pkg/lib but does not have any references to the build
directory.

Are you saying that having RPATH to the build dir *before installation*
to support testing is wrong?  I don't agree (as a pkgsrc viewpoint
treating cmake as an immovable object).

Or just that if something is *installed* and has a build dir ref, then
that's a bug.  That I agree with and didn't mean to suggest otherwise.

As long as the installed artefacts don't have any references to the work area then it shouldn't matter (compared to having them correct at build time and using a temporary LD_LIBRARY_PATH for running in-tree tests).

It just wasn't clear from the discussion that this was the case.

I'd suggest coming up with a diff and running a bulk build against a known baseline so you can see if there are any regressions caused by the change. I find it easier to reason about a change if I have that first.

--
Jonathan Perkin  -  Joyent, Inc.  -  www.joyent.com


Home | Main Index | Thread Index | Old Index