SDL looking for missing gameinput.h header while compiling for Windows
Likely a side-effect of the last few updates going on, and someone will likely patch it soon, but in case it went unnoticed, here's an excerpt from github ci:
...
SDL_gameinputjoystick.c
SDL_dinputhaptic.c
...project-path...\build\_deps\sdl-src\src\joystick\gdk\SDL_gameinputjoystick.c(29,10): error C1083: Cannot open include file: 'gameinput.h': No such file or directory [...project-path...\build\_deps\sdl-build\SDL3-shared.vcxproj]
(compiling source file '../sdl-src/src/joystick/gdk/SDL_gameinputjoystick.c')
How are you building SDL_gameinputjoystick.c on Linux? That's not supposed to be included in the build.
I'm.. not. I don't use anything gamepad related in my project (not yet anyway). Some other header from SDL is likely including it in the process. My cmakelist basically has the user check out the latest version of SDL from here (my attempt a specific commit was failing in a prior attempt, may well have been a config error, but I digress) and compile it along with my own project. Here's the full log from github's ci on the linux build in case you'd like to have a wider look: logs_30989057505.zip
That log looks like a Windows build, in which case it's probably this CI issue: https://github.com/actions/runner-images/issues/10980 & https://github.com/actions/runner-images/issues/10978
Oh my, I must have been tired indeed yesterday, having clicked the same link so many times and my brain just assumed "Linux" for some reason ... I will update the title/comments accordingly, my bad :(
I was playing around with a github pipeline a bit and at some point it started failing with this error
SDL_xinputjoystick.c
Generating Code...
Compiling...
SDL_gameinputjoystick.c
SDL_dinputhaptic.c
C:\setupsdl\16eb5b3e346096a6b19ce66a13b7e1ed19bdccf05d6144aace18b2c8fbb98373\source\src\joystick\gdk\SDL_gameinputjoystick.c(29,10): error C1083: Cannot open include file: 'gameinput.h': No such file or directory [C:\setupsdl\16eb5b3e346096a6b19ce66a13b7e1ed19bdccf05d6144aace18b2c8fbb98373\build\SDL3-shared.vcxproj]
(compiling source file '../source/src/joystick/gdk/SDL_gameinputjoystick.c')
Using this https://github.com/libsdl-org/setup-sdl
To be precise I was playing around with this and removed a few things. Which uses setup-sdl and that one failed for Windows (MSVC) while Windows (mingw64) was still passing (that was probably me only editing the msvc cmake flags so it used the cache for mingw).
The rename commit https://github.com/libsdl-org/SDL/commit/b5b868044fedc83959626fc433aa1a74e2c60200 should not be problematic right? Because windows is supposed to be case insensitive.
It is a bit annoying to debug because you never know what the github actions black box provides you with. And some caching also trolled me. But maybe we can just wait this out and microsoft will fix it on their end :shrug: The include should just work on any windows machine thats running May 2019 update or newer.
The actions log of https://github.com/libsdl-org/SDL/issues/11487#issuecomment-2481539175 contains the following lines, so the gameinput.h test succeeds
-- Performing Test HAVE_GAMEINPUT_H
-- Performing Test HAVE_GAMEINPUT_H - Success
So it's very weird it fails to include "gameinput.h".
D:\a\CubeChip-SDL\CubeChip-SDL\build\_deps\sdl-src\src\joystick\gdk\SDL_gameinputjoystick.c(29,10): error C1083: Cannot open include file: 'gameinput.h': No such file or directory [D:\a\CubeChip-SDL\CubeChip-SDL\build\_deps\sdl-build\SDL3-shared.vcxproj]
We've also seen an issue with the latest windows-2022 update on GitHub Actions (related to ARM32) (version 20241113.3.0). We worked around it by using an older Windows SDK.
Perhaps our preseeded MSVC cache is invalid? Does anything change by adding -DSDL_PRESEED=OFF to the cmake-arguments input of libsdl-org/setup-sdl?
Perhaps our preseeded MSVC cache is invalid? Does anything change by adding
-DSDL_PRESEED=OFFto thecmake-argumentsinput oflibsdl-org/setup-sdl?
I am not sure if I understood the caching yet. But turning off pre seed fixes the build.
https://github.com/ChillerDragon/SDL_image/commits/chiller_test/
UPDATE: turning it on with -DSDL_PRESEED=ON also invalidates the cache and builds from source but fails.
MSVC succeeded because you are using an older Windows runner image: 20241021.1.0 You need 20241113.x (or newer). Restart the job until you get the newer one.
MSVC succeeded because you are using an older Windows runner image: 20241021.1.0 You need 20241113.x (or newer). Restart the job until you get the newer one.
Indeed. I refreshed that very job until I hit Image: windows-2022 Version: 20241113.3.0 and then it failed.
https://github.com/actions/runner-images/issues/10980#issuecomment-2513163023
I think there's something wrong with either the MSBuild files or the CMake Visual Studio generator on the runner image. Switching to the Ninja CMake generator does not cause a gameinput.h error.
any update on this issue, still getting in ci / cd windows-latest
The resolution of https://github.com/actions/runner-images/issues/10980 was to use windows-2025