Mesa-git fails to build

Hi all,

For the past ~2 weeks I’ve been having troubles building mesa-git. Usually I build a new development version every 3-4 weeks and stick with it if it works OK for my needs.

Generally I use this repo https://github.com/Frogging-Family/mesa-git . Currently neither the TkG, nor the Manjaro mesa-git packages cab be bullt.

The last working version for me is mesa-tkg-git-22.0.0_devel.147458.a46d1553292-1 from 25.11.2021. Then the mesa repo was cleaned - some obsolete drivers were removed and after that all my attempts to build a new git package fail.

pamac build mesa-git lib32-mesa-git
----cut---
==> Updated version: mesa-git 22.0.0_devel.147991.abace2b8a45.d41d8cd98f00b204e9800998ecf8427e-1
==> Removing existing $pkgdir/ directory...
==> Starting build()...
The Meson build system
Version: 0.60.2
Source dir: /var/tmp/pamac-build-neckfreak/mesa-git/src/mesa
Build dir: /var/tmp/pamac-build-neckfreak/mesa-git/src/_build
Build type: native build
Program python3 found: YES (/usr/bin/python3)
Project name: mesa
Project version: 22.0.0-devel
C compiler for the host machine: ccache cc (gcc 11.1.0 "cc (GCC) 11.1.0")
C linker for the host machine: cc ld.bfd 2.36.1
C++ compiler for the host machine: ccache c++ (gcc 11.1.0 "c++ (GCC) 11.1.0")
C++ linker for the host machine: c++ ld.bfd 2.36.1
Host machine cpu family: x86_64
Host machine cpu: x86_64
Checking if "-mtls-dialect=gnu2" runs: YES
Checking if "split TLSDESC" : links: YES 
Found pkg-config: /usr/bin/pkg-config (1.8.0)
Run-time dependency vdpau found: YES 1.4
Run-time dependency vulkan found: YES 1.2.199
Program glslangValidator found: YES (/usr/bin/glslangValidator)
Run-time dependency libomxil-bellagio found: YES 0.9.3
Run-time dependency libva found: YES 1.13.0
Header <va/va.h> has symbol "VASurfaceAttribDRMFormatModifiers" with dependency libva: YES 
Run-time dependency libclc found: YES 0.2.0
Program python3 found: YES (/usr/bin/python3)
Fetching value of define "ETIME" : 62 
Checking for function "bswap32" : YES 
Checking for function "bswap64" : YES 
Checking for function "clz" : YES 
Checking for function "clzll" : YES 
Checking for function "ctz" : YES 
Checking for function "expect" : YES 
Checking for function "ffs" : YES 
Checking for function "ffsll" : YES 
Checking for function "popcount" : YES 
Checking for function "popcountll" : YES 
Checking for function "unreachable" : YES 
Checking for function "types_compatible_p" : YES 
Compiler for C supports function attribute const: YES 
Compiler for C supports function attribute flatten: YES 
Compiler for C supports function attribute malloc: YES 
Compiler for C supports function attribute pure: YES 
Compiler for C supports function attribute unused: YES 
Compiler for C supports function attribute warn_unused_result: YES 
Compiler for C supports function attribute weak: YES 
Compiler for C supports function attribute format: YES 
Compiler for C supports function attribute packed: YES 
Compiler for C supports function attribute returns_nonnull: YES 
Compiler for C supports function attribute alias: YES 
Compiler for C supports function attribute noreturn: YES 
Compiler for C supports function attribute visibility:hidden: YES 
Checking if "__uint128_t" : compiles: YES 
Compiler for C supports link arguments -Wl,--gc-sections: YES 
Compiler for C supports arguments -Werror=implicit-function-declaration: YES 
Compiler for C supports arguments -Werror=missing-prototypes: YES 
Compiler for C supports arguments -Werror=return-type: YES 
Compiler for C supports arguments -Werror=empty-body: YES 
Compiler for C supports arguments -Werror=incompatible-pointer-types: YES 
Compiler for C supports arguments -Werror=int-conversion: YES 
Compiler for C supports arguments -Wimplicit-fallthrough: YES 
Compiler for C supports arguments -Wno-missing-field-initializers: YES 
Compiler for C supports arguments -Wno-format-truncation: YES 
Compiler for C supports arguments -fno-math-errno: YES 
Compiler for C supports arguments -fno-trapping-math: YES 
Compiler for C supports arguments -Qunused-arguments: NO 
Compiler for C supports arguments -fno-common: YES 
Compiler for C supports arguments -Wno-microsoft-enum-value: NO 
Compiler for C supports arguments -Werror=format: YES 
Compiler for C supports arguments -Wformat-security: YES 
Compiler for C supports arguments -Werror=thread-safety: NO 
Compiler for C supports arguments -ffunction-sections: YES 
Compiler for C supports arguments -fdata-sections: YES 
Compiler for C++ supports arguments -Werror=return-type: YES 
Compiler for C++ supports arguments -Werror=empty-body: YES 
Compiler for C++ supports arguments -Wno-non-virtual-dtor: YES 
Compiler for C++ supports arguments -Wno-missing-field-initializers: YES 
Compiler for C++ supports arguments -Wno-format-truncation: YES 
Compiler for C++ supports arguments -fno-math-errno: YES 
Compiler for C++ supports arguments -fno-trapping-math: YES 
Compiler for C++ supports arguments -Qunused-arguments: NO 
Compiler for C++ supports arguments -flifetime-dse=1: YES 
Compiler for C++ supports arguments -Wno-microsoft-enum-value: NO 
Compiler for C++ supports arguments -Werror=format: YES 
Compiler for C++ supports arguments -Wformat-security: YES 
Compiler for C++ supports arguments -ffunction-sections: YES 
Compiler for C++ supports arguments -fdata-sections: YES 
Compiler for C supports arguments -Wno-override-init: YES 
Compiler for C supports arguments -Wno-initializer-overrides: NO 
Compiler for C supports arguments -Werror=pointer-arith: YES 
Compiler for C supports arguments -Werror=gnu-empty-initializer: NO 
Compiler for C++ supports arguments -Werror=pointer-arith: YES 
Compiler for C++ supports arguments -Werror=gnu-empty-initializer: NO 
Checking if "GCC atomic builtins" : compiles: YES 
Checking if "GCC atomic builtins required -latomic" : links: YES 
Checking if "GCC 64bit atomics" with dependency not-found: links: YES 
Library ws2_32 found: NO
Header <sys/sysmacros.h> has symbol "major" : YES 
Header <sys/sysmacros.h> has symbol "minor" : YES 
Header <sys/sysmacros.h> has symbol "makedev" : YES 
Header <sys/mkdev.h> has symbol "major" : NO 
Check usable header "sched.h" : YES 
Checking for function "sched_getaffinity" : YES 
Check usable header "xlocale.h" : NO 
Check usable header "linux/futex.h" : YES 
Check usable header "endian.h" : YES 
Check usable header "dlfcn.h" : YES 
Check usable header "sys/shm.h" : YES 
Check usable header "cet.h" : YES 
Check usable header "pthread_np.h" : NO 
Checking for function "strtof" : YES 
Checking for function "mkostemp" : YES 
Checking for function "timespec_get" : YES 
Checking for function "memfd_create" : YES 
Checking for function "random_r" : YES 
Checking for function "flock" : YES 
Checking for function "strtok_r" : YES 
Checking for function "getrandom" : YES 
Checking for function "qsort_r" : YES 
Checking for function "qsort_s" : NO 
Header <errno.h> has symbol "program_invocation_name" : YES 
Checking for function "posix_memalign" : YES 
Checking whether type "struct dirent" has member "d_type" : YES 
Checking if "strtod has locale support" : links: YES 
Checking if "Bsymbolic" : links: YES 
Checking if "gc-sections" : links: YES 
Checking if "version-script" : links: YES 
Checking if "dynamic-list" : links: YES 
Compiler for C supports link arguments -Wl,--build-id=sha1: YES 
Checking for function "dlopen" : NO 
Library dl found: YES
Checking for function "dladdr" with dependency -ldl: YES 
Checking for function "dl_iterate_phdr" : YES 
Checking for function "clock_gettime" : YES 
Run-time dependency zlib found: YES 1.2.11
Run-time dependency libzstd found: YES 1.5.0
Run-time dependency threads found: YES
Checking for function "pthread_setaffinity_np" with dependency threads: YES 
Run-time dependency expat found: YES 2.4.1
Library m found: YES
Run-time dependency libdrm_amdgpu found: YES 2.4.109
Run-time dependency libdrm_radeon found: YES 2.4.109
Run-time dependency libdrm_nouveau found: YES 2.4.109
Run-time dependency libdrm found: YES 2.4.109
Run-time dependency libudev found: YES 249
Found CMake: /usr/bin/cmake (3.22.1)
WARNING: CMake: Dependency rt for LLVM target LLVMSupport was not found
WARNING: CMake: Dependency dl for LLVM target LLVMSupport was not found
WARNING: CMake: Dependency m for LLVM target LLVMSupport was not found
WARNING: Ignoring LLVM CMake dependency because dynamic was requested
llvm-config found: YES (/usr/bin/llvm-config) 13.0.0
Run-time dependency LLVM (modules: amdgpu, asmparser, bitreader, bitwriter, core, coverage, engine, executionengine, instcombine, instrumentation, ipo, irreader, linker, lto, mcdisassembler, mcjit, native, objcarcopts, option, profiledata, scalaropts, transformutils, coroutines, frontendopenmp) found: YES 13.0.0
Run-time dependency libelf found: YES 0.186
Run-time dependency libglvnd found: YES 1.3.4
Program bison found: YES (/usr/bin/bison)
Program bison found: YES 3.8.2 (/usr/bin/bison)
Program flex found: YES (/usr/bin/flex)
Run-time dependency libunwind found: YES 1.5.0
Found pkg-config: /usr/bin/pkg-config (1.8.0)
Build-time dependency wayland-scanner found: YES 1.19.0
Program /usr/bin/wayland-scanner found: YES (/usr/bin/wayland-scanner)
Run-time dependency wayland-protocols found: YES 1.24
Run-time dependency wayland-client found: YES 1.19.0
Run-time dependency wayland-server found: YES 1.19.0
Run-time dependency wayland-egl-backend found: YES 3
Run-time dependency OpenMP found: YES 4.5
Run-time dependency x11 found: YES 1.7.2
Run-time dependency xext found: YES 1.3.4
Run-time dependency xfixes found: YES 6.0.0
Run-time dependency xcb-glx found: YES 1.14
Run-time dependency xcb-shm found: YES 1.14
Run-time dependency xcb found: YES 1.14
Run-time dependency x11-xcb found: YES 1.7.2
Run-time dependency xcb-dri2 found: YES 1.14
Run-time dependency xcb-dri3 found: YES 1.14
Run-time dependency xcb-present found: YES 1.14
Dependency xcb-shm found: YES 1.14 (cached)
Run-time dependency xcb-sync found: YES 1.14
Run-time dependency xshmfence found: YES 1.3
Run-time dependency glproto found: YES 1.4.17
Run-time dependency dri2proto found: YES 2.8
Run-time dependency xxf86vm found: YES 1.1.4
Run-time dependency xcb-xfixes found: YES 1.14
Run-time dependency xcb-randr found: YES 1.14
Run-time dependency xrandr found: YES 1.5.2
Library sensors found: YES
Program nm found: YES (/usr/bin/nm)
Program symbols-check.py found: YES (/usr/bin/python /var/tmp/pamac-build-neckfreak/mesa-git/src/mesa/bin/symbols-check.py)
Program install_megadrivers.py found: YES (/usr/bin/python /var/tmp/pamac-build-neckfreak/mesa-git/src/mesa/bin/install_megadrivers.py)
Checking for function "mmap" : YES 
Program decode.py found: YES (/var/tmp/pamac-build-neckfreak/mesa-git/src/mesa/src/compiler/isaspec/decode.py)
Program encode.py found: YES (/var/tmp/pamac-build-neckfreak/mesa-git/src/mesa/src/compiler/isaspec/encode.py)
Compiler for C supports link arguments -Wl,-Bsymbolic-functions: YES 
Compiler for C supports link arguments -Wl,-z,relro: YES 
Compiler for C supports link arguments -Wl,-Bsymbolic-functions: YES (cached)
Compiler for C supports link arguments -Wl,-z,relro: YES (cached)
Compiler for C++ supports arguments -Wno-unused-variable: YES 
Compiler for C++ supports arguments -Wno-unused-local-typedefs: YES 
Compiler for C++ supports arguments -Wno-unused-but-set-variable: YES 
Compiler for C++ supports arguments -Wno-maybe-uninitialized: YES 
Compiler for C++ supports arguments -Wno-self-assign: NO 
Compiler for C++ supports arguments -fno-exceptions: YES 
Compiler for C++ supports arguments -fno-rtti: YES 
Compiler for C++ supports arguments -Wimplicit-fallthrough: YES 
Compiler for C++ supports arguments -Wshadow: YES 
Compiler for C++ supports arguments -DNOMINMAX: YES 
Compiler for C supports arguments -Wimplicit-fallthrough: YES (cached)
Compiler for C supports arguments -Wshadow: YES 
Compiler for C++ supports arguments -Wno-ignored-attributes: YES 
Library Polly found: YES
Library PollyISL found: YES
Library clang-cpp found: YES
Compiler for C++ supports link arguments -Wl,--rpath=/usr/lib: YES 
Checking if "dep-clang-usable" with dependencies LLVM, -lclang-cpp, threads runs: YES
Configuring mesa.icd using configuration
Program /var/tmp/pamac-build-neckfreak/mesa-git/src/mesa/bin/install_megadrivers.py found: YES (/usr/bin/python /var/tmp/pamac-build-neckfreak/mesa-git/src/mesa/bin/install_megadrivers.py)
WARNING: Library target 'OSMesa' has 'name_prefix' set. Compilers may not find it from its '-lOSMesa' linker flag in the 'osmesa.pc' pkg-config file.
WARNING: Library target 'OSMesa' has 'name_prefix' set. Compilers may not find it from its '-lOSMesa' linker flag in the 'osmesa-uninstalled.pc' pkg-config file.
Program /var/tmp/pamac-build-neckfreak/mesa-git/src/mesa/bin/install_megadrivers.py found: YES (/usr/bin/python /var/tmp/pamac-build-neckfreak/mesa-git/src/mesa/bin/install_megadrivers.py)
Program /var/tmp/pamac-build-neckfreak/mesa-git/src/mesa/bin/install_megadrivers.py found: YES (/usr/bin/python /var/tmp/pamac-build-neckfreak/mesa-git/src/mesa/bin/install_megadrivers.py)
Configuring xa_tracker.h using configuration
Checking for function "mincore" : YES 
Configuring 50_mesa.json using configuration
Message: Configuration summary:
        
        prefix:          /usr
        libdir:          lib
        includedir:      include
        
        OpenGL:          yes (ES1: no ES2: yes)
        
        OSMesa:          libOSMesa
        
        DRI platform:    drm
        DRI drivers:     no
        DRI driver dir:  /usr/lib/dri
        
        GLX:             DRI-based
        
        EGL:             yes
        EGL drivers:     builtin:egl_dri2 builtin:egl_dri3
        EGL/Vulkan/VL platforms:   x11 wayland surfaceless drm xcb
        GBM:             yes
        GBM backends path: /usr/lib/gbm
        
        Vulkan drivers:  amd intel swrast virtio-experimental
        Vulkan ICD dir:  share/vulkan/icd.d
        Vulkan layers:   device-select overlay
        
        llvm:            yes
        llvm-version:    13.0.0
        
        Gallium drivers: r300 r600 radeonsi nouveau svga swrast virgl iris zink crocus
        Gallium st:      mesa xa vdpau omxbellagio va nine clover
        HUD lmsensors:   yes
        
        Shared-glapi:    yes
        
        Perfetto:        no
        Perfetto ds:     auto

Build targets in project: 257

mesa 22.0.0-devel

  User defined options
    buildtype        : plain
    prefix           : /usr
    sysconfdir       : /etc
    wrap_mode        : nofallback
    b_lto            : true
    b_ndebug         : true
    dri3             : enabled
    egl              : enabled
    gallium-drivers  : r300,r600,radeonsi,nouveau,svga,swrast,virgl,iris,zink,crocus
    gallium-extra-hud: true
    gallium-nine     : true
    gallium-omx      : bellagio
    gallium-opencl   : icd
    gallium-va       : enabled
    gallium-vdpau    : enabled
    gallium-xa       : enabled
    gallium-xvmc     : disabled
    gbm              : enabled
    gles1            : disabled
    gles2            : enabled
    glvnd            : true
    glx              : dri
    libunwind        : enabled
    llvm             : enabled
    lmsensors        : enabled
    microsoft-clc    : disabled
    osmesa           : true
    platforms        : x11,wayland
    shared-glapi     : enabled
    tools            : []
    valgrind         : disabled
    vulkan-drivers   : amd,intel,swrast,virtio-experimental
    vulkan-layers    : device-select,overlay
    zstd             : enabled

Found ninja-1.10.2 at /usr/bin/ninja
Core properties:
  Source dir /var/tmp/pamac-build-neckfreak/mesa-git/src/mesa
  Build dir  /var/tmp/pamac-build-neckfreak/mesa-git/src/_build

Main project options:
  
  Core options         Current Value          Possible Values        Description
  ------------         -------------          ---------------        -----------
  auto_features        auto                   [enabled, disabled,    Override value of all 'auto' features
                                              auto]                  
  backend              ninja                  [ninja, vs, vs2010,    Backend to use
                                              vs2012, vs2013,        
                                              vs2015, vs2017,        
                                              vs2019,                
                                               xcode]                
  buildtype            plain                  [plain, debug,         Build type to use
                                              debugoptimized,        
                                              release, minsize,      
                                              custom]                
  cmake_prefix_path    []                                            List of additional prefixes for cmake to
                                                                     search
  debug                false                  [true, false]          Debug
  default_library      shared                 [shared, static, both] Default library type
  force_fallback_for   []                                            Force fallback for those subprojects
  install_umask        0022                   [preserve, 0000-0777]  Default umask to apply on permissions of
                                                                     installed files
  layout               mirror                 [mirror, flat]         Build directory layout
  optimization         0                      [0, g, 1, 2, 3, s]     Optimization level
  pkg_config_path      []                                            List of additional paths for pkg-config to
                                                                     search
  strip                false                  [true, false]          Strip targets on install
  unity                off                    [on, off, subprojects] Unity build
  unity_size           4                      >=2                    Unity block size
  warning_level        1                      [0, 1, 2, 3]           Compiler warning level to use
  werror               false                  [true, false]          Treat warnings as errors
  wrap_mode            nofallback             [default, nofallback,  Wrap mode
                                              nodownload,            
                                              forcefallback,         
                                              nopromote]             
  
  Backend options      Current Value          Possible Values        Description
  ---------------      -------------          ---------------        -----------
  backend_max_links    0                      >=0                    Maximum number of linker processes to run or
                                                                     0 for no limit
  
  Base options         Current Value          Possible Values        Description
  ------------         -------------          ---------------        -----------
  b_asneeded           true                   [true, false]          Use -Wl,--as-needed when linking
  b_colorout           always                 [auto, always, never]  Use colored output
  b_coverage           false                  [true, false]          Enable coverage tracking.
  b_lto                true                   [true, false]          Use link time optimization
  b_lto_threads        0                                             Use multiple threads for Link Time
                                                                     Optimization
  b_lundef             true                   [true, false]          Use -Wl,--no-undefined when linking
  b_ndebug             true                   [true, false, if-      Disable asserts
                                              release]               
  b_pch                true                   [true, false]          Use precompiled headers
  b_pgo                off                    [off, generate, use]   Use profile guided optimization
  b_pie                false                  [true, false]          Build executables as position independent
  b_sanitize           none                   [none, address,        Code sanitizer to use
                                              thread, undefined,     
                                              memory,                
                                              address,undefined]     
  b_staticpic          true                   [true, false]          Build static libraries as position
                                                                     independent
  
  Compiler options     Current Value          Possible Values        Description
  ----------------     -------------          ---------------        -----------
  c_args               [-march=x86-64,                               Extra arguments passed to the c compiler
                       -mtune=generic, -O2,                          
                       -pipe, -fno-plt,                              
                       -fexceptions, -Wp,-D_F                        
                       ORTIFY_SOURCE=2,                              
                       -Wformat,                                     
                       -Werror=format-                               
                       security, -fstack-                            
                       clash-protection,                             
                       -fcf-protection]                              
  c_link_args          [-Wl,-O1,--sort-                              Extra arguments passed to the c linker
                       common,--as-needed,-z,                        
                       relro,-z,now,                                 
                       -march=x86-64,                                
                       -mtune=generic, -O2,                          
                       -pipe, -fno-plt,                              
                       -fexceptions, -Wp,-D_F                        
                       ORTIFY_SOURCE=2,                              
                       -Wformat,                                     
                       -Werror=format-                               
                       security, -fstack-                            
                       clash-protection,                             
                       -fcf-protection]                              
  c_std                c11                    [none, c89, c99, c11,  C language standard to use
                                              c17, c18, c2x, gnu89,  
                                              gnu99, gnu11,          
                                               gnu17, gnu18, gnu2x]  
  cpp_args             [-march=x86-64,                               Extra arguments passed to the cpp compiler
                       -mtune=generic, -O2,                          
                       -pipe, -fno-plt,                              
                       -fexceptions, -Wp,-D_F                        
                       ORTIFY_SOURCE=2,                              
                       -Wformat,                                     
                       -Werror=format-                               
                       security, -fstack-                            
                       clash-protection,                             
                       -fcf-protection, -Wp,-                        
                       D_GLIBCXX_ASSERTIONS]                         
  cpp_debugstl         false                  [true, false]          STL debug mode
  cpp_eh               default                [none, default, a, s,  C++ exception handling type.
                                              sc]                    
  cpp_link_args        [-Wl,-O1,--sort-                              Extra arguments passed to the cpp linker
                       common,--as-needed,-z,                        
                       relro,-z,now,                                 
                       -march=x86-64,                                
                       -mtune=generic, -O2,                          
                       -pipe, -fno-plt,                              
                       -fexceptions, -Wp,-D_F                        
                       ORTIFY_SOURCE=2,                              
                       -Wformat,                                     
                       -Werror=format-                               
                       security, -fstack-                            
                       clash-protection,                             
                       -fcf-protection, -Wp,-                        
                       D_GLIBCXX_ASSERTIONS]                         
  cpp_rtti             true                   [true, false]          Enable RTTI
  cpp_std              c++14                  [none, c++98, c++03,   C++ language standard to use
                                              c++11, c++14, c++17,   
                                              c++1z, c++2a, c++20,   
                                               gnu++03, gnu++11,     
                                              gnu++14, gnu++17,      
                                              gnu++1z, gnu++2a,      
                                               gnu++20]              
  
  python module        Current Value          Possible Values        Description
options                                                              
---------------------  -------------          ---------------        -----------
  python.platlibdir                                                  Directory for site-specific, platform-
                                                                     specific files.
  python.purelibdir                                                  Directory for site-specific, non-platform-
                                                                     specific files.
  
  Directories          Current Value          Possible Values        Description
  -----------          -------------          ---------------        -----------
  bindir               bin                                           Executable directory
  datadir              share                                         Data file directory
  includedir           include                                       Header file directory
  infodir              share/info                                    Info page directory
  libdir               lib                                           Library directory
  libexecdir           libexec                                       Library executable directory
  localedir            share/locale                                  Locale data directory
  localstatedir        /var                                          Localstate data directory
  mandir               share/man                                     Manual page directory
  prefix               /usr                                          Installation prefix
  sbindir              sbin                                          System executable directory
  sharedstatedir       /var/lib                                      Architecture-independent data directory
  sysconfdir           /etc                                          Sysconf data directory
  
  Testing options      Current Value          Possible Values        Description
  ---------------      -------------          ---------------        -----------
  errorlogs            true                   [true, false]          Whether to print the logs from failing tests
  stdsplit             true                   [true, false]          Split stdout and stderr in test logs
  
  Project options      Current Value          Possible Values        Description
  ---------------      -------------          ---------------        -----------
  android-stub         false                  [true, false]          Build against android-stub
  build-aco-tests      false                  [true, false]          Build ACO tests. These require RADV and
                                                                     glslang but not an AMD GPU.
  build-tests          false                  [true, false]          Build unit tests. Currently this will build
                                                                     *all* unit tests except the ACO tests, which
                                                                     may build more than expected.
  custom-shader-                                                     Enable a custom shader replacement
replacement                                                          mechanism. Note that enabling this option
                                                                     requires adding/generating a
                                                                     shader_replacement.h file that can be
                                                                     included (see shaderapi.c).
  d3d-drivers-path                                                   Location of D3D drivers. Default:
                                                                     $libdir/d3d
  datasources          [auto]                 [auto, panfrost,       List of Perfetto datasources to build. If
                                              intel, freedreno]      this is set to `auto`, datasources that can
                                                                     not be build are skipped. Default: [`auto`]
  draw-use-llvm        true                   [true, false]          Whether to use LLVM for the Gallium draw
                                                                     module, if LLVM is included.
  dri-drivers          []                                            DEPRECATED: List of dri drivers to build. If
                                                                     this is set to auto all drivers applicable
                                                                     to the target OS/architecture will be built
  dri-drivers-path                                                   Location to install dri drivers. Default:
                                                                     $libdir/dri.
  dri-search-path                                                    Locations to search for dri drivers, passed
                                                                     as colon separated list. Default: dri-
                                                                     drivers-path.
  dri3                 enabled                [auto, true, false,    enable support for dri3
                                              disabled, enabled]     
  egl                  enabled                [auto, true, false,    Build support for EGL platform
                                              enabled, disabled]     
  egl-lib-suffix                                                     Suffix to append to EGL library name.
                                                                     Default: none.
  egl-native-platform  auto                   [auto, x11, wayland,   the window system EGL assumes for
                                              haiku, android,        EGL_DEFAULT_DISPLAY
                                              windows, surfaceless,  
                                               drm]                  
  execmem              true                   [true, false]          Enable execmem support.  Without execmem,
                                                                     glapi will fail to generate dynamic glapi
                                                                     stubs when entrypoints unknown to glapi but
                                                                     known to DRI drivers are requested in
                                                                     eglGetProcAddress or glXGetProcAddress.
                                                                     This should be enabled unless the platform
                                                                     can guarantee glapi and DRI drivers are
                                                                     always built from the same source tree.
  freedreno-kgsl       false                  [true, false]          use kgsl backend for freedreno vulkan driver
  gallium-d3d10umd     false                  [true, false]          build gallium D3D10 WDDM UMD frontend.
  gallium-drivers      [r300, r600, radeonsi, [auto, kmsro,          List of gallium drivers to build. If this is
                       nouveau, svga, swrast, radeonsi, r300, r600,  set to auto all drivers applicable to the
                       virgl, iris, zink,     nouveau, freedreno,    target OS/architecture will be built
                       crocus]                                       
                                               swrast, v3d, vc4,     
                                              etnaviv, tegra, i915,  
                                              svga, virgl,           
                                               panfrost, iris, lima, 
                                              zink, d3d12, asahi,    
                                              crocus]                
  gallium-extra-hud    true                   [true, false]          Enable HUD block/NIC I/O HUD status support
  gallium-nine         true                   [true, false]          build gallium "nine" Direct3D 9.x frontend.
  gallium-omx          bellagio               [auto, disabled,       enable gallium omx frontend.
                                              bellagio, tizonia]     
  gallium-opencl       icd                    [icd, standalone,      build gallium "clover" OpenCL frontend.
                                              disabled]              
  gallium-va           enabled                [auto, true, false,    enable gallium va frontend.
                                              enabled, disabled]     
  gallium-vdpau        enabled                [auto, true, false,    enable gallium vdpau frontend.
                                              enabled, disabled]     
  gallium-xa           enabled                [auto, true, false,    enable gallium xa frontend.
                                              enabled, disabled]     
  gallium-xvmc         disabled               [auto, true, false,    enable gallium xvmc frontend.
                                              enabled, disabled]     
  gbm                  enabled                [auto, true, false,    Build support for gbm platform
                                              enabled, disabled]     
  gbm-backends-path                                                  Locations to search for gbm backends, passed
                                                                     as colon separated list. Default:
                                                                     $libdir/gbm.
  gles-lib-suffix                                                    Suffix to append to GLES library names.
                                                                     Default: none.
  gles1                disabled               [auto, true, false,    Build support for OpenGL ES 1.x
                                              enabled, disabled]     
  gles2                enabled                [auto, true, false,    Build support for OpenGL ES 2.x and 3.x
                                              enabled, disabled]     
  glvnd                true                   [true, false]          Enable GLVND support.
  glvnd-vendor-name    mesa                                          Vendor name string to use for glvnd
                                                                     libraries
  glx                  dri                    [auto, disabled, dri,  Build support for GLX platform
                                              xlib]                  
  glx-direct           true                   [true, false]          Enable direct rendering in GLX and EGL for
                                                                     DRI
  glx-read-only-text   false                  [true, false]          Disable writable .text section on x86
                                                                     (decreases performance)
  install-intel-gpu-   false                  [true, false]          Build and install Intel unit tests which
tests                                                                require the GPU.  This option is for
                                                                     developers and the Intel CI system only.
  libunwind            enabled                [auto, true, false,    Use libunwind for stack-traces
                                              enabled, disabled]     
  llvm                 enabled                [auto, true, false,    Build with LLVM support.
                                              enabled, disabled]     
  lmsensors            enabled                [auto, true, false,    Enable HUD lmsensors support.
                                              enabled, disabled]     
  microsoft-clc        disabled               [enabled, disabled,    Build support for the Microsoft CLC to DXIL
                                              auto]                  compiler
  moltenvk-dir                                                       Location of the MoltenVk SDK. Default:
  omx-libs-path                                                      path to put omx libraries. defaults to omx-
                                                                     bellagio pkg-config pluginsdir.
  opencl-native        true                   [true, false]          build gallium "clover" OpenCL frontend with
                                                                     native LLVM codegen support.
  opencl-spirv         false                  [true, false]          build gallium "clover" OpenCL frontend with
                                                                     SPIR-V binary support.
  opengl               true                   [true, false]          Build support for OpenGL (all versions)
  osmesa               true                   [true, false]          Build OSmesa.
  osmesa-bits          8                      [8, 16, 32]            Number of channel bits for OSMesa.
  perfetto             false                  [true, false]          Enable performance analysis with Perfetto.
                                                                     Default: false
  platform-sdk-version 25                     >=25, <=31             Android Platform SDK version. Default:
                                                                     Nougat version.
  platforms            [x11, wayland]         [auto, x11, wayland,   window systems to support. If this is set to
                                              haiku, android,        `auto`, all platforms applicable will be
                                              windows]               enabled.
  power8               auto                   [auto, true, false,    Enable power8 optimizations.
                                              enabled, disabled]     
  selinux              false                  [true, false]          Build an SELinux-aware Mesa.  This currently
                                                                     disables execmem support at runtime unless
                                                                     SELinux is configured with allow_execmem.
  shader-cache         auto                   [auto, true, false,    Build with on-disk shader cache support.
                                              enabled, disabled]     
  shader-cache-default true                   [true, false]          If set to false, the feature is only
                                                                     activated when environment variable
                                                                     MESA_GLSL_CACHE_DISABLE is set to false
  shader-cache-max-                                                  Default value for MESA_GLSL_CACHE_MAX_SIZE
size                                                                 enviroment variable.    If set, determines
                                                                     the maximum size of the on-disk cache of
                                                                     compiled    GLSL programs, can be overriden
                                                                     by enviroment variable if needed. Should be
                                                                     set to a number optionally followed by
                                                                     ``K``, ``M``, or ``G`` to specify a size in
                                                                     kilobytes, megabytes, or    gigabytes. By
                                                                     default, gigabytes will be assumed. And if
                                                                     unset, a    maximum size of 1GB will be
                                                                     used.
  shared-glapi         enabled                [auto, true, false,    Whether to build a shared or static glapi.
                                              enabled, disabled]     Defaults to false on Windows, true elsewhere
  shared-llvm          auto                   [auto, true, false,    Whether to link LLVM shared or statically.
                                              enabled, disabled]     
  spirv-to-dxil        false                  [true, false]          Build support for the SPIR-V to DXIL library
  sse2                 true                   [true, false]          use msse2 flag for x86. Uses sse/sse2
                                                                     instead of x87. Default: true
  static-libclc        []                     [spirv, spirv64, all]  Link libclc SPIR-V statically.
  tools                []                     [drm-shim, etnaviv,    List of tools to build. (Note: `intel-ui`
                                              freedreno, glsl,       selects `intel`)
                                              intel, intel-ui, nir,  
                                               nouveau, xvmc, lima,  
                                              panfrost, asahi, all]  
  va-libs-path                                                       path to put va libraries. defaults to
                                                                     $libdir/dri.
  valgrind             disabled               [auto, true, false,    Build with valgrind support
                                              enabled, disabled]     
  vdpau-libs-path                                                    path to put vdpau libraries. defaults to
                                                                     $libdir/vdpau.
  vmware-mks-stats     false                  [true, false]          Build gallium VMware/svga driver with
                                                                     mksGuestStats instrumentation.
  vulkan-beta          false                  [true, false]          Build vulkan drivers with BETA extensions
                                                                     enabled.
  vulkan-drivers       [amd, intel, swrast,   [auto, amd, broadcom,  List of vulkan drivers to build. If this is
                       virtio-experimental]   freedreno, intel,      set to auto all drivers applicable to the
                                              panfrost, swrast,      target OS/architecture will be built
                                               virtio-experimental]  
  vulkan-icd-dir                                                     Location relative to prefix to put vulkan
                                                                     icds on install. Default:
                                                                     $datadir/vulkan/icd.d
  vulkan-layers        [device-select,        [device-select, intel- List of vulkan layers to build
                       overlay]               nullhw, overlay]       
  xlib-lease           auto                   [auto, true, false,    Enable VK_EXT_acquire_xlib_display.
                                              enabled, disabled]     
  xvmc-libs-path                                                     path to put xvmc libraries. defaults to
                                                                     $libdir.
  zlib                 enabled                [enabled, disabled,    Use ZLIB to build driver. Default: enabled
                                              auto]                  
  zstd                 enabled                [auto, true, false,    Use ZSTD instead of ZLIB in some cases.
                                              enabled, disabled]     
ninja: Entering directory `_build'
[453/2369] Generating src/vulkan/overlay-layer/overlay.frag.spv.h with a custom command
../mesa/src/vulkan/overlay-layer/overlay.frag
[471/2369] Generating src/vulkan/overlay-layer/overlay.vert.spv.h with a custom command
../mesa/src/vulkan/overlay-layer/overlay.vert
[914/2369] Compiling C object src/loader/libloader.a.p/loader.c.o
FAILED: src/loader/libloader.a.p/loader.c.o 
ccache cc -Isrc/loader/libloader.a.p -Isrc/loader -I../mesa/src/loader -Iinclude -I../mesa/include -Isrc -I../mesa/src -Isrc/util -I../mesa/src/util -I/usr/include/libdrm -fvisibility=hidden -flto=auto -fdiagnostics-color=always -DNDEBUG -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS '-DPACKAGE_VERSION="22.0.0-devel"' '-DPACKAGE_BUGREPORT="https://gitlab.freedesktop.org/mesa/mesa/-/issues"' -DHAVE_X11_PLATFORM -DHAVE_WAYLAND_PLATFORM -DHAVE_SURFACELESS_PLATFORM -DHAVE_DRM_PLATFORM -DHAVE_XCB_PLATFORM -DUSE_ELF_TLS -DHAVE_ST_VDPAU -DENABLE_ST_OMX_BELLAGIO=1 -DENABLE_ST_OMX_TIZONIA=0 -DHAVE_VA_SURFACE_ATTRIB_DRM_FORMAT_MODIFIERS -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DGLX_USE_DRM -DENABLE_SHADER_CACHE -DHAVE___BUILTIN_BSWAP32 -DHAVE___BUILTIN_BSWAP64 -DHAVE___BUILTIN_CLZ -DHAVE___BUILTIN_CLZLL -DHAVE___BUILTIN_CTZ -DHAVE___BUILTIN_EXPECT -DHAVE___BUILTIN_FFS -DHAVE___BUILTIN_FFSLL -DHAVE___BUILTIN_POPCOUNT -DHAVE___BUILTIN_POPCOUNTLL -DHAVE___BUILTIN_UNREACHABLE -DHAVE___BUILTIN_TYPES_COMPATIBLE_P -DHAVE_FUNC_ATTRIBUTE_CONST -DHAVE_FUNC_ATTRIBUTE_FLATTEN -DHAVE_FUNC_ATTRIBUTE_MALLOC -DHAVE_FUNC_ATTRIBUTE_PURE -DHAVE_FUNC_ATTRIBUTE_UNUSED -DHAVE_FUNC_ATTRIBUTE_WARN_UNUSED_RESULT -DHAVE_FUNC_ATTRIBUTE_WEAK -DHAVE_FUNC_ATTRIBUTE_FORMAT -DHAVE_FUNC_ATTRIBUTE_PACKED -DHAVE_FUNC_ATTRIBUTE_RETURNS_NONNULL -DHAVE_FUNC_ATTRIBUTE_ALIAS -DHAVE_FUNC_ATTRIBUTE_NORETURN -DHAVE_FUNC_ATTRIBUTE_VISIBILITY -DHAVE_UINT128 -D_GNU_SOURCE -DUSE_SSE41 -DUSE_GCC_ATOMIC_BUILTINS -DUSE_X86_64_ASM -DMAJOR_IN_SYSMACROS -DHAS_SCHED_H -DHAS_SCHED_GETAFFINITY -DHAVE_LINUX_FUTEX_H -DHAVE_ENDIAN_H -DHAVE_DLFCN_H -DHAVE_SYS_SHM_H -DHAVE_CET_H -DHAVE_STRTOF -DHAVE_MKOSTEMP -DHAVE_TIMESPEC_GET -DHAVE_MEMFD_CREATE -DHAVE_RANDOM_R -DHAVE_FLOCK -DHAVE_STRTOK_R -DHAVE_GETRANDOM -DHAVE_QSORT_R -DHAVE_PROGRAM_INVOCATION_NAME -DHAVE_POSIX_MEMALIGN -DHAVE_DIRENT_D_TYPE -DHAVE_STRTOD_L -DHAVE_DLADDR -DHAVE_DL_ITERATE_PHDR -DHAVE_ZLIB -DHAVE_ZSTD -DHAVE_COMPRESSION -DHAVE_PTHREAD -DHAVE_PTHREAD_SETAFFINITY -DHAVE_LIBDRM -DHAVE_LIBUDEV -DLLVM_AVAILABLE '-DMESA_LLVM_VERSION_STRING="13.0.0"' -DLLVM_IS_SHARED=1 -DDRAW_LLVM_AVAILABLE -DUSE_LIBGLVND=1 -DMESA_EXECMEM -DHAVE_LIBUNWIND -DWL_HIDE_DEPRECATED -DHAVE_OPENMP -DHAVE_DRI3 -DHAVE_DRI3_MODIFIERS -DHAVE_GALLIUM_EXTRA_HUD=1 -DHAVE_LIBSENSORS=1 -DVK_USE_PLATFORM_WAYLAND_KHR -DVK_USE_PLATFORM_XCB_KHR -DVK_USE_PLATFORM_XLIB_KHR -DVK_USE_PLATFORM_XLIB_XRANDR_EXT -DVK_USE_PLATFORM_DISPLAY_KHR -mtls-dialect=gnu2 -Werror=implicit-function-declaration -Werror=missing-prototypes -Werror=return-type -Werror=empty-body -Werror=incompatible-pointer-types -Werror=int-conversion -Wimplicit-fallthrough -Wno-missing-field-initializers -Wno-format-truncation -fno-math-errno -fno-trapping-math -fno-common -Werror=format -Wformat-security -ffunction-sections -fdata-sections -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fPIC -pthread -DUSE_DRICONF '-DDEFAULT_DRIVER_DIR="/usr/lib/dri"' -MD -MQ src/loader/libloader.a.p/loader.c.o -MF src/loader/libloader.a.p/loader.c.o.d -o src/loader/libloader.a.p/loader.c.o -c ../mesa/src/loader/loader.c
../mesa/src/loader/loader.c: In function ‘loader_get_render_node’:
../mesa/src/loader/loader.c:187:8: error: implicit declaration of function ‘drmGetDeviceFromDevId’ [-Werror=implicit-function-declaration]
  187 |    if (drmGetDeviceFromDevId(device, 0, &dev_ptr) < 0)
      |        ^~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
[923/2369] Linking target src/virtio/vulkan/libvulkan_virtio.so
ninja: build stopped: subcommand failed.
==> ERROR: A failure occurred in build().
    Aborting...

This happens every time for every way I have tried to build the package

[914/2369] Compiling C object src/loader/libloader.a.p/loader.c.o
FAILED: src/loader/libloader.a.p/loader.c.o 
-------
../mesa/src/loader/loader.c: In function ‘loader_get_render_node’:
../mesa/src/loader/loader.c:187:8: error: implicit declaration of function ‘drmGetDeviceFromDevId’ [-Werror=implicit-function-declaration]
  187 |    if (drmGetDeviceFromDevId(device, 0, &dev_ptr) < 0)
      |        ^~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
❯ inxi -GSa
System:    Host: manjaro Kernel: 5.15.7-227-tkg-pds x86_64 bits: 64 compiler: gcc v: 11.1.0
           parameters: intel_pstate=passive BOOT_IMAGE=/boot/vmlinuz-linux515-tkg-pds
           root=UUID=9f256c65-627c-4f76-ae60-ac82eabbb8c1 rw quiet apparmor=1 security=apparmor
           udev.log_priority=3
           Desktop: Xfce 4.16.0 tk: Gtk 3.24.29 info: xfce4-panel wm: xfwm 4.16.1 vt: 7 dm: LightDM 1.30.0
           Distro: Manjaro Linux base: Arch Linux
Graphics:  Device-1: AMD Navi 10 [Radeon RX 5600 OEM/5600 XT / 5700/5700 XT] driver: amdgpu v: kernel
           bus-ID: 03:00.0 chip-ID: 1002:731f class-ID: 0300
           Device-2: Suyin Acer/HP Integrated Webcam [CN0314] type: USB driver: uvcvideo bus-ID: 1-7:4
           chip-ID: 064e:a103 class-ID: 0e02 serial: CN0314-SN30-OV03-VA-R02.03.02
           Display: x11 server: X.Org 1.21.1.1 compositor: xfwm4 v: 4.16.1 driver: loaded: amdgpu,ati
           unloaded: modesetting,radeon alternate: fbdev,vesa display-ID: :0.0 screens: 1
           Screen-1: 0 s-res: 2944x1080 s-dpi: 96 s-size: 778x285mm (30.6x11.2") s-diag: 829mm (32.6")
           Monitor-1: DisplayPort-0 res: 1920x1080 dpi: 92 size: 531x299mm (20.9x11.8") diag: 609mm (24")
           Monitor-2: HDMI-A-0 res: 1024x768 dpi: 85 size: 307x230mm (12.1x9.1") diag: 384mm (15.1")
           OpenGL: renderer: AMD Radeon RX 5700 XT (NAVI10 DRM 3.42.0 5.15.7-227-tkg-pds LLVM 13.0.0)
           v: 4.6 Mesa 21.2.5 direct render: Yes

What can be done to remedy the situation? Let me know if more info is needed.

Thanks.

Building mesa-git in clean chroot works for me

==> Finished making: mesa-git 22.0.0_devel.148021.1b80e1716e2.d41d8cd98f00b204e9800998ecf8427e-1 (Tue 14 Dec 2021 04:48:21 PM UTC)
  -> Moving [mesa-git-22.0.0_devel.148021.1b80e1716e2.d41d8cd98f00b204e9800998ecf8427e-1-x86_64.pkg.tar.zst] -> [/var/cache/manjaro-tools/pkg/stable/x86_64]
  -> Archiving log files [mesa-git-22.0.0_devel.148021.1b80e1716e2.d41d8cd98f00b204e9800998ecf8427e-1-x86_64.log.tar.xz] ...
  -> Cleaning log files ...
==> Finished building [mesa-git]
 --> Time make_pkg: 14.68 minutes

You can try using yay instead to see if it builds fine with that or not.

@Lolix - Thanks for the confirmation, it’s still no-go for me.

@realmain - same result with yay, pamac, pamac-manager, manually building the PKBUILD from the AUR and TkG.

At this point it seems all the avenues of testing are exhausted for me. Not sure what I can go for next.

Edit: In a bit I’ll try again with a clean chroot - did not work for me yesterday though. At least now I know it’s not an issue with other Manjaro installs.

I give up - could not get lib32-mesa-git to build in clean chroot - missing lib32* dependencies and wasn’t able to get the -i option of buildpkg to work, need to read about it some more. However mesa-git was built correctly.

In any case - the original issue is still valid. Tried to build with clang instead of gcc - the build errored exactly in the same manner. ccache is also not the problem. Switched between stable, testing, unstable Manjaro branches - no change. I’m currently building the TkG packages on a headless Arch VM, which is used for multimedia center and everything seems fine.

The only changes to my system lately were related to this: https://github.com/zfigura/wine/blob/esync/README.esync.

❯ cat /proc/sys/fs/file-max
10000000
❯ ulimit -Hn
1048576
❯ ulimit -Sn
1048576

Building custom linux kernels, wine, proton, etc - it all goes well. Not sure how or what to troubleshoot next.

Have a great day!

Builded lib32-mesa-git successfully,

I added the builded mesa-git package into one of my local repositories (created with darkhttpd static server), added same as bellow

Edited /usr/share/manjaro-tools/pacman-default.conf to add the multilib repository because it isn’t there by default

Note that changes will be lost with the next manjaro-tools-base-git update

@Lolix
Thanks for the tip. I assumed that /etc/pacman.conf was used since authentication is needed.