Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 935162 - media-libs/mesa-24.1.2: fails to compile: ast_to_hir.cpp:5371:39: error: '%s' directive argument is null
Summary: media-libs/mesa-24.1.2: fails to compile: ast_to_hir.cpp:5371:39: error: '%s'...
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-30 07:57 UTC by Klaus Kusche
Modified: 2024-07-09 04:26 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Klaus Kusche 2024-06-30 07:57:17 UTC
For me, media-libs/mesa-24.1.2 fails to emerge.

x86_64-pc-linux-gnu-g++ -Isrc/compiler/glsl/libglsl.a.p -Isrc/compiler/glsl -I../mesa-24.1.2/src/compiler/glsl -Iinclude -I../mesa-24.1.2/include -Isrc -I../mesa-24.1.2/src -Isrc/mapi -I../me
sa-24.1.2/src/mapi -Isrc/mesa -I../mesa-24.1.2/src/mesa -I../mesa-24.1.2/src/gallium/include -Isrc/gallium/auxiliary -I../mesa-24.1.2/src/gallium/auxiliary -Isrc/compiler/nir -I../mesa-24.1.2
/src/compiler/nir -Isrc/compiler -I../mesa-24.1.2/src/compiler -fvisibility=hidden -fdiagnostics-color=always -DNDEBUG -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c++17 -D__STDC_CONSTANT_
MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS '-DPACKAGE_VERSION="24.1.2"' '-DPACKAGE_BUGREPORT="https://gitlab.freedesktop.org/mesa/mesa/-/issues"' -DHAVE_OPENGL=1 -DHAVE_OPENGL_ES_1=1
 -DHAVE_OPENGL_ES_2=1 -DHAVE_RADEONSI -DHAVE_SWRAST -DVIDEO_CODEC_VC1DEC=1 -DVIDEO_CODEC_H264DEC=1 -DVIDEO_CODEC_H264ENC=1 -DVIDEO_CODEC_H265DEC=1 -DVIDEO_CODEC_H265ENC=1 -DVIDEO_CODEC_AV1DEC
=1 -DVIDEO_CODEC_AV1ENC=1 -DVIDEO_CODEC_VP9DEC=1 -DHAVE_X11_PLATFORM -DHAVE_SURFACELESS_PLATFORM -DHAVE_DRM_PLATFORM -DHAVE_XCB_PLATFORM -DUSE_LIBGLVND=1 -DHAVE_ST_VDPAU -DENABLE_ST_OMX_BELLA
GIO=0 -DENABLE_ST_OMX_TIZONIA=0 -DHAVE_VA_SURFACE_ATTRIB_DRM_FORMAT_MODIFIERS -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DGLX_USE_DRM -DGLAPI_EXPORT_PROTO_ENTRY_POINTS=0 -DALLOW_KCMP -D
MESA_DEBUG=0 -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_ATTRI
BUTE_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_FOR
MAT -DHAVE_FUNC_ATTRIBUTE_PACKED -DHAVE_FUNC_ATTRIBUTE_RETURNS_NONNULL -DHAVE_FUNC_ATTRIBUTE_ALIAS -DHAVE_FUNC_ATTRIBUTE_NORETURN -DHAVE_FUNC_ATTRIBUTE_VISIBILITY -DHAVE_UINT128 -DHAVE_REALLO
CARRAY -DHAVE_FMEMOPEN -D_GNU_SOURCE -DUSE_SSE41 -DHAVE___BUILTIN_IA32_CLFLUSHOPT -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_SYS_INOTIFY_H -DHAVE_LINUX_UDMABUF_H -DHAVE_STRTOF -DHAVE_MKOSTEMP -DHAVE_MEMFD_CREATE -DHAVE_RANDOM_R -DHAVE
_FLOCK -DHAVE_STRTOK_R -DHAVE_GETRANDOM -DHAVE_POSIX_FALLOCATE -DHAVE_SECURE_GETENV -DHAVE_GNU_QSORT_R -DHAVE_STRUCT_TIMESPEC -DHAVE_PROGRAM_INVOCATION_NAME -DHAVE_ISSIGNALING -DHAVE_POSIX_ME
MALIGN -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_LIBU
DEV '-DMESA_LLVM_VERSION_STRING="17.0.6"' -DLLVM_IS_SHARED=1 -DLLVM_AVAILABLE=1 -DDRAW_LLVM_AVAILABLE=1 -DUSE_LIBELF -DTHREAD_SANITIZER=0 -DHAVE_LIBUNWIND -DHAVE_OPENMP -DXCB_KEYSYMS_AVAILABL
E -DHAVE_DRI -DHAVE_DRI2 -DHAVE_DRI3 -DHAVE_DRI3_MODIFIERS -DHAVE_DRI3_EXPLICIT_SYNC -DHAVE_DRISW_KMS -mtls-dialect=gnu2 -Werror=return-type -Werror=empty-body -Wmisleading-indentation -Wno-n
on-virtual-dtor -Wno-missing-field-initializers -Wno-format-truncation -fno-math-errno -fno-trapping-math -flifetime-dse=1 -Wno-unknown-pragmas -Werror=format -Wformat-security -ffunction-sec
tions -fdata-sections -Wno-unused-variable -Wno-unused-but-set-variable -pipe -march=native -mtune=native -msahf -maccumulate-outgoing-args -fuse-linker-plugin -O3 -fomit-frame-pointer -fsche
d-pressure -flive-range-shrinkage -fweb -ftracer -fivopts -ftree-loop-im -frename-registers -fstdarg-opt -fPIC -pthread -Werror=pointer-arith -Werror=vla -MD -MQ src/compiler/glsl/libglsl.a.p
/ast_to_hir.cpp.o -MF src/compiler/glsl/libglsl.a.p/ast_to_hir.cpp.o.d -o src/compiler/glsl/libglsl.a.p/ast_to_hir.cpp.o -c ../mesa-24.1.2/src/compiler/glsl/ast_to_hir.cpp
../mesa-24.1.2/src/compiler/glsl/ast_to_hir.cpp: In member function 'virtual ir_rvalue* ast_declarator_list::hir(exec_list*, _mesa_glsl_parse_state*)':
../mesa-24.1.2/src/compiler/glsl/ast_to_hir.cpp:5371:39: error: '%s' directive argument is null [-Werror=format-overflow=]
 5371 |          name = ralloc_asprintf(ctx, "%s_%s", _mesa_shader_stage_to_subroutine_prefix(state->stage), decl->identifier);
      |                                       ^~
cc1plus: some warnings being treated as errors


_mesa_shader_stage_to_subroutine_prefix is a switch statement.
Six cases return string constants, but the "default:" case returns NULL,
so the %s could really get a NULL pointer.


Happens with both gcc 14.1.1_p20240615 and 14.1.1_p20240622.
My CFLAGS and CXXFLAGS are "-pipe -march=native -mtune=native -msahf 
-maccumulate-outgoing-args -flto -fuse-linker-plugin -O3 -fomit-frame-pointer 
-fsched-pressure -flive-range-shrinkage -fweb -ftracer -fivopts -ftree-loop-im 
-frename-registers -fstdarg-opt".
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-06-30 11:31:58 UTC
Please always include the full build.log and emerge --info.

Anyway, please report this upstream (ideally with a PR given you've analysed it already).

See also bug 803338.