Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 915809 - app-emulation/qemu-8.0.4: ../linux-user/syscall.c:6863:15: error: use of undeclared identifier 'F_GETLK64'
Summary: app-emulation/qemu-8.0.4: ../linux-user/syscall.c:6863:15: error: use of unde...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Virtualization Team
URL:
Whiteboard:
Keywords: PATCH
: 916434 920279 928654 (view as bug list)
Depends on:
Blocks: musl-1.2.4 musl-1.2.4-stable
  Show dependency tree
 
Reported: 2023-10-15 09:38 UTC by e.nikolaos
Modified: 2025-01-06 21:49 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log.xz,17.92 KB, application/x-xz)
2023-10-15 09:38 UTC, e.nikolaos
Details

Note You need to log in before you can comment on or make changes to this bug.
Description e.nikolaos 2023-10-15 09:38:51 UTC
Created attachment 872884 [details]
build.log

Portage 3.0.51 (python 3.11.5-final-0, default/linux/amd64/17.0/musl/clang, [unavailable], musl-1.2.4, 6.1.57-gentoo-musl-zfs-2.2.0 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-6.1.57-gentoo-musl-zfs-2.2.0-x86_64-Intel-R-_Core-TM-_i5-7600K_CPU_@_3.80GHz-with-libc
KiB Mem:    32556148 total,  13258452 free
KiB Swap:    4194300 total,   4034812 free
Timestamp of repository gentoo: Sat, 14 Oct 2023 15:31:56 +0000
Head commit of repository gentoo: be96e2c10a9411dfc750a60bfa3e8d1c569731a2

Timestamp of repository musl: Fri, 13 Oct 2023 16:46:52 +0000
Head commit of repository musl: 02e39fb78a07377cbcd281da469fd21cbf44aec9

sh bash 5.1_p16-r6
ld GNU ld (Gentoo 2.40 p5) 2.40.0
app-misc/pax-utils:        1.3.5::gentoo
app-shells/bash:           5.1_p16-r6::gentoo
dev-lang/perl:             5.38.0-r1::gentoo
dev-lang/python:           3.11.5::gentoo
dev-util/cmake:            3.26.5-r2::gentoo
dev-util/meson:            1.2.1-r1::gentoo
sys-apps/baselayout:       2.14::gentoo
sys-apps/openrc:           0.48::gentoo
sys-apps/sandbox:          2.38::gentoo
sys-devel/autoconf:        2.71-r6::gentoo
sys-devel/automake:        1.16.5-r1::gentoo
sys-devel/binutils:        2.40-r5::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:           17.0.2::gentoo
sys-devel/libtool:         2.4.7-r1::gentoo
sys-devel/lld:             17.0.2::gentoo
sys-devel/llvm:            16.0.6::gentoo, 17.0.2-r1::gentoo
sys-devel/make:            4.4.1-r1::gentoo
sys-kernel/linux-headers:  6.1::gentoo (virtual/os-headers)
sys-libs/musl:             1.2.4::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: git
    sync-uri: https://anongit.gentoo.org/git/repo/sync/gentoo.git
    priority: -1000
    volatile: False
    sync-git-verify-commit-signature: yes

local
    location: /var/db/repos/local
    masters: gentoo
    volatile: False

musl
    location: /var/db/repos/musl
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/musl.git
    masters: gentoo
    volatile: False

profiles
    location: /var/db/repos/profiles
    masters: gentoo
    volatile: True

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FSF-APPROVED @FREE-DOCUMENTS @MISC-FREE"
ADDR2LINE="llvm-addr2line"
AR="llvm-ar"
AS="clang -c"
CBUILD="x86_64-gentoo-linux-musl"
CC="clang"
CFLAGS="-O2 -pipe -march=native -flto=thin"
CHOST="x86_64-gentoo-linux-musl"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CPP="clang-cpp"
CXX="clang++"
CXXFLAGS="-O2 -pipe -march=native -flto=thin"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS=" --keep-going -j4 --binpkg-respect-use=y"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-O2 -pipe -march=native -flto=thin"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync network-sandbox news parallel-fetch parallel-install pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe -march=native -flto=thin"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
INSTALL_MASK="charset.alias /usr/share/locale/locale.alias bash-completion systemd gnustep-4.sh"
LANG="en_US.utf8"
LD="ld.lld"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--as-needed -Wl,-O2 -Wl,--as-needed"
LEX="flex"
MAKEOPTS="-j4"
NM="llvm-nm"
OBJCOPY="llvm-objcopy"
OBJDUMP="llvm-objdump"
PKGDIR="/var/cache/binpkgs-gnu/packages/skylake/"
PORTAGE_BUNZIP2_COMMAND="bunzip2 --ignore-trailing-garbage=1"
PORTAGE_COMPRESS=""
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
RANLIB="llvm-ranlib"
READELF="llvm-readelf"
SHELL="/bin/bash"
STRINGS="llvm-strings"
STRIP="llvm-strip"
USE="acl alsa amd64 bzip2 clang cli crypt custom-cflags custom-optimization deblob device-mapper dri elogind fortran gmp iconv ipv6 jit libtirpc llvm-libunwind lm_sensors logrotate lto lz4 ncurses nls nptl openmp pam pcre pgo pic pulseaudio readline scrypt seccomp split-usr ssl symlink syslog threads unicode vaapi xattr xinerama zlib zstd" ABI_X86="64" ADA_TARGET="gnat_2021" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="musl" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LLVM_TARGETS="X86" LUA_SINGLE_TARGET="luajit" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-1" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_11" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="arm ppc64le" RUBY_TARGETS="ruby31" VIDEO_CARDS="intel i965 iris" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  ARFLAGS, ASFLAGS, CCLD, CONFIG_SHELL, CPPFLAGS, CTARGET, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, LC_ALL, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, PORTAGE_BINHOST, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RUSTFLAGS, SIZE, YACC, YFLAGS

=================================================================
                        Package Settings
=================================================================

app-emulation/qemu-8.0.4::gentoo was built with the following:
USE="aio alsa bzip2 curl fdt filecaps gnutls gtk io-uring jpeg ncurses nls opengl oss pam pin-upstream-blobs png pulseaudio seccomp slirp spice usb usbredir vhost-net virtfs vnc xattr zstd -accessibility -bpf (-capstone) -debug -doc -fuse -glusterfs -infiniband -iscsi -jack -jemalloc -lzo -multipath -nfs -numa -plugins -python -rbd -sasl -sdl -sdl-image (-selinux) -smartcard -snappy -ssh -static-user -systemtap -test -udev -vde -virgl -vte -xen" PYTHON_TARGETS="python3_11 -python3_10 (-python3_12)" QEMU_SOFTMMU_TARGETS="i386 x86_64 -aarch64 -alpha -arm -avr -cris -hppa -loongarch64 -m68k -microblaze -microblazeel -mips -mips64 -mips64el -mipsel -nios2 -or1k -ppc -ppc64 -riscv32 -riscv64 -rx -s390x -sh4 -sh4eb -sparc -sparc64 -tricore -xtensa -xtensaeb" QEMU_USER_TARGETS="arm ppc64le -aarch64 -aarch64_be -alpha -armeb -cris -hexagon -hppa -i386 -loongarch64 -m68k -microblaze -microblazeel -mips -mips64 -mips64el -mipsel -mipsn32 -mipsn32el -nios2 -or1k -ppc -ppc64 -riscv32 -riscv64 -s390x -sh4 -sh4eb -sparc -sparc32plus -sparc64 -x86_64 -xtensa -xtensaeb"
CFLAGS="-O2 -pipe -march=native -flto=thin -D_LARGEFILE64_SOURCE"
FEATURES="usersync distlocks unmerge-logs binpkg-logs unknown-features-warn buildpkg-live strict parallel-install binpkg-multi-instance pid-sandbox config-protect-if-modified binpkg-dostrip protect-owned network-sandbox assume-digests binpkg-docompress qa-unresolved-soname-deps preserve-libs xattr buildpkg unmerge-orphans merge-sync ebuild-locks userfetch fixlafiles news ipc-sandbox usersandbox sandbox userpriv sfperms parallel-fetch"

>>> Attempting to run pkg_info() for 'app-emulation/qemu-8.0.4'
Using:
  app-emulation/spice-protocol-0.14.4
  sys-firmware/edk2-ovmf-bin-202202
  sys-firmware/seabios-bin-1.16.0
  sys-firmware/ipxe-1.21.1
  sys-firmware/sgabios-0.1_pre10
Comment 1 e.nikolaos 2023-10-15 09:40:04 UTC Comment hidden (obsolete)
Comment 2 e.nikolaos 2023-10-15 09:51:15 UTC
It appears to build while appending '-D_LARGEFILE64_SOURCE' to CFLAGS.
Comment 4 e.nikolaos 2023-10-15 19:07:41 UTC
qemu-8.0.5 and qemu-8.1.1 both building using '-D_LARGEFILE64_SOURCE' to CFLAGS.
Fail to build without.
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-10-28 17:44:28 UTC
*** Bug 916434 has been marked as a duplicate of this bug. ***
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-12-18 22:39:23 UTC
*** Bug 920279 has been marked as a duplicate of this bug. ***
Comment 7 Tohka 2024-01-02 11:13:39 UTC
qemu 8.2.0 also fails however the patch I provided in https://bugs.gentoo.org/920279 lets it compile.
Comment 8 Andreas K. Hüttel archtester gentoo-dev 2024-03-04 01:27:03 UTC
8.1.5 (current stable) builds just fine.
Comment 9 Tohka 2024-03-11 15:28:51 UTC
Could you check if you can compile qemu-8.2.2 on musl without any patches?
Comment 10 vadorovsky 2024-03-24 08:27:47 UTC
@Tohka: Nope, qemu-8.2.2 still needs your patch. Why can't we just add include it in the overlay?

It seems like it was submitted upstream, but only the first patch was applied

https://www.mail-archive.com/qemu-devel@nongnu.org/msg926876.html

Let me ask why.
Comment 11 Andreas K. Hüttel archtester gentoo-dev 2024-04-30 12:01:02 UTC
*** Bug 928654 has been marked as a duplicate of this bug. ***
Comment 12 Fabian Groffen gentoo-dev 2024-05-04 08:19:29 UTC
8.2.3 doesn't build any more on musl.

../linux-user/syscall.c:6961:18: error: invalid use of undefined type 'struct flock64'

amongst many other similar errors.
Comment 13 Fabian Groffen gentoo-dev 2024-05-04 08:26:17 UTC
This appears to be https://gitlab.com/qemu-project/qemu/-/issues/2215 and alpine guys have a patch https://git.alpinelinux.org/aports/tree/community/qemu/lfs64.patch (which looks to me like it should be conditional for musl)
Comment 14 immolo 2024-07-16 20:43:24 UTC
Just hit this with qemu-9.0.1, the second patch only seems to be required when +static-user is applied from my tests.
Comment 15 immolo 2024-07-16 21:04:17 UTC
correction, it's required when a qemu_user_targets is set rather than static-user.
Comment 17 Progenyx 2025-01-06 21:46:25 UTC
Hi, I just tripped over this updating to v8.2.7, and had the same result trying the new stable candidate v9.1.2, though v8.2.3 builds just fine for me.
Comment 18 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-01-06 21:49:11 UTC
https://gitlab.com/qemu-project/qemu/-/commit/99174ce39e86ec6aea7bb7ce326b16e3eed9e3da is first in 9.2.0. If someone wants to backport it and test it, I'll merge a PR adding that to the ebuild.