Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wayland] fails to build with Wayland 1.20.0 - undefined reference to 'wl_proxy_marshal_flags' #5088

Closed
SupervisedThinking opened this issue Dec 10, 2021 · 4 comments · Fixed by #5092

Comments

@SupervisedThinking
Copy link

SupervisedThinking commented Dec 10, 2021

SDL 2 https://github.com/libsdl-org/SDL/releases/tag/release-2.0.18 + #5058 fails to build against Wayland 1.20.0 - 1.19.0 is fine. I guess it's related to https://github.com/wayland-project/wayland/commit/23e4a7060080ebb61f516a2edcd71ab123029c0e

Probably the same issue as here: https://bugs.gentoo.org/811840 & and the workaround LDFLAGS="${LDFLAGS} -lwayland-client" fixed it for me too.

Build log https://pastebin.com/PHZTgHBf

FAILED: libSDL2-2.0.so.0.18.0 
: && /mnt/dev/LibreELEC-RR/build.LibreELEC-wayland.x86_64-11.0-devel/toolchain/bin/x86_64-libreelec-linux-gnu-gcc -fPIC -march=x86-64 -m64 -mmmx -msse -msse2 -mfpmath=sse -Wall -pipe  -O2 -fomit-frame-pointer -DNDEBUG -idirafter "/mnt/dev/LibreELEC-RR/build.LibreELEC-wayland.x86_64-11.0-devel/build/sdl2-2.0.18/src/video/khronos" -I/mnt/dev/LibreELEC-RR/build.LibreELEC-wayland.x86_64-11.0-devel/toolchain/x86_64-libreelec-linux-gnu/sysroot/usr/include/libusb-1.0 -DHAVE_LINUX_VERSION_H -I/mnt/dev/LibreELEC-RR/build.LibreELEC-wayland.x86_64-11.0-devel/toolchain/x86_64-libreelec-linux-gnu/sysroot/usr/include/libdrm -DMESA_EGL_NO_X11_HEADERS -DEGL_NO_X11 -I/mnt/dev/LibreELEC-RR/build.LibreELEC-wayland.x86_64-11.0-devel/toolchain/x86_64-libreelec-linux-gnu/sysroot/usr/include -D_REENTRANT -mfpmath=387 -msse3 -msse2 -msse -mmmx -fdiagnostics-color=always -Wshadow -fvisibility=hidden -Wdeclaration-after-statement -Werror=declaration-after-statement -fno-strict-aliasing -Wall  -O3 -DNDEBUG  -march=x86-64 -m64 -Wl,--as-needed -fuse-ld=gold -shared -Wl,-soname,libSDL2-2.0.so.0 -o libSDL2-2.0.so.0.18.0 CMakeFiles/SDL2.dir/src/SDL.c.o CMakeFiles/SDL2.dir/src/SDL_assert.c.o CMakeFiles/SDL2.dir/src/SDL_dataqueue.c.o CMakeFiles/SDL2.dir/src/SDL_error.c.o CMakeFiles/SDL2.dir/src/SDL_hints.c.o CMakeFiles/SDL2.dir/src/SDL_log.c.o CMakeFiles/SDL2.dir/src/atomic/SDL_atomic.c.o CMakeFiles/SDL2.dir/src/atomic/SDL_spinlock.c.o CMakeFiles/SDL2.dir/src/audio/SDL_audio.c.o CMakeFiles/SDL2.dir/src/audio/SDL_audiocvt.c.o CMakeFiles/SDL2.dir/src/audio/SDL_audiodev.c.o CMakeFiles/SDL2.dir/src/audio/SDL_audiotypecvt.c.o CMakeFiles/SDL2.dir/src/audio/SDL_mixer.c.o CMakeFiles/SDL2.dir/src/audio/SDL_wave.c.o CMakeFiles/SDL2.dir/src/cpuinfo/SDL_cpuinfo.c.o CMakeFiles/SDL2.dir/src/dynapi/SDL_dynapi.c.o CMakeFiles/SDL2.dir/src/events/SDL_clipboardevents.c.o CMakeFiles/SDL2.dir/src/events/SDL_displayevents.c.o CMakeFiles/SDL2.dir/src/events/SDL_dropevents.c.o CMakeFiles/SDL2.dir/src/events/SDL_events.c.o CMakeFiles/SDL2.dir/src/events/SDL_gesture.c.o CMakeFiles/SDL2.dir/src/events/SDL_keyboard.c.o CMakeFiles/SDL2.dir/src/events/SDL_mouse.c.o CMakeFiles/SDL2.dir/src/events/SDL_quit.c.o CMakeFiles/SDL2.dir/src/events/SDL_touch.c.o CMakeFiles/SDL2.dir/src/events/SDL_windowevents.c.o CMakeFiles/SDL2.dir/src/events/imKStoUCS.c.o CMakeFiles/SDL2.dir/src/file/SDL_rwops.c.o CMakeFiles/SDL2.dir/src/haptic/SDL_haptic.c.o CMakeFiles/SDL2.dir/src/hidapi/SDL_hidapi.c.o CMakeFiles/SDL2.dir/src/libm/e_atan2.c.o CMakeFiles/SDL2.dir/src/libm/e_exp.c.o CMakeFiles/SDL2.dir/src/libm/e_fmod.c.o CMakeFiles/SDL2.dir/src/libm/e_log.c.o CMakeFiles/SDL2.dir/src/libm/e_log10.c.o CMakeFiles/SDL2.dir/src/libm/e_pow.c.o CMakeFiles/SDL2.dir/src/libm/e_rem_pio2.c.o CMakeFiles/SDL2.dir/src/libm/e_sqrt.c.o CMakeFiles/SDL2.dir/src/libm/k_cos.c.o CMakeFiles/SDL2.dir/src/libm/k_rem_pio2.c.o CMakeFiles/SDL2.dir/src/libm/k_sin.c.o CMakeFiles/SDL2.dir/src/libm/k_tan.c.o CMakeFiles/SDL2.dir/src/libm/s_atan.c.o CMakeFiles/SDL2.dir/src/libm/s_copysign.c.o CMakeFiles/SDL2.dir/src/libm/s_cos.c.o CMakeFiles/SDL2.dir/src/libm/s_fabs.c.o CMakeFiles/SDL2.dir/src/libm/s_floor.c.o CMakeFiles/SDL2.dir/src/libm/s_scalbn.c.o CMakeFiles/SDL2.dir/src/libm/s_sin.c.o CMakeFiles/SDL2.dir/src/libm/s_tan.c.o CMakeFiles/SDL2.dir/src/locale/SDL_locale.c.o CMakeFiles/SDL2.dir/src/misc/SDL_url.c.o CMakeFiles/SDL2.dir/src/power/SDL_power.c.o CMakeFiles/SDL2.dir/src/render/SDL_d3dmath.c.o CMakeFiles/SDL2.dir/src/render/SDL_render.c.o CMakeFiles/SDL2.dir/src/render/SDL_yuv_sw.c.o CMakeFiles/SDL2.dir/src/render/direct3d/SDL_render_d3d.c.o CMakeFiles/SDL2.dir/src/render/direct3d/SDL_shaders_d3d.c.o CMakeFiles/SDL2.dir/src/render/direct3d11/SDL_render_d3d11.c.o CMakeFiles/SDL2.dir/src/render/direct3d11/SDL_shaders_d3d11.c.o CMakeFiles/SDL2.dir/src/render/opengl/SDL_render_gl.c.o CMakeFiles/SDL2.dir/src/render/opengl/SDL_shaders_gl.c.o CMakeFiles/SDL2.dir/src/render/opengles/SDL_render_gles.c.o CMakeFiles/SDL2.dir/src/render/opengles2/SDL_render_gles2.c.o CMakeFiles/SDL2.dir/src/render/opengles2/SDL_shaders_gles2.c.o CMakeFiles/SDL2.dir/src/render/psp/SDL_render_psp.c.o CMakeFiles/SDL2.dir/src/render/software/SDL_blendfillrect.c.o CMakeFiles/SDL2.dir/src/render/software/SDL_blendline.c.o CMakeFiles/SDL2.dir/src/render/software/SDL_blendpoint.c.o CMakeFiles/SDL2.dir/src/render/software/SDL_drawline.c.o CMakeFiles/SDL2.dir/src/render/software/SDL_drawpoint.c.o CMakeFiles/SDL2.dir/src/render/software/SDL_render_sw.c.o CMakeFiles/SDL2.dir/src/render/software/SDL_rotate.c.o CMakeFiles/SDL2.dir/src/render/software/SDL_triangle.c.o CMakeFiles/SDL2.dir/src/render/vitagxm/SDL_render_vita_gxm.c.o CMakeFiles/SDL2.dir/src/render/vitagxm/SDL_render_vita_gxm_memory.c.o CMakeFiles/SDL2.dir/src/render/vitagxm/SDL_render_vita_gxm_tools.c.o CMakeFiles/SDL2.dir/src/sensor/SDL_sensor.c.o CMakeFiles/SDL2.dir/src/stdlib/SDL_crc32.c.o CMakeFiles/SDL2.dir/src/stdlib/SDL_getenv.c.o CMakeFiles/SDL2.dir/src/stdlib/SDL_iconv.c.o CMakeFiles/SDL2.dir/src/stdlib/SDL_malloc.c.o CMakeFiles/SDL2.dir/src/stdlib/SDL_qsort.c.o CMakeFiles/SDL2.dir/src/stdlib/SDL_stdlib.c.o CMakeFiles/SDL2.dir/src/stdlib/SDL_string.c.o CMakeFiles/SDL2.dir/src/stdlib/SDL_strtokr.c.o CMakeFiles/SDL2.dir/src/thread/SDL_thread.c.o CMakeFiles/SDL2.dir/src/timer/SDL_timer.c.o CMakeFiles/SDL2.dir/src/video/SDL_RLEaccel.c.o CMakeFiles/SDL2.dir/src/video/SDL_blit.c.o CMakeFiles/SDL2.dir/src/video/SDL_blit_0.c.o CMakeFiles/SDL2.dir/src/video/SDL_blit_1.c.o CMakeFiles/SDL2.dir/src/video/SDL_blit_A.c.o CMakeFiles/SDL2.dir/src/video/SDL_blit_N.c.o CMakeFiles/SDL2.dir/src/video/SDL_blit_auto.c.o CMakeFiles/SDL2.dir/src/video/SDL_blit_copy.c.o CMakeFiles/SDL2.dir/src/video/SDL_blit_slow.c.o CMakeFiles/SDL2.dir/src/video/SDL_bmp.c.o CMakeFiles/SDL2.dir/src/video/SDL_clipboard.c.o CMakeFiles/SDL2.dir/src/video/SDL_egl.c.o CMakeFiles/SDL2.dir/src/video/SDL_fillrect.c.o CMakeFiles/SDL2.dir/src/video/SDL_pixels.c.o CMakeFiles/SDL2.dir/src/video/SDL_rect.c.o CMakeFiles/SDL2.dir/src/video/SDL_shape.c.o CMakeFiles/SDL2.dir/src/video/SDL_stretch.c.o CMakeFiles/SDL2.dir/src/video/SDL_surface.c.o CMakeFiles/SDL2.dir/src/video/SDL_video.c.o CMakeFiles/SDL2.dir/src/video/SDL_vulkan_utils.c.o CMakeFiles/SDL2.dir/src/video/SDL_yuv.c.o CMakeFiles/SDL2.dir/src/video/yuv2rgb/yuv_rgb.c.o CMakeFiles/SDL2.dir/src/joystick/SDL_gamecontroller.c.o CMakeFiles/SDL2.dir/src/joystick/SDL_joystick.c.o CMakeFiles/SDL2.dir/src/loadso/dlopen/SDL_sysloadso.c.o CMakeFiles/SDL2.dir/src/audio/alsa/SDL_alsa_audio.c.o CMakeFiles/SDL2.dir/src/audio/pulseaudio/SDL_pulseaudio.c.o CMakeFiles/SDL2.dir/src/video/kmsdrm/SDL_kmsdrmdyn.c.o CMakeFiles/SDL2.dir/src/video/kmsdrm/SDL_kmsdrmevents.c.o CMakeFiles/SDL2.dir/src/video/kmsdrm/SDL_kmsdrmmouse.c.o CMakeFiles/SDL2.dir/src/video/kmsdrm/SDL_kmsdrmopengles.c.o CMakeFiles/SDL2.dir/src/video/kmsdrm/SDL_kmsdrmvideo.c.o CMakeFiles/SDL2.dir/src/video/kmsdrm/SDL_kmsdrmvulkan.c.o CMakeFiles/SDL2.dir/src/video/wayland/SDL_waylandclipboard.c.o CMakeFiles/SDL2.dir/src/video/wayland/SDL_waylanddatamanager.c.o CMakeFiles/SDL2.dir/src/video/wayland/SDL_waylanddyn.c.o CMakeFiles/SDL2.dir/src/video/wayland/SDL_waylandevents.c.o CMakeFiles/SDL2.dir/src/video/wayland/SDL_waylandkeyboard.c.o CMakeFiles/SDL2.dir/src/video/wayland/SDL_waylandmessagebox.c.o CMakeFiles/SDL2.dir/src/video/wayland/SDL_waylandmouse.c.o CMakeFiles/SDL2.dir/src/video/wayland/SDL_waylandopengles.c.o CMakeFiles/SDL2.dir/src/video/wayland/SDL_waylandtouch.c.o CMakeFiles/SDL2.dir/src/video/wayland/SDL_waylandvideo.c.o CMakeFiles/SDL2.dir/src/video/wayland/SDL_waylandvulkan.c.o CMakeFiles/SDL2.dir/src/video/wayland/SDL_waylandwindow.c.o CMakeFiles/SDL2.dir/wayland-generated-protocols/idle-inhibit-unstable-v1-protocol.c.o CMakeFiles/SDL2.dir/wayland-generated-protocols/keyboard-shortcuts-inhibit-unstable-v1-protocol.c.o CMakeFiles/SDL2.dir/wayland-generated-protocols/pointer-constraints-unstable-v1-protocol.c.o CMakeFiles/SDL2.dir/wayland-generated-protocols/relative-pointer-unstable-v1-protocol.c.o CMakeFiles/SDL2.dir/wayland-generated-protocols/text-input-unstable-v3-protocol.c.o CMakeFiles/SDL2.dir/wayland-generated-protocols/wayland-protocol.c.o CMakeFiles/SDL2.dir/wayland-generated-protocols/xdg-activation-v1-protocol.c.o CMakeFiles/SDL2.dir/wayland-generated-protocols/xdg-decoration-unstable-v1-protocol.c.o CMakeFiles/SDL2.dir/wayland-generated-protocols/xdg-shell-protocol.c.o CMakeFiles/SDL2.dir/src/core/unix/SDL_poll.c.o CMakeFiles/SDL2.dir/src/haptic/linux/SDL_syshaptic.c.o CMakeFiles/SDL2.dir/src/core/linux/SDL_dbus.c.o CMakeFiles/SDL2.dir/src/core/linux/SDL_ime.c.o CMakeFiles/SDL2.dir/src/core/linux/SDL_fcitx.c.o CMakeFiles/SDL2.dir/src/core/linux/SDL_udev.c.o CMakeFiles/SDL2.dir/src/core/linux/SDL_evdev.c.o CMakeFiles/SDL2.dir/src/core/linux/SDL_evdev_kbd.c.o CMakeFiles/SDL2.dir/src/core/linux/SDL_evdev_capabilities.c.o CMakeFiles/SDL2.dir/src/core/linux/SDL_threadprio.c.o CMakeFiles/SDL2.dir/src/joystick/linux/SDL_sysjoystick.c.o CMakeFiles/SDL2.dir/src/joystick/steam/SDL_steamcontroller.c.o CMakeFiles/SDL2.dir/src/thread/pthread/SDL_systhread.c.o CMakeFiles/SDL2.dir/src/thread/pthread/SDL_sysmutex.c.o CMakeFiles/SDL2.dir/src/thread/pthread/SDL_syscond.c.o CMakeFiles/SDL2.dir/src/thread/pthread/SDL_systls.c.o CMakeFiles/SDL2.dir/src/thread/pthread/SDL_syssem.c.o CMakeFiles/SDL2.dir/src/misc/unix/SDL_sysurl.c.o CMakeFiles/SDL2.dir/src/power/linux/SDL_syspower.c.o CMakeFiles/SDL2.dir/src/locale/unix/SDL_syslocale.c.o CMakeFiles/SDL2.dir/src/filesystem/unix/SDL_sysfilesystem.c.o CMakeFiles/SDL2.dir/src/timer/unix/SDL_systimer.c.o CMakeFiles/SDL2.dir/src/sensor/dummy/SDL_dummysensor.c.o  -lm  -ldl  -ldbus-1  -lunwind  -lz  -lunwind-generic  -Wl,--no-undefined  -pthread && :
CMakeFiles/SDL2.dir/src/video/wayland/SDL_waylanddatamanager.c.o:SDL_waylanddatamanager.c:function Wayland_data_source_destroy: error: undefined reference to 'wl_proxy_marshal_flags'
CMakeFiles/SDL2.dir/src/video/wayland/SDL_waylanddatamanager.c.o:SDL_waylanddatamanager.c:function Wayland_data_offer_receive: error: undefined reference to 'wl_proxy_marshal_flags'
CMakeFiles/SDL2.dir/src/video/wayland/SDL_waylanddatamanager.c.o:SDL_waylanddatamanager.c:function Wayland_data_offer_destroy: error: undefined reference to 'wl_proxy_marshal_flags'
CMakeFiles/SDL2.dir/src/video/wayland/SDL_waylanddatamanager.c.o:SDL_waylanddatamanager.c:function Wayland_data_device_clear_selection: error: undefined reference to 'wl_proxy_marshal_flags'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
Sodivad added a commit to davidedmundson/SDL that referenced this issue Dec 10, 2021
@SupervisedThinking
Copy link
Author

fixed by #5092 - builds fine now, thx 👍🏻

@CrlClgrs
Copy link

I resolved this by mixing info coming from:

https://groups.google.com/g/linux.debian.bugs.dist/c/YmD-_Qk7YTY?pli=1
https://community.mnt.re/t/undefined-symbol-wl-proxy-marshal-flags/783

In my case the problem was that the referred libwayland showing in ldd (e.g. ldd -r krusader - or whenever executable that gives you the issue) is in /opt/admgpu instead the one in /usr/lib/x86_64-linux-gnu - do not know exactly the reason for that.
After upgrade this led to several problems (for example cannot get libgtk3 working again unless downgrading it).
Finally, the solution for me was to edit amdgpu files in /etc/ld.so.conf.d by adding /usr/lib/x86_64-linux-gnu at the first line. Then, rebuild the ld indexes with sudo rm /etc/ld.so.cache and sudo ldconfig.
This way the ldd resolves the correct linked objects and things get to work again.

@AgenttiX
Copy link

Thank you very much, @CrlClgrs! A similar issue broke the SDDM display manager and therefore the login screen when upgrading from Kubuntu 21.10 to 22.04, and your instructions fixed it. The files I edited according to your instructions were 10-amdgpu-pro.conf and 20-amdgpu.conf, and they are now:

10-amdgpu-pro.conf

/usr/lib/x86_64-linux-gnu  
/opt/amdgpu-pro/lib/x86_64-linux-gnu  
/opt/amdgpu-pro/lib/i386-linux-gnu

20-amdgpu.conf

/usr/lib/x86_64-linux-gnu  
/opt/amdgpu/lib/x86_64-linux-gnu  
/opt/amdgpu/lib/i386-linux-gnu

(Editing only one of these files might be sufficient, though.)

The error message I got was:

The current theme cannot be loaded due to the errors below, please select another theme.

file:///usr/share/sddm/themes/ubuntu-theme/Main.qml:14.1: plugin cannot be loaded for module "org.kde.plasma.core": Cannot load library /usr/lib/x86_64-linux-gnu/qt5/qml/org/kde/plasma/core/libcorebindingsplugin.so: (/lib/x86_64-linux-gnu/libKF5GuiAddons.so.5: undefined symbol: wl_proxy_marshal_flags)

Similar issues have been mentioned on

@gusarg81
Copy link

Hi, I have the same problem. AMDGPU driver 22.10.2.50102-1416360 - Ubuntu 20.04 - Kernel: 5.13.0-51-generic.

When I apply the fix commented here, SDDM/Xorg won't start:

[ 762.712] (EE) Backtrace:
[ 762.713] (EE) 0: /usr/lib/xorg/Xorg (OsLookupColor+0x13c) [0x5591b51bbaec]
[ 762.713] (EE) 1: /lib/x86_64-linux-gnu/libpthread.so.0 (funlockfile+0x60) [0x7f4383c7c420]
[ 762.713] (EE) 2: /usr/lib/x86_64-linux-gnu/dri/amdgpu_dri.so (getEGLInterface+0x5a4d) [0x7f4321cd7a7d]
[ 762.713] (EE) 3: /usr/lib/x86_64-linux-gnu/dri/amdgpu_dri.so (getEGLInterface+0x60c7) [0x7f4321cd80f7]
[ 762.713] (EE) 4: /usr/lib/x86_64-linux-gnu/dri/amdgpu_dri.so (eglInitialize+0xa9) [0x7f4321cdcb09]
[ 762.713] (EE) 5: /usr/lib/xorg/modules/libglamoregl.so (glamor_egl_init+0xa6) [0x7f437c327c16]
[ 762.713] (EE) unw_get_proc_name failed: no unwind info found [-10]
[ 762.713] (EE) 6: /opt/amdgpu/lib/xorg/modules/drivers/amdgpu_drv.so (?+0x0) [0x7f438352663d]
[ 762.713] (EE) unw_get_proc_name failed: no unwind info found [-10]
[ 762.713] (EE) 7: /opt/amdgpu/lib/xorg/modules/drivers/amdgpu_drv.so (?+0x0) [0x7f4383517bec]
[ 762.713] (EE) unw_get_proc_name failed: no unwind info found [-10]
[ 762.713] (EE) 8: /opt/amdgpu/lib/xorg/modules/drivers/amdgpu_drv.so (?+0x0) [0x7f438351845a]
[ 762.714] (EE) 9: /usr/lib/xorg/Xorg (InitOutput+0xb94) [0x5591b509bc44]
[ 762.714] (EE) 10: /usr/lib/xorg/Xorg (InitFonts+0x1d4) [0x5591b505de84]
[ 762.714] (EE) 11: /lib/x86_64-linux-gnu/libc.so.6 (__libc_start_main+0xf3) [0x7f4383a98083]
[ 762.714] (EE) 12: /usr/lib/xorg/Xorg (_start+0x2e) [0x5591b5047aae]
[ 762.714] (EE)
[ 762.714] (EE) Segmentation fault at address 0x0
[ 762.714] (EE)
Fatal server error:
[ 762.714] (EE) Caught signal 11 (Segmentation fault). Server aborting
[ 762.714] (EE)
[ 762.714] (EE)
Please consult the The X.Org Foundation support
at http://wiki.x.org
for help.

Reverting the change brings SDDM/Xorg back again.

Any ideas?

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants