Summary
On Windows, building this package with newer Zig master fails during SDL_build_config.h generation because the Windows config helper provides several values that are not present in upstream SDL 3.4.4's SDL_build_config.h.cmake.
This appears to be exposed by newer Zig versions being stricter about unused addConfigHeader values.
Platform
Windows x86_64
Zig versions tested
Works:
0.16.0
0.17.0-dev.101+4e2147d14
Fails:
0.17.0-dev.667+0569f1f6a
0.17.0-dev.263+0add2dfc4
Error
└─ compile lib SDL3 Debug native
└─ configure cmake header dependency to SDL_build_config.h failure
error: C:\Repositories\sdl-build-failure-test\zig-pkg\N-V-__8AAL9L9AJxY67Fhxp52_VHlLps195MF3irmi4z8Qge\include/build_config/SDL_build_config.h.cmake: config header value unused: HAVE_D3D11_H
error: C:\Repositories\sdl-build-failure-test\zig-pkg\N-V-__8AAL9L9AJxY67Fhxp52_VHlLps195MF3irmi4z8Qge\include/build_config/SDL_build_config.h.cmake: config header value unused: HAVE_AUDIOCLIENT_H
error: C:\Repositories\sdl-build-failure-test\zig-pkg\N-V-__8AAL9L9AJxY67Fhxp52_VHlLps195MF3irmi4z8Qge\include/build_config/SDL_build_config.h.cmake: config header value unused: HAVE_SENSORSAPI_H
The Windows config code in this package appears to provide them to b.addConfigHeader, and removing the three entries locally allows the build to get past config-header generation:
.HAVE_D3D11_H = true,
.HAVE_AUDIOCLIENT_H = true,
.HAVE_SENSORSAPI_H = true,
Expected behaviour
The package should build without unused config-header values when used with newer Zig versions.
Question
Are these three HAVE_* values stale for SDL 3.4.4 and safe to remove, or should they be replaced with newer SDL config names?
Additional context
After removing those entries, build still fails later in translate-c, involving missing builtins (44 missing in total) such as:
__builtin_elementwise_fshr
__builtin_elementwise_fshl
I'm almost certain these are due to the upgrade to LLVM 22 or translate-c/arocc related (a couple of issues regarding missing builtins exist and/or have been fixed in translate-c)
Summary
On Windows, building this package with newer Zig master fails during
SDL_build_config.hgeneration because the Windows config helper provides several values that are not present in upstream SDL 3.4.4'sSDL_build_config.h.cmake.This appears to be exposed by newer Zig versions being stricter about unused
addConfigHeadervalues.Platform
Windows x86_64
Zig versions tested
Works:
Fails:
Error
The Windows config code in this package appears to provide them to
b.addConfigHeader, and removing the three entries locally allows the build to get past config-header generation:Expected behaviour
The package should build without unused config-header values when used with newer Zig versions.
Question
Are these three
HAVE_*values stale for SDL 3.4.4 and safe to remove, or should they be replaced with newer SDL config names?Additional context
After removing those entries, build still fails later in
translate-c, involving missing builtins (44 missing in total) such as:I'm almost certain these are due to the upgrade to LLVM 22 or translate-c/arocc related (a couple of issues regarding missing builtins exist and/or have been fixed in translate-c)