tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Convert libnbcompat to regular buildlink3
Currently pkgtools/libnbcompat is implemented in such a way that every
package that requires it will build its own private copy of the static
library and pull it in.
This is a waste of time and resources, and during a --full bootstrap
means we build 5 identical copies of libnbcompat.
I have a diff which converts it to a regular buildlink3 dependency,
and patches packages to pull it in as a BUILD_DEPENDS and find the
installed headers instead of the inplace ones:
https://github.com/joyent/pkgsrc/commit/61ab01a01e32a27ceeba3e07dee4b66839d9535d
On SmartOS with "./bootstrap --full" this takes us down from 5 builds
to 2, and the time to bootstrap from:
real 8:38.8
user 4:16.3
sys 2:48.0
to this:
real 6:49.6
user 3:27.5
sys 2:09.4
This also helps NetBSD bootstrap. A default "./bootstrap" on NetBSD
6.1.5 will build 3 copies:
/tmp/pkgsrc/libnbcompat
/tmp/pkgsrc/wrk/pkgtools/pkg_install/work/libnbcompat
/tmp/pkgsrc/wrk/devel/bmake/work/libnbcompat
taking:
48.54 real 27.00 user 14.43 sys
whereas with the patch applied it builds only two:
/tmp/pkgsrc/libnbcompat
/tmp/pkgsrc/wrk/pkgtools/libnbcompat
and takes:
42.95 real 23.36 user 12.74 sys
I have tested this in a full bulkbuild here:
https://us-east.manta.joyent.com/pkgsrc/public/reports/upstream-bulktest/20150708.1604/meta/report.html
and cannot find any fallout, other than existing nbcompat-related
failures which I will be fixing shortly.
Two possible issues with the patch that I can think of are:
- We have to add pkgtools/libnbcompat as an exclusion for
USE_CWRAPPERS=yes to avoid circular dependencies. Maybe we want to
add a package-settable variable to disable cwrappers rather than
hardcoding PKGPATHs in bsd.prefs.mk.
- It removes the nascent support for LIBNBCOMPAT_USE_PIC which tnn@
introduced 7 years ago. That work, as far as I can see, was never
finished anyway, and there's no particular reason why my work would
prevent a similar feature to be introduced in the future.
Please review.
Thanks,
--
Jonathan Perkin - Joyent, Inc. - www.joyent.com
Home |
Main Index |
Thread Index |
Old Index