Upgrading catch-22
Matthew Seaman
matthew at FreeBSD.org
Sun Oct 2 09:03:17 UTC 2016
Dear all,
Here's a bit of a trap you can get into when upgrading to 12-CURRENT.
I've a 12-CURRENT VM which I last upgraded right after 11-STABLE was
branched, and current switched from 11 to 12. Now I've come to rebuild
base and create a new set of base packages, and I observe this in the
output from 'make packages':
===> zlib (install)
install -U -M /usr/obj/usr/src/amd64.amd64/kernelstage//kernel.premeta
-D /usr/obj/usr/src/amd64.amd64/kernelstage -T release -o root -g wheel
-m 555 zlib.ko
/usr/obj/usr/src/amd64.amd64/kernelstage/kernel/boot/kernel/
install -U -M /usr/obj/usr/src/amd64.amd64/kernelstage//kernel.premeta
-D /usr/obj/usr/src/amd64.amd64/kernelstage -T debug -o root -g wheel -m
555 zlib.ko.debug
/usr/obj/usr/src/amd64.amd64/kernelstage/kernel/usr/lib/debug/boot/kernel/
kldxref /usr/obj/usr/src/amd64.amd64/kernelstage/kernel/boot/kernel
===> Creating FreeBSD-acct-debug-12.0.s20161001100232
/lib/libc.so.7: version FBSD_1.5 required by /usr/local/lib/libpkg.so.3
not found
/lib/libc.so.7: version FBSD_1.5 required by /usr/local/lib/libpkg.so.3
not found
*** Error code 1
Stop.
make[5]: stopped in /usr/src
*** Error code 1
Stop.
make[4]: stopped in /usr/src
*** Error code 1
Stop.
make[3]: stopped in /usr/src
*** Error code 1
Stop.
make[2]: stopped in /usr/src
*** Error code 1
Stop.
make[1]: stopped in /usr/src
*** Error code 1
Stop.
make: stopped in /usr/src
Yeah -- turns out updating pkg(8) from the repos right before updating
the base system was not a particularly good idea, as now pkg expects an
ABI version from libc newer than what was installed.
So, I need to install the new package with the latest libc.so so I can
run pkg to install the new package with the latest libc.so... Catch 22.
I got around the problem relatively easily by symlinking pkg to pkg-static:
# ls -l /usr/local/sbin/pkg*
lrwxr-xr-x 1 root wheel 10 Oct 1 11:11 /usr/local/sbin/pkg@ ->
pkg-static
-rwxr-xr-x 1 root wheel 172368 Sep 25 14:50 /usr/local/sbin/pkg-dynamic*
-rwxr-xr-x 1 root wheel 5845512 Sep 25 14:50 /usr/local/sbin/pkg-static*
-r-xr-xr-x 1 root wheel 3913 Sep 25 14:50 /usr/local/sbin/pkg2ng*
I know that in general you want to use the dynamically linked version of
pkg(8), because you can't do the dynamic linkage analysis to find out
what shlibs are provided and required by various binaries otherwise.
However, in order to extract oneself from this sort of mess, it would be
really handy to be able to say:
# make PKG_CMD=/usr/local/sbin/pkg-static packages
# pkg-static upgrade
Seems that the literal command 'pkg' is used everywhere. Change that to
provide a ${PKG_CMD} variable that can be overridden.
https://reviews.freebsd.org/D8120
Cheers,
Matthew
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 931 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-pkgbase/attachments/20161002/c408f7af/attachment.sig>
More information about the freebsd-pkgbase
mailing list