Emulator Issues #13470
closedLinker error on Debian 12 when building Dolphin Dolphin 5.0-21041
0%
Description
What's the problem? Describe what went wrong.
Dolphin fails to build on Debian 12 due to a linker error.
HIDAPI and SDL2 have conflicting symbol names.
Everything compiles successfully (progress reaches 100%),
but when linking I get the following:
/usr/bin/ld: ../../../Externals/hidapi/CMakeFiles/hidapi.dir/linux/hid.c.o:(.data.rel.local+0x0): multiple definition of `device_string_names'; ../../../Externals/SDL/SDL/CMakeFiles/SDL2-static.dir/src/hidapi/SDL_hidapi.c.o:(.data.rel.local+0x0): first defined here
collect2: error: ld returned 1 exit status
make[2]: *** [Source/Core/DolphinQt/CMakeFiles/dolphin-emu.dir/build.make:3277: Binaries/dolphin-emu] Error 1
make[1]: *** [CMakeFiles/Makefile2:3073: Source/Core/DolphinQt/CMakeFiles/dolphin-emu.dir/all] Error 2
make: *** [Makefile:156: all] Error 2
If I remove HIDAPI from CMakeList.txt (which seems to be included in SDL2 anyways),
everything compiles and links and I get a functioning binary. That is, I comment out:
if(NOT ANDROID)
dolphin_find_optional_system_library(HIDAPI Externals/hidapi)
endif()
I tested dolphin-emu-nogui successfully (haven't tried dolphin-emu or dolphin-tools yet).
What steps will reproduce the problem?
Clone dolphin repo
init submodules
mkdir build
run cmake
run make
[Version number here]
Dolphin 5.0-21041-dirty
What are your PC specifications? (CPU, GPU, Operating System, more)
OS: Debian 12 Bookworm
CPU: AMD Ryzen 9 3900X × 24
GPU: AMD Radeon RX 6900 XT
Compiler: Debian clang version 14.0.6
CMake: cmake version 3.25.1
Updated by AdmiralCurtiss 3 months ago
- Status changed from New to Fixed
- Fixed in set to 5.0-21063
Should be fixed in 5.0-21063
https://dolphin-emu.org/download/dev/3a9860eb6e8baf12e071823d0e90690c4db7db3a/
Though it's possible that this is only hiding the bug because the version now matches...?