Path: csiph.com!2.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.space.net!news.muc.de!.POSTED.news.muc.de!not-for-mail From: bugzilla-noreply@freebsd.org Newsgroups: muc.lists.freebsd.emulation Subject: [Bug 298461] emulators/qemu-user-static-devel: does not build on FreeBSD 15 (undefined symbol __realpathat; keymap generation) Date: Sun, 13 Sep 2026 22:34:17 +0000 Organization: Newsgate at muc.de e.V. Sender: owner-freebsd-emulation@FreeBSD.org Approved: news-admin@muc.de Distribution: world Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: news.muc.de; posting-host="news.muc.de:193.149.48.2"; logging-data="54676"; mail-complaints-to="news-admin@muc.de" X-Original-To: emulation@mlmmj.nyi.freebsd.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789338858; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DLovxGYie1lx2C9qNPAkEy4IbsgBDwVLK6P5zKj8nYw=; b=qBOpT11jebFPp+QT4dKEuMSFhvXvU7Tnb3iJMDnWr7Y2zKBmspZZZ1s45RnDHA+tJhQGSw dnzTqxNZ65IOZJTD+2eXtHJMtvWOR9SKGa7mJVtJzfCuC97lT/EyWb0rs7mJ3lhjSkYfhz tNtcMb8S9w53b/p9LGT7HJv71FJuCNVfJbtRGNpxqlwYhNJ/ga+Gmz0qJ4QOxqIHFafW8S 6XakZuzmWK9o5vmHlRzrOnYGzGRvILp8KucT1kqGeB1E9b85LOaG1As7pIctn1Fxem7Sjl EZy4Ch6tOnFq48RRQiFEWWXsxmZaU2FrFlBx4+ym2iq8PCZZHDF18+58MEkA6w== X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f Auto-Submitted: auto-generated Precedence: list X-Newsgate-Id: f02c70b8849f+ X-No-Archive: Yes Xref: csiph.com muc.lists.freebsd.emulation:13169 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D298461 Bug ID: 298461 Summary: emulators/qemu-user-static-devel: does not build on FreeBSD 15 (undefined symbol __realpathat; keymap generation) Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: Individual Port(s) Assignee: emulation@FreeBSD.org Reporter: rick@sloservers.com Assignee: emulation@FreeBSD.org Flags: maintainer-feedback?(emulation@FreeBSD.org) Created attachment 274708 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D274708&action= =3Dedit Fix build on FreeBSD 15: __realpathat symbol + skip keymap generation; PORTREVISION 4 -> 5 emulators/qemu-user-static-devel (qemu 6.2.50, PORTREVISION 4) does not bui= ld on FreeBSD 15.1-RELEASE amd64. Two independent causes; the attached patch fixes both and bumps PORTREVISION to 5. 1) Link failure: undefined symbol __realpathat ld: error: undefined symbol: __realpathat >>> referenced by os-stat.h:705 (bsd-user/freebsd/os-stat.h:705) >>>=20=20=20=20=20=20=20=20=20=20=20=20=20=20 libqemu-arm-bsd-user.fa.p/bsd-user_freebsd_os-syscall.c.o:(do_freebsd_realp= athat) >>> did you mean: ___realpathat >>> defined in: /usr/lib/libc.a(___realpathat.o) All seven targets fail identically (qemu-arm, qemu-aarch64, qemu-i386, qemu-x86_64, qemu-ppc, qemu-ppc64, qemu-riscv64). Compilation is clean; only the link fails. bsd-user/freebsd/os-stat.h declares and calls __realpathat (two leading underscores). libc spells it with three: $ nm -D /lib/libc.so.7 | grep realpathat 00000000001443c0 W ___realpathat@@FBSDprivate_1.0 00000000001443c0 T __sys___realpathat@@FBSDprivate_1.0 The kernel syscall is __realpathat; the libc wrapper prepends an underscore, giving ___realpathat. Note the change must stay scoped to os-stat.h: elsewhere the same string oc= curs inside the macro TARGET_FREEBSD_NR___realpathat (os-syscall.c, syscall_nr.h, strace.list), and a tree-wide substitution would break syscall dispatch. One question for the maintainer: the block is already guarded by __FreeBSD_version >=3D 1300080. If some version in that range genuinely exp= orted the two-underscore spelling, this wants a narrower version guard rather tha= n a rename. Only 15.1 was available to test on. 2) Build failure: pc-bios keymaps regenerated against current xkeyboard-con= fig Triggered whenever any qemu package is already installed: /usr/local/bin/qemu-keymap -f pc-bios/keymaps/ar -l ar xkbcommon: ERROR: [XKB-338] Couldn't find file "symbols/ar" in include paths ninja: build stopped: subcommand failed. meson locates qemu-keymap on PATH and picks up the binary from an unrelated installed qemu (here qemu-11.0.2), using a version-11 tool to generate data= for a 6.2.50 build. The layout it requests no longer exists either: xkeyboard-config 2.48 renamed the Arabic layout from "ar" to "ara". This port configures --disable-system --disable-tools, so the keymaps are n= ever used. Upstream already handles the tool being absent by copying the pre-generated keymaps from the source tree; the patch takes that path unconditionally. Reproduced with xkeyboard-config-2.48 and qemu-11.0.2 installed. Validation Clean room on 15.1-RELEASE-p2 amd64, stock invocation, no environment overrides, qemu-keymap left installed: cd /usr/ports/emulators/qemu-user-static-devel make clean make build Result: 962/962 targets, all seven qemu-*-bsd-user binaries linked. The port then installs, and qemu-arm-static reports "qemu-arm version 6.2.50" and executes armv7 binaries correctly under binmiscctl. Each patch was also verified to apply with patch -p0 against a pristine extract. Why this port matters: it is the only static user-mode emulator available f= or cross-building packages with poudriere. emulators/qemu-user-static is pinne= d at QEMU 3.1.0 (2018), and emulators/qemu-devel's STATIC_LINK option covers sys= tem emulation rather than the user-mode binaries binmiscctl needs. --=20 You are receiving this mail because: You are the assignee for the bug.= -- Posted automagically by a mail2news gateway at muc.de e.V. Please direct questions, flames, donations, etc. to news-admin@muc.de