[SOLVED] Arch Linux Issue With Building Urho3D

Hello everyone,

Building Urho3D on Debian works, but on my Arch machine I get the following error “multiple definition of `WAYLAND_wl_proxy_get_user_data’” during the stage of “Linking CXX executable …/…/…/bin/Urho3DPlayer”.

More logs:

make[2]: *** [Source/Tools/Urho3DPlayer/CMakeFiles/Urho3DPlayer.dir/build.make:104: bin/Urho3DPlayer] Error 1
make[1]: *** [CMakeFiles/Makefile2:2746: Source/Tools/Urho3DPlayer/CMakeFiles/Urho3DPlayer.dir/all] Error 2
make: *** [Makefile:171: all] Error 2

Does anyone have an idea of what’s the issue?

Many thanks in advance.

Possibly related: Using esy-sdl2 with gcc 10. In gcc version 10 the flag -fno-common… | by Christian Lentfort | Medium
And also: Cannot build in Arch · Issue #1778 · onivim/oni2 · GitHub

Basically, you either add -fcommon to your compiler flags or if you need -fno-common then -Wl,--allow-multiple-definition to your linker. See link.

1 Like

In case anyone else runs across the same problem, issue was solved by adding add_definitions("-fcommon") to CMakeLists.txt.

You may also run into:

1 Like

I’m on Manjaro Linux (which is based on Arch Linux) and I disable wayland with cmake to solve this issue for my builds:
cmake -DVIDEO_WAYLAND=OFF

1 Like

Issues relating to the topic:

1 Like