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: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8704>
This commit is contained in:
Oliver Smith 2026-06-01 15:08:35 +02:00 committed by The Friendly Meow (merge) Bot
parent 58fdca1ad6
commit e96054e2a3
No known key found for this signature in database

View file

@ -5,7 +5,7 @@ maintainer="Clayton Craft <craftyguy@postmarketos.org>"
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"