pkgsrc-Users archive

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

Re: Incorrect logic in mk/pkgformat/pkg/metadata.mk



* On 2019-08-02 at 14:51 BST, Aleksej Lebedev wrote:

> I already wrote about a problem in the logic in
> mk/pkgformat/pkg/metadata.mk that sometimes brings spurious
> dependencies on shared libraries from ${DESTDIR}.
> 
> I couldn't fix the problem, but because these dependencies appeared
> only when we (in TomTom) build our own packages that are simply
> re-packaged BLOBS (like various components of androd-ndk, etc) we
> "solved" the problem by adding CHECK_SHLIBS_SUPPORTED=no.
> 
> There is still (at least) one more problem with metadata.mk. I am
> quite confident that it's a bug - not intended behavior.  When
> REQUIRES list is generated as part of "package" target, ldd gets
> executed on all binaries that belong to the package and all the
> dependencies are added to REQIRES list and then printed to
> +BUILD_INFO.
> 
> Now because the rpath passed to the linker is pointing to
> ${PREFIX}/lib, not to ${DESTDIR}${PREFIX}/lib, ldd never find the
> libraries from the package itself. And that would be OK, because
> libraries from the package should not belong to REQUIRES list (and
> should not be listed in +BUILD_INFO). However, if there happen to be
> a system library with the same name it does get picked up by ldd and
> put to +BUILD_INFO as a result.

We made a change a few years ago to record REQUIRES directly based on
NEEDED entries rather than relying on ldd, you may be able to modify
it to use a binutils equivalent and see if it solves your issue:

  https://github.com/joyent/pkgsrc/commit/a785eebc1e68ad556e442c7a41ea897f81c7af41#diff-27d03f2eb631cbd3086d5818e9d793a3

Cheers,

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


Home | Main Index | Thread Index | Old Index