From 79fc326197e14d6b29ae4f2e187eb3c80f8104d9 Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Fri, 11 Sep 2026 10:43:12 +0200 Subject: [PATCH 1/3] boost: Add version 1.92.0 Update to the latest upstream release, 1.92.0 from 2026-08-05. Bind Boost.Python against python-3.14.6-2, the newest installed Python package, instead of the no longer current python-3.11.7-1. Assisted-by: Claude Opus 5 --- boost-1.92.0-0.build.sh | 64 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100755 boost-1.92.0-0.build.sh diff --git a/boost-1.92.0-0.build.sh b/boost-1.92.0-0.build.sh new file mode 100755 index 0000000..331a9fb --- /dev/null +++ b/boost-1.92.0-0.build.sh @@ -0,0 +1,64 @@ +#! /bin/bash + +# COOKIE=$(mcookie|cut -c-8); grep -v V_GREP_ME $0 > /dev/shm/runme-$COOKIE.sh ; sleep 1; exec bash /dev/shm/runme-$COOKIE.sh +# TESTING=1 + +PKG=boost +VERSION=1.92.0 +VERSION_USCORED=1_92_0 +BUILD=0 +PYTHONPKG=python-3.14.6-2 + +PREFIX=/pkg/$PKG-$VERSION-$BUILD +if [ -n "$TESTING" ]; then PREFIX=/scratch/local2/$PKG-$VERSION-$BUILD ; fi + +PATH=/bin:/usr/bin:/usr/sbin:/usr/local/bin + +set -xe +umask 022 + +BUILD_TMPDIR=/scratch/local2/$PKG-$VERSION-$BUILD.build.tmp +test -d $BUILD_TMPDIR && ( chmod -R u+rwx $BUILD_TMPDIR || true ; rm -rf $BUILD_TMPDIR ) +mkdir -p $BUILD_TMPDIR/home +export TMPDIR=$BUILD_TMPDIR +export HOME=$BUILD_TMPDIR/home + +exec $PREFIX/profile <<-EOF + if [ -d $PREFIX/.compatlibs ]; then export LD_LIBRARY_PATH=$PREFIX/.compatlibs\${LD_LIBRARY_PATH:+:}\$LD_LIBRARY_PATH ; fi +EOF + +source $PREFIX/profile + +B2FLAGS="-j $(($(nproc)*4/5+1))" + +BUILDDIR=$PREFIX/build + +mkdir -p $BUILDDIR +cd $BUILDDIR + +# orig: https://archives.boost.io/release/1.92.0/source/boost_1_92_0.tar.gz +test -e boost_$VERSION_USCORED.tar.gz || wget --no-verbose https://beehive.molgen.mpg.de/7cd6dfc5bf3e8ef694808e5640411e5c/boost_1_92_0.tar.gz +test -d boost_$VERSION_USCORED || tar -xf boost_$VERSION_USCORED.tar.gz +cd boost_$VERSION_USCORED + +./bootstrap.sh \ + --prefix=${PREFIX} \ + --with-python=/pkg/$PYTHONPKG/bin/python3 + +./b2 \ + $B2FLAGS \ + --prefix=$PREFIX \ + --enable-shared \ + --without-mpi \ + install + +# someday I'll find out how to set LDFLAGS in boost +cd $PREFIX/lib +for SO in *$VERSION ; do + patchelf --set-rpath $PREFIX/lib $SO +done + +exit From c1f4570df75948f75c329b60bf502238a95a0da8 Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Fri, 11 Sep 2026 11:02:24 +0200 Subject: [PATCH 2/3] boost-1.92.0-0: Verify the checksum of the downloaded source The script trusted whatever the mirror returned. A truncated download or a swapped object on beehive would have been fed straight into tar, and because the tarball is kept in $BUILDDIR a partial file also survived into every later run. No new constant is needed: the md5 sum is already the path component of the beehive URL, so read it back out with basename/dirname. The URL stays a single literal that can be pasted from the md5repo.sh output unchanged, and the sum can never fall out of step with the object it names. Run on every invocation, not just after a fresh download, so a bad cached tarball is caught too. With set -e a mismatch aborts before tar. Checked both directions against the local copy: boost_1_92_0.tar.gz: OK boost_1_92_0.tar.gz: FAILED md5sum: WARNING: 1 computed checksum did NOT match GNU coreutils recommends cksum -a md5 over md5sum these days, but /bin here is coreutils 8.31, whose cksum predates -a and does CRC only: cksum: invalid option -- 'a' Assisted-by: Claude Opus 5 --- boost-1.92.0-0.build.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/boost-1.92.0-0.build.sh b/boost-1.92.0-0.build.sh index 331a9fb..1eca750 100755 --- a/boost-1.92.0-0.build.sh +++ b/boost-1.92.0-0.build.sh @@ -40,7 +40,11 @@ mkdir -p $BUILDDIR cd $BUILDDIR # orig: https://archives.boost.io/release/1.92.0/source/boost_1_92_0.tar.gz -test -e boost_$VERSION_USCORED.tar.gz || wget --no-verbose https://beehive.molgen.mpg.de/7cd6dfc5bf3e8ef694808e5640411e5c/boost_1_92_0.tar.gz +URL=https://beehive.molgen.mpg.de/7cd6dfc5bf3e8ef694808e5640411e5c/boost_1_92_0.tar.gz + +test -e boost_$VERSION_USCORED.tar.gz || wget --no-verbose $URL +# the md5 sum of the tarball is the path component of the beehive URL +echo "$(basename $(dirname $URL)) boost_$VERSION_USCORED.tar.gz" | md5sum -c - test -d boost_$VERSION_USCORED || tar -xf boost_$VERSION_USCORED.tar.gz cd boost_$VERSION_USCORED From e40d698b2633a3848f12383cbcf3d7729327f818 Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Fri, 11 Sep 2026 10:50:53 +0200 Subject: [PATCH 3/3] boost-1.92.0-0: Fail loudly if no library matches the rpath glob MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The rpath fixup iterated over *$VERSION. An unmatched glob expands to the pattern itself, test -e is not consulted, and patchelf was handed a name that does not exist. Under set -x that one error scrolled past in a very long log, and the loop’s exit status was that of the last iteration, so a naming change upstream would have shipped libraries without an rpath and the build would still have reported success. Anchor the glob at libboost_*.so.$VERSION, break out when the pattern fails to match, and abort if nothing was patched at all. Replayed against the installed /pkg/boost-1.86.0-0/lib with patchelf stubbed out; new and old glob select the same set: matched 43 libraries 43 and the unmatched case now stops the build instead of limping on: no libboost_*.so.9.99.9, rpath left unset rc=1 Assisted-by: Claude Opus 5 --- boost-1.92.0-0.build.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/boost-1.92.0-0.build.sh b/boost-1.92.0-0.build.sh index 1eca750..6613e20 100755 --- a/boost-1.92.0-0.build.sh +++ b/boost-1.92.0-0.build.sh @@ -61,8 +61,15 @@ cd boost_$VERSION_USCORED # someday I'll find out how to set LDFLAGS in boost cd $PREFIX/lib -for SO in *$VERSION ; do - patchelf --set-rpath $PREFIX/lib $SO +SOFOUND= +for SO in libboost_*.so.$VERSION ; do + test -e "$SO" || break + patchelf --set-rpath $PREFIX/lib "$SO" + SOFOUND=yes done +if [ -z "$SOFOUND" ]; then + echo "$0: no libboost_*.so.$VERSION in $PREFIX/lib, rpath left unset" >&2 + exit 1 +fi exit