tech-pkg archive

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

Support for CHECK_SHLIBS_INDIRECT



Now that 2024Q3 is done, I'd like to get this patch in so that folks can enable it in their builds and help to expose issues.

I've updated the patch based on some of the feedback, and made it conditional on CHECK_SHLIBS_INDIRECT so that the current behaviour remains the default (though we really should eventually fix that).

This is the current patch:

  https://github.com/TritonDataCenter/pkgsrc/commit/3542a7e45f02635c533c851163375ce56117d91d

If anyone wants a really obvious test case, net/fetch with the "openssl" option enabled is a good one (though only if openssl comes from pkgsrc).

Current pkgsrc, or with the patch and CHECK_SHLIBS_INDIRECT disabled:

  $ bmake install
  [...]
  => Checking for missing run-time search paths in fetch-1.9nb2
  => Checking for work-directory references in fetch-1.9nb2
  => Creating binary package /work/git/pkgsrc/net/fetch/work/.packages/fetch-1.9nb2.tgz

Apparently the binary package is perfect! However, with CHECK_SHLIBS_INDIRECT=yes enabled we can see that it's broken:

  $ bmake install
  [...]
  => Checking for missing run-time search paths in fetch-1.9nb2
  ERROR: bin/fetch: /opt/pkg/lib/libcrypto.3.dylib: openssl-3.3.2 is not a runtime dependency
  ERROR: bin/fetch: /opt/pkg/lib/libssl.3.dylib: openssl-3.3.2 is not a runtime dependency
  *** Error code 1

This is because net/libfetch/buildlink3.mk sets:

  BUILDLINK_DEPMETHOD.libfetch?=	build

which causes openssl to also inherit DEPMETHOD=build, resulting in a fetch package that links against openssl but does not list openssl as a runtime dependency.

Remember folks, BUILDLINK_DEPMETHOD=build is actively harmful.

Thanks,

--
Jonathan Perkin   -   mnx.io   -   pkgsrc.smartos.org
Open Source Complete Cloud   www.tritondatacenter.com


Home | Main Index | Thread Index | Old Index