From e96054e2a3b2a9b5626a3f018bf81ebafdb7927d Mon Sep 17 00:00:00 2001 From: Oliver Smith Date: Mon, 1 Jun 2026 15:08:35 +0200 Subject: [PATCH] systemd/systemd-stage0: depend on libucontext When building dbus against systemd-stage0, we need to have libucontext installed. Since systemd-stage0 uses !tracedeps, it needs to be specified manually in depends. I've reproduced the build error locally and verified that this fixes it. Fix for: [195/243] Linking target test/manual-test-thread-blocking ninja: job failed: cc -o test/test-sd-activation test/test-sd-activation.p/sd-activation.c.o -Wl,--as-needed -Wl,--no-undefined -pie -Wl,--as-needed,-O1,--sort-common -Wl,-z,pack-relative-relocs -Os -fstack-clash-protection -Wformat -Werror=format-security '-Wl,-rpath,$ORIGIN/../dbus' -Wl,--start-group test/libdbus-testutils.a dbus/libdbus-1.so.3.38.3 dbus/libdbus-internal.a /usr/lib/libglib-2.0.so /usr/lib/libintl.so /usr/lib/libgio-2.0.so /usr/lib/libgobject-2.0.so -pthread /usr/lib/libsystemd.so -Wl,--end-group /usr/lib/gcc/aarch64-alpine-linux-musl/15.2.0/../../../../aarch64-alpine-linux-musl/bin/ld: warning: libucontext.so.1, needed by /usr/lib/libsystemd.so, not found (try using -rpath or -rpath-link) /usr/lib/gcc/aarch64-alpine-linux-musl/15.2.0/../../../../aarch64-alpine-linux-musl/bin/ld: /usr/lib/libsystemd.so: undefined reference to `swapcontext' /usr/lib/gcc/aarch64-alpine-linux-musl/15.2.0/../../../../aarch64-alpine-linux-musl/bin/ld: /usr/lib/libsystemd.so: undefined reference to `getcontext' /usr/lib/gcc/aarch64-alpine-linux-musl/15.2.0/../../../../aarch64-alpine-linux-musl/bin/ld: /usr/lib/libsystemd.so: undefined reference to `makecontext' collect2: error: ld returned 1 exit status Related: https://builds.sr.ht/~postmarketos/job/1776990 Part-of: --- extra-repos/systemd/systemd-stage0/APKBUILD | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extra-repos/systemd/systemd-stage0/APKBUILD b/extra-repos/systemd/systemd-stage0/APKBUILD index 3d38f364e..7d65c2027 100644 --- a/extra-repos/systemd/systemd-stage0/APKBUILD +++ b/extra-repos/systemd/systemd-stage0/APKBUILD @@ -5,7 +5,7 @@ maintainer="Clayton Craft " pkgname=systemd-stage0 pkgver=261_rc2 _pkgver="${pkgver/_/-}" -pkgrel=0 +pkgrel=1 pkgdesc="Minimal systemd bootstrap package" url="https://github.com/systemd/systemd" # armhf: pmb#2618 @@ -15,7 +15,7 @@ license="MIT AND GPL-2.0-only AND LGPL-2.1-or-later" # This is only for bootstrapping other packages, make sure it does not get # pulled into real installations via !postmarketos-base and !tracedeps depends="!postmarketos-base" -depends_libs="!postmarketos-base" +depends_libs="!postmarketos-base libucontext" depends_dev="!postmarketos-base" depends_doc="!postmarketos-base" options="!tracedeps !check pmb:cross-native2 pmb:strict"