Repository navigation
Commit 63655f7
committed
fix(compat.sdl3): the C++ sources a *.c glob cannot see, and GL/glx.h
Two failures from the first CI run, both from assuming a shape rather than
checking it.
WINDOWS: SDL3 IS NOT ALL C. `core/windows`, `video/windows` and the GameInput
joystick backend (`joystick/gdk/SDL_gameinputjoystick.cpp`) carry C++ sources,
and `*/src/.../*.c` drops them silently — a glob that misses a file produces no
diagnostic at all until the link:
lld-link: error: undefined symbol: WIN_InitGameInput
lld-link: error: undefined symbol: SDL_GAMEINPUT_JoystickDriver
`render/direct3d12` has the same problem in the COMMON list: three of its files
are .cpp, so the `*.c` glob was linking half a renderer. Rather than patch only
the symbols the linker happened to name, the whole class was found by asking
the tree which sources are not .c — 34 directories, of which the windows-
relevant ones are these four. macOS was already right because its backends are
.m and the globs say .m.
LINUX/LLVM: `SDL_x11opengl.h` includes <GL/glx.h>, which is not in the Khronos
registry and needs `compat.glx-headers` — the same dependency, for the same
reason, that compat.sdl2 carries. This one is worth the comment it now has,
because it is invisible from two of the three places you would look: the gcc
toolchain's sysroot already carries GL/glx.h, so linux/gcc passed and so did a
local build with either compiler. Only the llvm leg says:
fatal error: 'GL/glx.h' file not found
Verified after the fix that the header now resolves to the PACKAGE's copy
(.mcpp/.../compat-x-glx-headers/1.7.0/libglvnd-1.7.0/include/GL/glx.h) rather
than to whatever the toolchain happened to have, which is the difference
between a fix and a coincidence. Both linux legs pass; windows is CI's to
confirm.1 parent d05bd9c commit 63655f7
1 file changed
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
840 | 840 | | |
841 | 841 | | |
842 | 842 | | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
843 | 846 | | |
844 | 847 | | |
845 | 848 | | |
| |||
909 | 912 | | |
910 | 913 | | |
911 | 914 | | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
912 | 925 | | |
913 | 926 | | |
914 | 927 | | |
| |||
0 commit comments