mesonbuild / mesonbuild/wrapdb
SDL2 build fails on windows when VulkanSDK is installed
- Dominant language
- Meson
- Stars
- 118
- Forks
- 298
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 24
Description
When I try to build my project on windows that uses SDL2 as a subproject. I get a ton of linker errors relating to the test programs and vulkan. My project is not even using vulkan. The build succeeds on my linux machine which also has vulkan sdk installed. There are 34 of these linker errors and they are all the same except for that they are just for a different test program. Here is one of them:
`[1/70] Linking target subprojects/SDL2-2.30.6/test/testmultiaudio.exe
FAILED: subprojects/SDL2-2.30.6/test/testmultiaudio.exe subprojects/SDL2-2.30.6/test/testmultiaudio.pdb
"clang" -Wl,/MACHINE:X64 -Wl,/OUT:subprojects/SDL2-2.30.6/test/testmultiaudio.exe subprojects/SDL2-2.30.6/test/testmultiaudio.exe.p/testmultiaudio.c.obj subprojects/SDL2-2.30.6/test/testmultiaudio.exe.p/testutils.c.obj "-Wl,/release" "-Wl,/nologo" "-Wl,/DEBUG" "-Wl,/PDB:subprojects\SDL2-2.30.6\test\testmultiaudio.pdb" "-Wl,/WHOLEARCHIVE:subprojects/SDL2-2.30.6/libSDL2main.a" "subprojects/SDL2-2.30.6/libsdl2_test.a" "subprojects/SDL2-2.30.6/libSDL2.a" "subprojects/SDL2-2.30.6/libSDL2main.a" "-LC:\VulkanSDK\1.3.261.1\Lib" "-lvulkan-1" "-luser32" "-lgdi32" "-lwinmm" "-limm32" "-lole32" "-loleaut32" "-lversion" "-luuid" "-ladvapi32" "-lsetupapi" "-lshell32" "-ldinput8" "-LC:\VulkanSDK\1.3.261.1\Lib" "-lvulkan-1" "-luser32" "-lgdi32" "-lwinmm" "-limm32" "-lole32" "-loleaut32" "-lversion" "-luuid" "-ladvapi32" "-lsetupapi" "-lshell32" "-ldinput8" "-LC:\VulkanSDK\1.3.261.1\Lib" "-lvulkan-1" "-luser32" "-lgdi32" "-lwinmm" "-limm32" "-lole32" "-loleaut32" "-lversion" "-luuid" "-ladvapi32" "-lsetupapi" "-lshell32" "-ldinput8" "-Wl,/SUBSYSTEM:CONSOLE" "-lkernel32" "-lwinspool" "-lcomdlg32"
subprojects\SDL2-2.30.6\libsdl2_test.a : fatal error LNK1107: invalid or corrupt file: cannot read at 0x7CEA
clang: error: linker command failed with exit code 1107 (use -v to see invocation)`
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the Windows build that includes subprojects/SDL2-2.30.6 and inspect the link step for test/testmultiaudio.exe, especially the repeated VulkanSDK library arguments. Done means the SDL2 test programs link successfully when VulkanSDK is installed, without breaking the Linux build.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100