tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Add Mach-O support to check-shlibs
Hey all,
This commit adds support for Mach-O executables to our check-shlibs
checks, ensuring that we do not ship packages with broken REQUIRES:
https://github.com/joyent/pkgsrc/commit/8d8413b
check-shlibs-macho.awk is mostly a copy of check-shlibs-elf.awk but
uses otool(1) to sanitise the list of shared library dependencies.
The commit changes some variables, primarily:
USE_CHECK_SHLIBS_ELF -> _USE_CHECK_SHLIBS_NATIVE
While this was set up to be a public variable, I think it's highly
unlikely that anyone is using it, and changing it is only masking
broken _OPSYS_CAN_CHECK_SHLIBS settings in platform files which should
be fixed anyway. If users really want to disable the shlibs checks,
then there is still the documented CHECK_SHLIBS variable.
Prior to this check, some of the packages I've been distributing in
our OSX package sets are broken, e.g.:
$ pkgin in tdb
calculating dependencies... done.
/Users/pbulk/build/databases/tdb/work/tdb-1.3.4/bin/default/libtdb.inst.dylib, needed by tdb-1.3.4 is not present in this system.
/Users/pbulk/build/databases/tdb/work/tdb-1.3.4/bin/default/libtdb.dylib, needed by tdb-1.3.4 is not present in this system.
$ pkgin in pev
calculating dependencies... done.
libpe.1.0.dylib, needed by pev-0.70 is not present in this system.
This is due to incorrect use of the -install_name argument to the
Darwin linker. Building those packages with my patch applied
correctly fails the packages at check time, ensuring we do not ship
broken packages:
$ cd security/pev
$ bmake _check-shlibs
=> Checking for missing run-time search paths in pev-0.70
ERROR: bin/ofs2rva: missing library: libpe.1.0.dylib
...
*** Error code 1
$ cd databases/tdb
$ bmake _check-shlibs
=> Checking for missing run-time search paths in tdb-1.3.4
ERROR: lib/libtdb.1.3.4.dylib: path relative to WRKDIR
*** Error code 1
This has been tested in a full bulk build on SmartOS, and I am in the
process of testing it in a full bulk build on OSX.
Please review. Thanks!
--
Jonathan Perkin - Joyent, Inc. - www.joyent.com
Home |
Main Index |
Thread Index |
Old Index