I am rebuilding my packages on 8.0, and I notice that all packages that
have USE_LANGUAGES += c++ now depend on the package lang/gcc5-libs.
Why is that? The base system compiler is gcc 5, so it would have its
libraries already installed.
Furthermore, when initializing my pkg_comp1 chroot, some weird stuff
happens with libkver, and as a result, cwrappers gets installed weirdly:
pkg_comp:default.conf# pkg_info -L cwrappers
Information for cwrappers-20180325:
Files:
/libkver/libexec/cwrappers/as-wrapper
/libkver/libexec/cwrappers/c++-wrapper
/libkver/libexec/cwrappers/cc-wrapper
/libkver/libexec/cwrappers/cpp-wrapper
/libkver/libexec/cwrappers/f77-wrapper
/libkver/libexec/cwrappers/imake-wrapper
/libkver/libexec/cwrappers/ld-wrapper
/libkver/libexec/cwrappers/libtool-wrapper
/libkver/libexec/cwrappers/shlibtool-wrapper
As a result of that, the libtool wrapper (among others) is not found
when packages need it, and many won't build.
The issue is that when libkver builds/installs itself, it sets a custom
value for PREFIX (/libkver). But the build of cwrappers inherits this.
Below is from a log from pkg_comp makeroot. Note the segmentation faults.
Those seem to occur because libkver doesn't like it when it doesn't know
which kernel version to report.
I have a patch at the end.
murthe:~/pkg_comp$ Pkg_comp makeroot
PKG_COMP ==> Creating sandbox `/scratch/chroot/pkg_comp.amd64-8.0/default'
...
=> Creating binary package /pkg_comp/packages/All/libkver-0.7.2.tgz
===> su-real-package-install [libkver-0.7.2] ===> Installing binary package of libkver-0.7.2
===> su-do-clean [libkver-0.7.2] ===> Cleaning for libkver-0.7.2
PKG_COMP ==> Unmounting sandboxed filesystems
Still in use (maybe by another pkg_comp process?)
PKG_COMP ==> Generating pkg_summary.tgz
make: libkver: not configured
uname: libkver: not configured
uname: libkver: not configured
uname: libkver: not configured
uname: libkver: not configured
uname: libkver: not configured
[1] Segmentation fault /usr/sbin/pkg_in...
[1] Segmentation fault /usr/sbin/pkg_ad...
[1] Segmentation fault /usr/sbin/pkg_ad...
[1] Segmentation fault /usr/sbin/pkg_ad...
[1] Segmentation fault /usr/sbin/pkg_ad...
[1] Segmentation fault /usr/sbin/pkg_in...
[1] Segmentation fault /usr/sbin/pkg_in...
make: libkver: not configured
uname: libkver: not configured
uname: libkver: not configured
uname: libkver: not configured
[1] Segmentation fault /usr/sbin/pkg_ad...
[1] Segmentation fault /usr/sbin/pkg_ad...
[1] Segmentation fault /usr/sbin/pkg_ad...
[1] Segmentation fault /usr/sbin/pkg_ad...
[1] Segmentation fault /usr/sbin/pkg_ad...
[1] Segmentation fault /usr/sbin/pkg_ad...
[1] Segmentation fault /usr/sbin/pkg_ad...
[1] Segmentation fault /usr/sbin/pkg_ad...
test: 20090528: unexpected operator
[1] Segmentation fault /usr/bin/env PKG...
[1] Segmentation fault pkg_info -E ${pk...
PKG_COMP ==> Forcing installation of libkver-0.7.2
[1] Segmentation fault (core dumped) pkg_add ${pkgname}
PKG_COMP ==> Unmounting sandboxed filesystems
Executing umount hooks.
PKG_COMP ==> Mounting sandboxed filesystems
Patch:
--- pkg_comp.sh 2018-04-05 22:39:50.073220877 +0200
+++ /usr/pkg/sbin/pkg_comp 2018-08-04 18:56:21.269382105 +0200
@@ -621,6 +621,13 @@
local prefix script statfile
if [ "$NETBSD_RELEASE" != "no" ]; then
+ # Build cwrappers before libkver, because it is a dependency and
+ # we don't want it to use the non-standard PREFIX from libkver.
+ build_and_install pkgtools/cwrappers
+
+ # Configure libkver so that it works immediately when installed.
+ ln -s "$NETBSD_RELEASE" $DESTDIR/libkver_osrelease
+
_BUILD_PKG_COMP_TARGET="$BUILD_PKG_COMP_TARGET"
BUILD_PKG_COMP_TARGET="standalone-install"
build_and_install pkgtools/libkver
@@ -628,7 +635,6 @@
echo "LD_PRELOAD=${LIBKVER_STANDALONE_PREFIX}/lib/libkver.so; export LD_PRELOAD" >> $DESTDIR/etc/shrc
echo "setenv LD_PRELOAD ${LIBKVER_STANDALONE_PREFIX}/lib/libkver.so" >> $DESTDIR/etc/csh.login
echo "setenv LD_PRELOAD ${LIBKVER_STANDALONE_PREFIX}/lib/libkver.so" >> $DESTDIR/etc/csh.cshrc
- ln -s "$NETBSD_RELEASE" $DESTDIR/libkver_osrelease
fi
}
-Olaf.
--
___ Olaf 'Rhialto' Seibert -- Wayland: Those who don't understand X
\X/ rhialto/at/falu.nl -- are condemned to reinvent it. Poorly.
Attachment:
signature.asc
Description: PGP signature