Skip to content

Build fails: error: ‘struct statx’ has no member named ‘stx_mnt_id’

Host environment

  • Operating system: Linux (glibc 2.34, gcc 11.2.0, linux-kernel 5.17-rc3, linux-headers 5.17-rc3, self-compiled)
  • OS/kernel version: Linux mkiss 5.17.0-rc3 #1 SMP PREEMPT Sat Feb 12 19:43:05 CET 2022 x86_64 GNU/Linux
  • Architecture: x86_64
  • QEMU flavor: //
  • QEMU version: git
  • QEMU command line: //
    ../tools/virtiofsd/passthrough_ll.c:1070:36: error: ‘struct statx’ has no member named ‘stx_mnt_id’; did you mean ‘stx_uid’?

Emulated/Virtualized environment

  • Operating system: //
  • OS/kernel version: //
  • Architecture: //

Description of problem

When trying to build qemu (both version 6.2.0 and upstream git), the build fails with the mentioned error message

Steps to reproduce

  1. Configure qemu with the following arguments (target list removed for the sake of brevity):
./configure \
    --prefix=/usr \
    --sysconfdir=/etc \
    --localstatedir=/var \
    --libexecdir=/usr/lib/qemu \
    --smbd=/usr/bin/smbd \
    --enable-modules \
    --enable-sdl \
    --enable-slirp=system \
    --disable-werror 
  1. Try to build qemu
  2. Build fails on target tools/virtiofsd/virtiofsd.p/passthrough_ll.c.o

Additional information

Meson output:

+ ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libexecdir=/usr/lib/qemu --smbd=/usr/bin/smbd --enable-modules --enable-sdl --enable-slirp=system --disable-werror --target-list=x86_64-softmmu,x86_64-linux-user,aarch64-softmmu,aarch64-linux-user,ppc64-softmmu,ppc64-linux-user,riscv32-softmmu,riscv32-linux-user,riscv64-softmmu,riscv64-linux-user,arm-softmmu,arm-linux-user,avr-softmmu
Using './build' as the directory for build output
The Meson build system
Version: 0.61.2
Source dir: /home/mae/dev/qemubuild/qemu
Build dir: /home/mae/dev/qemubuild/qemu/build
Build type: native build
Project name: qemu
Project version: 6.2.50
C compiler for the host machine: gcc -m64 -mcx16 (gcc 11.2.0 "gcc (GCC) 11.2.0")
C linker for the host machine: gcc -m64 -mcx16 ld.bfd 2.37
Host machine cpu family: x86_64
Host machine cpu: x86_64
Program sh found: YES (/usr/bin/sh)
Program python3 found: YES (/usr/bin/python)
Program bzip2 found: YES (/usr/bin/bzip2)
C++ compiler for the host machine: g++ -m64 -mcx16 (gcc 11.2.0 "g++ (GCC) 11.2.0")
C++ linker for the host machine: g++ -m64 -mcx16 ld.bfd 2.37
Program cgcc found: NO
Library m found: YES
Run-time dependency threads found: YES
Library util found: YES
Run-time dependency appleframeworks found: NO (tried framework)
Found pkg-config: /usr/bin/pkg-config (1.8.0)
Run-time dependency pixman-1 found: YES 0.40.0
Run-time dependency zlib found: YES 1.2.11
Has header "libaio.h" : YES 
Library aio found: YES
Run-time dependency liburing found: YES 2.0
Run-time dependency libnfs found: YES 5.0.1
Run-time dependency appleframeworks found: NO (tried framework)
Run-time dependency libseccomp found: YES 2.5.3
Has header "cap-ng.h" : YES 
Library cap-ng found: YES
Run-time dependency xkbcommon found: YES 1.4.0
Has header "libvdeplug.h" : YES 
Library vdeplug found: YES
Run-time dependency libpulse found: YES 15.0
Run-time dependency alsa found: YES 1.2.6.1
Run-time dependency jack found: NO (tried pkgconfig)
Run-time dependency spice-protocol found: YES 0.14.4
Run-time dependency spice-server found: YES 0.15.0
Library rt found: YES
Run-time dependency libiscsi found: YES 1.19.0
Run-time dependency libzstd found: YES 1.5.2
Run-time dependency virglrenderer found: YES 0.9.1
Run-time dependency libcurl found: YES 7.81.0
Run-time dependency libudev found: YES 250
Library mpathpersist found: NO
Run-time dependency ncursesw found: YES 6.3.20211021
Has header "brlapi.h" : NO 
Run-time dependency sdl2 found: YES 2.0.18
Run-time dependency sdl2_image found: YES 2.0.5
Library rados found: NO
Has header "rbd/librbd.h" : NO 
Run-time dependency glusterfs-api found: NO (tried pkgconfig)
Run-time dependency libssh found: YES 0.9.6
Has header "bzlib.h" : YES 
Library bz2 found: YES
Has header "lzfse.h" : NO 
Has header "sys/soundcard.h" : YES 
Run-time dependency gbm found: YES 21.3.1
Run-time dependency gnutls found: YES 3.7.3
Run-time dependency gtk+-3.0 found: YES 3.24.31
Run-time dependency gtk+-x11-3.0 found: YES 3.24.31
Run-time dependency vte-2.91 found: YES 0.66.2
Run-time dependency x11 found: YES 1.7.3.1
Run-time dependency libpng found: YES 1.6.37
Run-time dependency libjpeg found: YES 2.1.2
Has header "sasl/sasl.h" : YES 
Library sasl2 found: YES
Has header "security/pam_appl.h" : YES 
Library pam found: YES
Has header "snappy-c.h" : YES 
Library snappy found: YES
Has header "lzo/lzo1x.h" : YES 
Library lzo2 found: YES
Run-time dependency libcacard found: YES 2.7.0
Run-time dependency u2f-emu found: NO (tried pkgconfig)
Run-time dependency libusbredirparser-0.5 found: YES 0.12.0
Run-time dependency libusb-1.0 found: YES 1.0.25
Run-time dependency libpmem found: NO (tried pkgconfig)
Run-time dependency libdaxctl found: YES 72.1+
Run-time dependency libtasn1 found: YES 4.18.0
Run-time dependency libkeyutils found: YES 1.6.3
Checking for function "gettid" : YES 
Run-time dependency libselinux found: NO (tried pkgconfig)
Run-time dependency fuse3 found: YES 3.10.5
Run-time dependency libbpf found: YES 0.7.0
Has header "sys/epoll.h" : YES 
Has header "linux/magic.h" : YES 
Has header "valgrind/valgrind.h" : YES 
Has header "linux/btrfs.h" : YES 
Has header "libdrm/drm.h" : YES 
Has header "pty.h" : YES 
Has header "sys/disk.h" : NO 
Has header "sys/ioccom.h" : NO 
Has header "sys/kcov.h" : NO 
Checking for function "accept4" : YES 
Checking for function "clock_adjtime" : YES 
Checking for function "dup3" : YES 
Checking for function "fallocate" : YES 
Checking for function "posix_fallocate" : YES 
Checking for function "posix_memalign" : YES 
Checking for function "ppoll" : YES 
Checking for function "preadv" : YES 
Checking for function "sem_timedwait" with dependency threads: YES 
Checking for function "sendfile" : YES 
Checking for function "setns" : YES 
Checking for function "unshare" : YES 
Checking for function "syncfs" : YES 
Checking for function "sync_file_range" : YES 
Checking for function "timerfd_create" : YES 
Checking for function "copy_file_range" : YES 
Checking for function "openpty" with dependency -lutil: YES 
Checking for function "strchrnul" : YES 
Checking for function "system" : YES 
Header <byteswap.h> has symbol "bswap_32" : YES 
Header <sys/epoll.h> has symbol "epoll_create1" : YES 
Header <unistd.h> has symbol "environ" : YES 
Header <linux/falloc.h> has symbol "FALLOC_FL_PUNCH_HOLE" : YES 
Header <linux/falloc.h> has symbol "FALLOC_FL_KEEP_SIZE" : YES 
Header <linux/falloc.h> has symbol "FALLOC_FL_ZERO_RANGE" : YES 
Has header "linux/fiemap.h" : YES 
Header <linux/fs.h> has symbol "FS_IOC_FIEMAP" : YES 
Checking for function "getrandom" : YES 
Header <sys/random.h> has symbol "GRND_NONBLOCK" : YES 
Header <sys/inotify.h> has symbol "inotify_init" : YES 
Header <sys/inotify.h> has symbol "inotify_init1" : YES 
Header <machine/bswap.h> has symbol "bswap32" : NO 
Header <sys/prctl.h> has symbol "PR_SET_TIMERSLACK" : YES 
Header <linux/rtnetlink.h> has symbol "IFLA_PROTO_DOWN" : YES 
Header <sys/sysmacros.h> has symbol "makedev" : YES 
Header <getopt.h> has symbol "optreset" : NO 
Header <netinet/in.h> has symbol "IPPROTO_MPTCP" : YES 
Checking whether type "struct sigevent" has member "sigev_notify_thread_id" : NO 
Checking whether type "struct stat" has member "st_atim" : YES 
Checking for type "struct iovec" : YES 
Checking for type "struct utmpx" : YES 
Checking for type "struct mmsghdr" : YES 
Program scripts/minikconf.py found: YES (/usr/bin/python /home/mae/dev/qemubuild/qemu/scripts/minikconf.py)
Configuring x86_64-softmmu-config-target.h using configuration
Configuring x86_64-softmmu-config-devices.mak with command
Reading depfile: /home/mae/dev/qemubuild/qemu/build/meson-private/x86_64-softmmu-config-devices.mak.d
Configuring x86_64-softmmu-config-devices.h using configuration
Configuring x86_64-linux-user-config-target.h using configuration
Configuring aarch64-softmmu-config-target.h using configuration
Configuring aarch64-softmmu-config-devices.mak with command
Reading depfile: /home/mae/dev/qemubuild/qemu/build/meson-private/aarch64-softmmu-config-devices.mak.d
Configuring aarch64-softmmu-config-devices.h using configuration
Configuring aarch64-linux-user-config-target.h using configuration
Configuring ppc64-softmmu-config-target.h using configuration
Configuring ppc64-softmmu-config-devices.mak with command
Reading depfile: /home/mae/dev/qemubuild/qemu/build/meson-private/ppc64-softmmu-config-devices.mak.d
Configuring ppc64-softmmu-config-devices.h using configuration
Configuring ppc64-linux-user-config-target.h using configuration
Configuring riscv32-softmmu-config-target.h using configuration
Configuring riscv32-softmmu-config-devices.mak with command
Reading depfile: /home/mae/dev/qemubuild/qemu/build/meson-private/riscv32-softmmu-config-devices.mak.d
Configuring riscv32-softmmu-config-devices.h using configuration
Configuring riscv32-linux-user-config-target.h using configuration
Configuring riscv64-softmmu-config-target.h using configuration
Configuring riscv64-softmmu-config-devices.mak with command
Reading depfile: /home/mae/dev/qemubuild/qemu/build/meson-private/riscv64-softmmu-config-devices.mak.d
Configuring riscv64-softmmu-config-devices.h using configuration
Configuring riscv64-linux-user-config-target.h using configuration
Configuring arm-softmmu-config-target.h using configuration
Configuring arm-softmmu-config-devices.mak with command
Reading depfile: /home/mae/dev/qemubuild/qemu/build/meson-private/arm-softmmu-config-devices.mak.d
Configuring arm-softmmu-config-devices.h using configuration
Configuring arm-linux-user-config-target.h using configuration
Configuring avr-softmmu-config-target.h using configuration
Configuring avr-softmmu-config-devices.mak with command
Reading depfile: /home/mae/dev/qemubuild/qemu/build/meson-private/avr-softmmu-config-devices.mak.d
Configuring avr-softmmu-config-devices.h using configuration
Program scripts/make-config-poison.sh found: YES (/home/mae/dev/qemubuild/qemu/scripts/make-config-poison.sh)
Run-time dependency capstone found: NO (tried pkgconfig)
Configuring capstone-defs.h using configuration
Run-time dependency slirp found: YES 4.6.1
Library fdt found: YES
Configuring config-host.h using configuration
Program scripts/hxtool found: YES (/home/mae/dev/qemubuild/qemu/scripts/hxtool)
Program scripts/shaderinclude.pl found: YES (/usr/bin/env perl /home/mae/dev/qemubuild/qemu/scripts/shaderinclude.pl)
Program scripts/qapi-gen.py found: YES (/usr/bin/python /home/mae/dev/qemubuild/qemu/scripts/qapi-gen.py)
Program scripts/qemu-version.sh found: YES (/home/mae/dev/qemubuild/qemu/scripts/qemu-version.sh)

Executing subproject libvhost-user 

libvhost-user| Project name: libvhost-user
libvhost-user| Project version: undefined
libvhost-user| C compiler for the host machine: gcc -m64 -mcx16 (gcc 11.2.0 "gcc (GCC) 11.2.0")
libvhost-user| C linker for the host machine: gcc -m64 -mcx16 ld.bfd 2.37
libvhost-user| Dependency threads found: YES unknown (cached)
libvhost-user| Dependency glib-2.0 found: YES 2.71.2 (overridden)
libvhost-user| Build targets in project: 10
libvhost-user| Subproject libvhost-user finished.

Program scripts/decodetree.py found: YES (/usr/bin/python /home/mae/dev/qemubuild/qemu/scripts/decodetree.py)
Program ../scripts/modules/module_block.py found: YES (/usr/bin/python /home/mae/dev/qemubuild/qemu/block/../scripts/modules/module_block.py)
Program ../scripts/block-coroutine-wrapper.py found: YES (/usr/bin/python /home/mae/dev/qemubuild/qemu/block/../scripts/block-coroutine-wrapper.py)
Program scripts/modinfo-collect.py found: YES (/home/mae/dev/qemubuild/qemu/scripts/modinfo-collect.py)
Program scripts/modinfo-generate.py found: YES (/home/mae/dev/qemubuild/qemu/scripts/modinfo-generate.py)
Program nm found: YES
Program scripts/undefsym.py found: YES (/usr/bin/python /home/mae/dev/qemubuild/qemu/scripts/undefsym.py)
Program scripts/feature_to_c.sh found: YES (/bin/sh /home/mae/dev/qemubuild/qemu/scripts/feature_to_c.sh)
Configuring 50-qemu-gpu.json using configuration
Configuring 50-qemu-virtiofsd.json using configuration
Configuring 50-edk2-i386-secure.json using configuration
Configuring 50-edk2-x86_64-secure.json using configuration
Configuring 60-edk2-aarch64.json using configuration
Configuring 60-edk2-arm.json using configuration
Configuring 60-edk2-i386.json using configuration
Configuring 60-edk2-x86_64.json using configuration
Program qemu-keymap found: NO
Program cp found: YES (/usr/bin/cp)
Program sphinx-build-3 sphinx-build found: NO
Program python3 found: YES (/usr/bin/python)
Program diff found: YES (/usr/bin/diff)
Program dbus-daemon found: YES (/usr/bin/dbus-daemon)
Program initrd-stress.sh found: YES (/home/mae/dev/qemubuild/qemu/tests/migration/initrd-stress.sh)
Program xgettext found: YES (/usr/bin/xgettext)
Build targets in project: 744

qemu 6.2.50

  Directories
    Install prefix               : /usr
    BIOS directory               : share/qemu
    firmware path                : /usr/share/qemu-firmware
    binary directory             : bin
    library directory            : lib
    module directory             : lib/qemu
    libexec directory            : lib/qemu
    include directory            : include
    config directory             : /etc
    local state directory        : /var
    Manual directory             : share/man
    Doc directory                : /usr/share/doc
    Build directory              : /home/mae/dev/qemubuild/qemu/build
    Source path                  : /home/mae/dev/qemubuild/qemu
    GIT submodules               : ui/keycodemapdb tests/fp/berkeley-testfloat-3 tests/fp/berkeley-softfloat-3 dtc capstone

  Host binaries
    git                          : git
    make                         : make
    python                       : /usr/bin/python (version: 3.10)
    sphinx-build                 : NO
    gdb                          : /usr/bin/gdb
    genisoimage                  : 
    smbd                         : "/usr/bin/smbd"

  Configurable features
    Documentation                : NO
    system-mode emulation        : YES
    user-mode emulation          : YES
    block layer                  : YES
    Install blobs                : YES
    module support               : YES
    alternative module path      : NO
    fuzzing support              : NO
    Audio drivers                : pa oss
    Trace backends               : log
    D-Bus display                : YES
    QOM debugging                : YES
    vhost-kernel support         : YES
    vhost-net support            : YES
    vhost-crypto support         : YES
    vhost-scsi support           : YES
    vhost-vsock support          : YES
    vhost-user support           : YES
    vhost-user-blk server support: YES
    vhost-user-fs support        : YES
    vhost-vdpa support           : YES
    build guest agent            : YES

  Compilation
    host CPU                     : x86_64
    host endianness              : little
    C compiler                   : gcc -m64 -mcx16
    Host C compiler              : gcc -m64 -mcx16
    C++ compiler                 : g++ -m64 -mcx16
    CFLAGS                       : -march=native -mtune=native -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -O2 -g
    CXXFLAGS                     : -march=native -mtune=native -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -O2 -g
    LDFLAGS                      : -march=native -mtune=native -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now
    QEMU_CFLAGS                  : -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -Wold-style-declaration -Wold-style-definition -Wtype-limits -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wempty-body -Wnested-externs -Wendif-labels -Wexpansion-to-defined -Wimplicit-fallthrough=2 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong
    QEMU_LDFLAGS                 : -Wl,--warn-common -Wl,-z,relro -Wl,-z,now  -fstack-protector-strong
    profiler                     : NO
    link-time optimization (LTO) : NO
    PIE                          : YES
    static build                 : NO
    malloc trim support          : YES
    membarrier                   : NO
    debug stack usage            : NO
    mutex debugging              : NO
    memory allocator             : system
    avx2 optimization            : YES
    avx512f optimization         : NO
    gprof enabled                : NO
    gcov                         : NO
    thread sanitizer             : NO
    CFI support                  : NO
    strip binaries               : NO
    sparse                       : NO
    mingw32 support              : NO
    x86_64 tests                 : gcc

  Targets and accelerators
    KVM support                  : YES
    HAX support                  : NO
    HVF support                  : NO
    WHPX support                 : NO
    NVMM support                 : NO
    Xen support                  : NO
    TCG support                  : YES
    TCG backend                  : native (x86_64)
    TCG plugins                  : YES
    TCG debug enabled            : NO
    target list                  : x86_64-softmmu x86_64-linux-user aarch64-softmmu aarch64-linux-user ppc64-softmmu ppc64-linux-user riscv32-softmmu riscv32-linux-user riscv64-softmmu riscv64-linux-user arm-softmmu arm-linux-user avr-softmmu
    default devices              : YES
    out of process emulation     : YES

  Block layer support
    coroutine backend            : ucontext
    coroutine pool               : YES
    Block whitelist (rw)         : 
    Block whitelist (ro)         : 
    Use block whitelist in tools : NO
    VirtFS support               : YES
    build virtiofs daemon        : YES
    Live block migration         : YES
    replication support          : YES
    bochs support                : YES
    cloop support                : YES
    dmg support                  : YES
    qcow v1 support              : YES
    vdi support                  : YES
    vvfat support                : YES
    qed support                  : YES
    parallels support            : YES
    FUSE exports                 : YES 3.10.5

  Crypto
    TLS priority                 : "NORMAL"
    GNUTLS support               : YES 3.7.3
      GNUTLS crypto              : YES
    libgcrypt                    : NO
    nettle                       : NO
    crypto afalg                 : NO
    rng-none                     : NO
    Linux keyring                : YES

  Dependencies
    SDL support                  : YES
    SDL image support            : YES 2.0.5
    GTK support                  : YES
    pixman                       : YES 0.40.0
    VTE support                  : YES 0.66.2
    slirp support                : YES 4.6.1
    libtasn1                     : YES 4.18.0
    PAM                          : YES
    iconv support                : YES
    curses support               : YES
    virgl support                : YES 0.9.1
    curl support                 : YES 7.81.0
    Multipath support            : NO
    VNC support                  : YES
    VNC SASL support             : YES
    VNC JPEG support             : YES 2.1.2
    VNC PNG support              : YES 1.6.37
    OSS support                  : YES
    ALSA support                 : YES 1.2.6.1
    PulseAudio support           : YES 15.0
    JACK support                 : NO
    brlapi support               : NO
    vde support                  : YES
    netmap support               : NO
    l2tpv3 support               : YES
    Linux AIO support            : YES
    Linux io_uring support       : YES 2.0
    ATTR/XATTR support           : YES
    RDMA support                 : NO
    PVRDMA support               : NO
    fdt support                  : system
    libcap-ng support            : YES
    bpf support                  : YES 0.7.0
    spice protocol support       : YES 0.14.4
      spice server support       : YES 0.15.0
    rbd support                  : NO
    smartcard support            : YES 2.7.0
    U2F support                  : NO
    libusb                       : YES 1.0.25
    usb net redir                : YES 0.12.0
    OpenGL support               : YES
    GBM                          : YES 21.3.1
    libiscsi support             : YES 1.19.0
    libnfs support               : YES 5.0.1
    seccomp support              : YES 2.5.3
    GlusterFS support            : NO
    TPM support                  : YES
    libssh support               : YES 0.9.6
    lzo support                  : YES
    snappy support               : YES
    bzip2 support                : YES
    lzfse support                : NO
    zstd support                 : YES 1.5.2
    NUMA host support            : YES
    capstone                     : internal
    libpmem support              : NO
    libdaxctl support            : YES 72.1+
    libudev                      : YES 250
    FUSE lseek                   : YES
    selinux                      : NO

  Subprojects
    libvhost-user                : YES

  User defined options
    Native files                 : config-meson.cross
    bindir                       : /usr/bin
    datadir                      : /usr/share
    debug                        : true
    includedir                   : /usr/include
    libdir                       : /usr/lib
    libexecdir                   : /usr/lib/qemu
    localedir                    : /usr/share/locale
    localstatedir                : /var
    mandir                       : /usr/share/man
    optimization                 : 2
    prefix                       : /usr
    sysconfdir                   : /etc
    werror                       : false
    b_coverage                   : false
    b_lto                        : false
    b_pie                        : true
    audio_drv_list               : default
    capstone                     : auto
    cfi                          : false
    default_devices              : true
    docdir                       : /usr/share/doc
    fdt                          : auto
    qemu_firmwarepath            : /usr/share/qemu-firmware
    qemu_suffix                  : qemu
    sdl                          : enabled
    slirp                        : system
    sphinx_build                 : 
    tcg                          : enabled
    trace_file                   : trace
    xen                          : disabled

Found ninja-1.10.2 at /usr/bin/ninja
Edited by Mae Dartmann
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information