Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing gameinput.h header while compiling on Windows (Github CI specific) #11487

Open
coornio opened this issue Nov 17, 2024 · 9 comments
Open
Milestone

Comments

@coornio
Copy link

coornio commented Nov 17, 2024

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')
@slouken
Copy link
Collaborator

slouken commented Nov 17, 2024

How are you building SDL_gameinputjoystick.c on Linux? That's not supposed to be included in the build.

@slouken slouken added this to the 3.2.0 milestone Nov 17, 2024
@coornio
Copy link
Author

coornio commented Nov 17, 2024

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

@slime73
Copy link
Contributor

slime73 commented Nov 17, 2024

That log looks like a Windows build, in which case it's probably this CI issue: actions/runner-images#10980 & actions/runner-images#10978

@coornio
Copy link
Author

coornio commented Nov 18, 2024

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 :(

@coornio coornio changed the title SDL looking for windows-specific gameinput.h header while compiling for linux SDL looking for missing gameinput.h header while compiling for Windows Nov 18, 2024
@ChillerDragon
Copy link
Contributor

ChillerDragon commented Nov 20, 2024

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 b5b8680 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 🤷
The include should just work on any windows machine thats running May 2019 update or newer.

@madebr
Copy link
Contributor

madebr commented Nov 20, 2024

The actions log of #11487 (comment) 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?

@ChillerDragon
Copy link
Contributor

ChillerDragon commented Nov 20, 2024

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?

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/

image


UPDATE: turning it on with -DSDL_PRESEED=ON also invalidates the cache and builds from source but fails.

image

@coornio coornio changed the title SDL looking for missing gameinput.h header while compiling for Windows Missing gameinput.h header while compiling on Windows (Github CI specific) Nov 20, 2024
@madebr
Copy link
Contributor

madebr commented Nov 20, 2024

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.

@ChillerDragon
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants