We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 5153 - Wayland: multiple definitions of `qt_touch_* on static link of both SDL2 and Qt5
Summary: Wayland: multiple definitions of `qt_touch_* on static link of both SDL2 and Qt5
Status: ASSIGNED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: HG 2.1
Hardware: All Linux
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-21 22:24 UTC by Vitaly Novichkov
Modified: 2020-05-29 22:50 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vitaly Novichkov 2020-05-21 22:24:36 UTC
I built both Qt5 and SDL2 being static libraries. I enabled Wayland on Qt side, and now I getting the conflict of multiple definitions on a link step:

```
lib/libSDL2.a(SDL_waylandtouch.c.o):(.rodata+0x200): multiple definition of `qt_touch_extension_interface'

/home/travis/Qt/5.14.2_static/lib/libQt5WaylandClient.a(wayland-touch-extension-protocol.o):(.data.rel.ro.local.qt_touch_extension_interface+0x0): first defined here

lib/libSDL2.a(SDL_waylandtouch.c.o):(.rodata+0x0): multiple definition of `qt_extended_surface_interface'

/home/travis/Qt/5.14.2_static/lib/libQt5WaylandClient.a(wayland-surface-extension-protocol.o):(.data.rel.ro.local.qt_extended_surface_interface+0x0): first defined here

lib/libSDL2.a(SDL_waylandtouch.c.o):(.rodata+0x100): multiple definition of `qt_surface_extension_interface'

/home/travis/Qt/5.14.2_static/lib/libQt5WaylandClient.a(wayland-surface-extension-protocol.o):(.data.rel.ro.local.qt_surface_extension_interface+0x0): first defined here

lib/libSDL2.a(SDL_waylandtouch.c.o):(.rodata+0x160): multiple definition of `qt_windowmanager_interface'

/home/travis/Qt/5.14.2_static/lib/libQt5WaylandClient.a(wayland-qt-windowmanager-protocol.o):(.data.rel.ro.local.qt_windowmanager_interface+0x0): first defined here
```

https://travis-ci.org/github/WohlSoft/PGE-Project/jobs/689789912

Can these definitions be renamed, or here is a possible work breakage?
Comment 1 Vitaly Novichkov 2020-05-21 22:26:14 UTC
P.S. Why I need Qt? Because I have a set of Qt-focused components in my project where I use SDL2 for audio output only, but the non-Qt runtime that fully uses SDL2 without Qt.
Comment 2 Vitaly Novichkov 2020-05-22 22:49:17 UTC
Okay, I had to resolve my problem by rebuilding of SDL2 with the -DVIDEO_WAYLAND_QT_TOUCH=OFF option. However, I am interesting in what purpose the QtWayland integration is needed and for which cases it's critical? Does this mean a changing this option will affect runtime of a game in KDE environment or something what?