| Summary: | Failed to link the SDL_sysjoystick.c.o while building by CMake | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Vitaly Novichkov <admin> |
| Component: | build | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | major | ||
| Priority: | P2 | CC: | sezeroz |
| Version: | HG 2.1 | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
|
Description
Vitaly Novichkov
2020-11-12 08:20:04 UTC
I guess SDL_USE_LIBUDEV guards around MaybeRemoveDevice()
need removing. Try the following patch.
diff --git a/src/joystick/linux/SDL_sysjoystick.c b/src/joystick/linux/SDL_sysjoystick.c
--- a/src/joystick/linux/SDL_sysjoystick.c
+++ b/src/joystick/linux/SDL_sysjoystick.c
@@ -343,7 +343,6 @@ MaybeAddDevice(const char *path)
return numjoysticks;
}
-#if SDL_USE_LIBUDEV
static int
MaybeRemoveDevice(const char *path)
{
@@ -386,7 +385,6 @@ MaybeRemoveDevice(const char *path)
return -1;
}
-#endif
static void
HandlePendingRemovals(void)
Thanks!
At the same time, the mistake at SDL header:
```
include/SDL2/SDL_keycode.h:344:37: warning: comma at end of enumerator list [-Wpedantic]
KMOD_GUI = KMOD_LGUI | KMOD_RGUI,
```
that breaks C90 compatibility
(In reply to Vitaly Novichkov from comment #3) > include/SDL2/SDL_keycode.h:344:37: warning: comma at end of enumerator list > [-Wpedantic] > KMOD_GUI = KMOD_LGUI | KMOD_RGUI, https://hg.libsdl.org/SDL/rev/cf742a3c038f And then:
```
include/SDL2/SDL_gamecontroller.h:366:37: error: expected identifier before ‘/’ token
SDL_CONTROLLER_BUTTON_MISC1, // Xbox Series X share button, PS4/PS5 touchpad button, Nintendo Switch Pro capture button
```
(In reply to Vitaly Novichkov from comment #5) > And then: > ``` > include/SDL2/SDL_gamecontroller.h:366:37: error: expected identifier before > ‘/’ token > SDL_CONTROLLER_BUTTON_MISC1, // Xbox Series X share button, PS4/PS5 > touchpad button, Nintendo Switch Pro capture button > ``` Well, compile a list of any other enums with comma at the end and open a bug entry here. Otherwise you'll find others when- ever we fix the one above. I'll try that at evening, right now I am busy at my work, and I only trying to build the thing at Semaphore-CI that won't build because of those bugs here. |