Interrupt / systemshock

Shockolate - A minimalist and cross platform System Shock source port.
GNU General Public License v3.0
801 stars 62 forks source link

wayland being installed causes linker with SDL to fail #376

Open llight3 opened 3 years ago

llight3 commented 3 years ago

this was with the latest code on a basic compile in both x11 and wayland with SDL_VIDEODRIVER=x11 and SDL_VIDEODRIVER=wayland all error messages were with WAYLAND_wl_proxy_something both 32bit and 64bit versions tried

archlinux


/sbin/ld: build/.libs/SDL_assert.o:(.bss+0x0): multiple definition of `WAYLAND_wl_proxy_get_user_data'; build/.libs/SDL.o:(.bss+0x0): first defined here
/sbin/ld: build/.libs/SDL_assert.o:(.bss+0x8): multiple definition of `WAYLAND_wl_proxy_set_user_data'; build/.libs/SDL.o:(.bss+0x8): first defined here
/sbin/ld: build/.libs/SDL_assert.o:(.bss+0x10): multiple definition of `WAYLAND_wl_proxy_add_listener'; build/.libs/SDL.o:(.bss+0x10): first defined here
/sbin/ld: build/.libs/SDL_assert.o:(.bss+0x18): multiple definition of `WAYLAND_wl_proxy_destroy'; build/.libs/SDL.o:(.bss+0x18): first defined here
/sbin/ld: build/.libs/SDL_assert.o:(.bss+0x20): multiple definition of `WAYLAND_wl_proxy_marshal_constructor_versioned'; build/.libs/SDL.o:(.bss+0x20): first defined here
/sbin/ld: build/.libs/SDL_assert.o:(.bss+0x28): multiple definition of `WAYLAND_wl_proxy_marshal_constructor'; build/.libs/SDL.o:(.bss+0x28): first defined here```

```sbin/ld: build/.libs/SDL_fcitx.o:(.bss+0x30): multiple definition of `WAYLAND_wl_proxy_create'; build/.libs/SDL.o:(.bss+0x30): first defined here
/sbin/ld: build/.libs/SDL_fcitx.o:(.bss+0x38): multiple definition of `WAYLAND_wl_proxy_marshal'; build/.libs/SDL.o:(.bss+0x38): first defined here
/sbin/ld: build/.libs/SDL_sysjoystick.o:(.bss+0x0): multiple definition of `WAYLAND_wl_proxy_get_user_data'; build/.libs/SDL.o:(.bss+0x0): first defined here
/sbin/ld: build/.libs/SDL_sysjoystick.o:(.bss+0x8): multiple definition of `WAYLAND_wl_proxy_set_user_data'; build/.libs/SDL.o:(.bss+0x8): first defined here
/sbin/ld: build/.libs/SDL_sysjoystick.o:(.bss+0x10): multiple definition of `WAYLAND_wl_proxy_add_listener'; build/.libs/SDL.o:(.bss+0x10): first defined here
/sbin/ld: build/.libs/SDL_sysjoystick.o:(.bss+0x18): multiple definition of `WAYLAND_wl_proxy_destroy'; build/.libs/SDL.o:(.bss+0x18): first defined here
/sbin/ld: build/.libs/SDL_sysjoystick.o:(.bss+0x20): multiple definition of `WAYLAND_wl_proxy_marshal_constructor_versioned'; build/.libs/SDL.o:(.bss+0x20): first defined here
/sbin/ld: build/.libs/SDL_sysjoystick.o:(.bss+0x28): multiple definition of `WAYLAND_wl_proxy_marshal_constructor'; build/.libs/SDL.o:(.bss+0x28): first defined here
/sbin/ld: build/.libs/SDL_sysjoystick.o:(.bss+0x30): multiple definition of `WAYLAND_wl_proxy_create'; build/.libs/SDL.o:(.bss+0x30): first defined here
/sbin/ld: build/.libs/SDL_sysjoystick.o:(.bss+0x38): multiple definition of `WAYLAND_wl_proxy_marshal'; build/.libs/SDL.o:(.bss+0x38): first defined here
/sbin/ld: build/.libs/SDL_evdev.o:(.bss+0x0): multiple definition of `WAYLAND_wl_proxy_get_user_data'; build/.libs/SDL.o:(.bss+0x0): first defined here
/sbin/ld: build/.libs/SDL_evdev.o:(.bss+0x8): multiple definition of `WAYLAND_wl_proxy_set_user_data'; build/.libs/SDL.o:(.bss+0x8): first defined here
/sbin/ld: build/.libs/SDL_evdev.o:(.bss+0x10): multiple definition of `WAYLAND_wl_proxy_add_listener'; build/.libs/SDL.o:(.bss+0x10): first defined here
/sbin/ld: build/.libs/SDL_evdev.o:(.bss+0x18): multiple definition of `WAYLAND_wl_proxy_destroy'; build/.libs/SDL.o:(.bss+0x18): first defined here
/sbin/ld: build/.libs/SDL_evdev.o:(.bss+0x20): multiple definition of `WAYLAND_wl_proxy_marshal_constructor_versioned'; build/.libs/SDL.o:(.bss+0x20): first defined here
/sbin/ld: build/.libs/SDL_evdev.o:(.bss+0x28): multiple definition of `WAYLAND_wl_proxy_marshal_constructor'; build/.libs/SDL.o:(.bss+0x28): first defined here
/sbin/ld: build/.libs/SDL_evdev.o:(.bss+0x30): multiple definition of `WAYLAND_wl_proxy_create'; build/.libs/SDL.o:(.bss+0x30): first defined here
/sbin/ld: build/.libs/SDL_evdev.o:(.bss+0x38): multiple definition of `WAYLAND_wl_proxy_marshal'; build/.libs/SDL.o:(.bss+0x38): first defined here
/sbin/ld: build/.libs/SDL_evdev_kbd.o:(.bss+0x10): multiple definition of `WAYLAND_wl_proxy_get_user_data'; build/.libs/SDL.o:(.bss+0x0): first defined here
/sbin/ld: build/.libs/SDL_evdev_kbd.o:(.bss+0x18): multiple definition of `WAYLAND_wl_proxy_set_user_data'; build/.libs/SDL.o:(.bss+0x8): first defined here
/sbin/ld: build/.libs/SDL_evdev_kbd.o:(.bss+0x20): multiple definition of `WAYLAND_wl_proxy_add_listener'; build/.libs/SDL.o:(.bss+0x10): first defined here
/sbin/ld: build/.libs/SDL_evdev_kbd.o:(.bss+0x28): multiple definition of `WAYLAND_wl_proxy_destroy'; build/.libs/SDL.o:(.bss+0x18): first defined here
/sbin/ld: build/.libs/SDL_evdev_kbd.o:(.bss+0x30): multiple definition of `WAYLAND_wl_proxy_marshal_constructor_versioned'; build/.libs/SDL.o:(.bss+0x20): first defined here
/sbin/ld: build/.libs/SDL_evdev_kbd.o:(.bss+0x38): multiple definition of `WAYLAND_wl_proxy_marshal_constructor'; build/.libs/SDL.o:(.bss+0x28): first defined here
/sbin/ld: build/.libs/SDL_evdev_kbd.o:(.bss+0x40): multiple definition of `WAYLAND_wl_proxy_create'; build/.libs/SDL.o:(.bss+0x30): first defined here
/sbin/ld: build/.libs/SDL_evdev_kbd.o:(.bss+0x48): multiple definition of `WAYLAND_wl_proxy_marshal'; build/.libs/SDL.o:(.bss+0x38): first defined here
collect2: error: ld returned 1 exit status
make: *** [Makefile:147: build/libSDL2.la] Error 1```
llight3 commented 3 years ago

A workaround for this is to set the SDL_version in build_deps.sh to the sdl2 version installed on your pc for me this meant i moved from SDL_version=2.0.9 to SDL_version=2.0.12

la-ninpre commented 2 years ago

i've encountered the same issue and workaround for me was to just pass all dependencies from my system, so

cmake .. -DENABLE_SDL2=ON -DENABLE_SOUND=ON -DENABLE_FLUIDSYNTH=ON -DENABLE_OPENGL=ON

note: ah, yes, im building inside another directory, not in the source tree, hence .. in cmake invocation.