Skip to content

Build fails with error: β€˜STATX_MTIME’ was not declared in this scopeΒ #1843

Closed

Description

@Zopolis4

Describe the bug
Building audacious 4.6.1 on x86_64 (kernel version 4.4, i think) fails due to STATX_MTIME not being defined.

Steps to reproduce

[53/155] Compiling C++ object src/libaudcore/libaudcore.so.6.0.0.p/vfs.cc.o
[54/155] Compiling C++ object src/libaudcore/libaudcore.so.6.0.0.p/vfs_local.cc.o
FAILED: [code=1] src/libaudcore/libaudcore.so.6.0.0.p/vfs_local.cc.o 
c++ -Isrc/libaudcore/libaudcore.so.6.0.0.p -Isrc/libaudcore -I../src/libaudcore -Isrc -I../src -I/usr/local/include/glib-2.0 -I/usr/local/lib64/glib-2.0/include -I/usr/local/include/gtk-3.0 -I/usr/local/include/pango-1.0 -I/usr/local/include/cairo -I/usr/local/include/gdk-pixbuf-2.0 -I/usr/local/include/at-spi2-atk/2.0 -I/usr/local/include/at-spi-2.0 -I/usr/local/include/atk-1.0 -I/usr/local/include/dbus-1.0 -I/usr/local/lib64/dbus-1.0/include -I/usr/local/include/fribidi -I/usr/local/include/pixman-1 -I/usr/local/include/harfbuzz -I/usr/local/include/freetype2 -I/usr/local/include/libpng16 -I/usr/local/include/gio-unix-2.0 -I/usr/local/include/libmount -I/usr/local/include/blkid -flto=auto -fdiagnostics-color=always -D_GLIBCXX_ASSERTIONS=1 -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=gnu++17 -O3 -ffast-math -Wtype-limits -Wno-stringop-truncation -fvisibility=hidden -Wno-non-virtual-dtor -Woverloaded-virtual -fvisibility-inlines-hidden -include /usr/local/tmp/crew/audacious.20260623012316.dir/audacious-4.6.1/builddir/config.h -O3 -pipe -ffat-lto-objects -fPIC -fuse-ld=mold -flto=auto -fPIC -pthread -DLIBAUDCORE_BUILD -MD -MQ src/libaudcore/libaudcore.so.6.0.0.p/vfs_local.cc.o -MF src/libaudcore/libaudcore.so.6.0.0.p/vfs_local.cc.o.d -o src/libaudcore/libaudcore.so.6.0.0.p/vfs_local.cc.o -c ../src/libaudcore/vfs_local.cc
../src/libaudcore/vfs_local.cc: In member function β€˜bool LocalTransport::get_file_timestamps(const char*, int64_t*, int64_t*)’:
../src/libaudcore/vfs_local.cc:466:18: error: aggregate β€˜LocalTransport::get_file_timestamps(const char*, int64_t*, int64_t*)::statx stx’ has incomplete type and cannot be defined
  466 |     struct statx stx;
      |                  ^~~
../src/libaudcore/vfs_local.cc:468:17: error: β€˜STATX_MTIME’ was not declared in this scope
  468 |                 STATX_MTIME | STATX_BTIME, &stx) == 0)
      |                 ^~~~~~~~~~~
../src/libaudcore/vfs_local.cc:468:31: error: β€˜STATX_BTIME’ was not declared in this scope
  468 |                 STATX_MTIME | STATX_BTIME, &stx) == 0)
      |                               ^~~~~~~~~~~
ninja: build stopped: subcommand failed.

Expected behavior
src/libaudcore/vfs_local.cc to check if STATX_MTIME is defined before using it (there's already a regular stat fallback path in the file that could be used if STATX_MTIME is undefined).

Activity

  1. added
    Bug
    on Jun 23, 2026
  2. radioactiveman commented on Jun 23, 2026

    @radioactiveman
    Member

    Give full details of your system please.

    • uname -a
    • cat /etc/os-release
    • gcc --version
    • grep STATX_BTIME /usr/include/linux/stat.h

    Also try adding the include directive again which was removed with commit 4e3449d.

  3. Zopolis4 commented on Jun 24, 2026

    @Zopolis4
    Author

    (Running inside the satmandu/crew-pre-glibc-standalone:nocturne-x86_64.m90 docker container.

    $ uname -a
    Linux 63c7ead3e9b3 7.0.12-1-t2-trixie #1 SMP PREEMPT_DYNAMIC Tue Jun  9 19:13:31 UTC 2026 x86_64 GNU/Linux
    $ cat /etc/os-release
    GOOGLE_CRASH_ID=ChromeOS
    NAME=Chrome OS
    ID=chromeos
    ID_LIKE=chromiumos
    HOME_URL=https://www.chromium.org/chromium-os
    BUG_REPORT_URL=https://crbug.com/new
    VERSION=90
    VERSION_ID=90
    BUILD_ID=13816.82.0
    $ gcc --version
    gcc (GCC) 16.1.0
    Copyright (C) 2026 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    
    $ grep STATX_BTIME /usr/include/linux/stat.h
    grep: /usr/include/linux/stat.h: No such file or directory
    $ grep STATX_BTIME /usr/local/include/linux/stat.h
    #define STATX_BTIME		0x00000800U	/* Want/got stx_btime */
     * confusion please use the equivalent (STATX_BASIC_STATS | STATX_BTIME)
    

    The build works fine when I re-add the include.

  4. radioactiveman commented on Jul 9, 2026

    @radioactiveman
    Member

    @classabbyamp, @jlindgren90: How would you fix this? Maybe with fallback definitions for STATX_MTIME and STATX_BTIME?

  5. classabbyamp commented on Jul 10, 2026

    @classabbyamp
    Contributor

    based on the compiler command-line that failed, this might just be missing -I/usr/local/include? otherwise, it might be outdated linux-headers (as glibc is just taking the statx declarations from linux/stat.h)

  6. classabbyamp commented on Jul 10, 2026

    @classabbyamp
    Contributor

    it might make sense to put in a configure test for statx

  7. added a commit that references this issue on Aug 3, 2026
    b8d11cd
  8. radioactiveman commented on Aug 3, 2026

    @radioactiveman
    Member

    it might make sense to put in a configure test for statx

    Implemented now with the referenced pull request, closing.

  9. added this to the 4.6.2 milestone on Aug 3, 2026
  10. added a commit that references this issue on Aug 3, 2026
    b15de4d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions