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

Static linking fails when building for x86_64 #110

Open
krakpot opened this issue Jul 17, 2024 · 0 comments
Open

Static linking fails when building for x86_64 #110

krakpot opened this issue Jul 17, 2024 · 0 comments

Comments

@krakpot
Copy link
Contributor

krakpot commented Jul 17, 2024

I've been trying to get everything to compile for x86_64 under Ubuntu 22.04. AFAIK I've followed the instructions in DEVELOPMENT.md but linking failed:

user@hosts:~/src/guppyscreen-ballaswag (main)$ make -j8 build

[... stuff removed ...]

/usr/bin/ld: (.text+0xc2): undefined reference to `wl_proxy_marshal_flags'
/usr/bin/ld: (.text+0xd1): undefined reference to `wl_proxy_get_version'
/usr/bin/ld: (.text+0xe7): undefined reference to `wl_proxy_marshal_flags'
/usr/bin/ld: (.text+0xf6): undefined reference to `wl_proxy_get_version'
/usr/bin/ld: (.text+0x10c): undefined reference to `wl_proxy_marshal_flags'
/usr/bin/ld: (.text+0x11b): undefined reference to `wl_proxy_get_version'
/usr/bin/ld: (.text+0x131): undefined reference to `wl_proxy_marshal_flags'
/usr/bin/ld: (.text+0x140): undefined reference to `wl_proxy_get_version'
/usr/bin/ld: (.text+0x15f): undefined reference to `wl_proxy_marshal_flags'
/usr/bin/ld: (.text+0x189): undefined reference to `wl_proxy_get_version'
/usr/bin/ld: (.text+0x1ac): undefined reference to `wl_proxy_marshal_flags'
/usr/bin/ld: (.text+0x1bf): undefined reference to `wl_proxy_get_version'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/libSDL2.a(SDL_waylandkeyboard.o): in function `Wayland_StopTextInput':
(.text+0x247): undefined reference to `wl_proxy_get_version'
/usr/bin/ld: (.text+0x25d): undefined reference to `wl_proxy_marshal_flags'
/usr/bin/ld: (.text+0x26c): undefined reference to `wl_proxy_get_version'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/libSDL2.a(SDL_waylandkeyboard.o): in function `Wayland_SetTextInputRect':
(.text+0x329): undefined reference to `wl_proxy_get_version'
/usr/bin/ld: (.text+0x34c): undefined reference to `wl_proxy_marshal_flags'
/usr/bin/ld: (.text+0x35f): undefined reference to `wl_proxy_get_version'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/libSDL2.a(SDL_waylandkeyboard.o): in function `Wayland_StartTextInput':
(.text+0x1e3): undefined reference to `wl_proxy_marshal_flags'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/libSDL2.a(SDL_waylandkeyboard.o): in function `Wayland_StopTextInput':
(.text+0x288): undefined reference to `wl_proxy_marshal_flags'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/libSDL2.a(SDL_waylandkeyboard.o): in function `Wayland_SetTextInputRect':
(.text+0x383): undefined reference to `wl_proxy_marshal_flags'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/libSDL2.a(SDL_waylandtouch.o): in function `Wayland_touch_create':
(.text+0x204): undefined reference to `wl_proxy_marshal_flags'
/usr/bin/ld: (.text+0x221): undefined reference to `wl_proxy_add_listener'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:132: default] Error 1

I bisect:ed and noticed that it started failing when static linking was introduced after the 0.0.26-beta release.

As a workaround to acquainted with the code (I'm a low level embedded/MCU C guy so I need to get up to speed!) I updated the Makefile so it would only do static linking when cross compiling. See (main...krakpot:guppyscreen:no-static-for-x86)

Is static linking supposed to work for x86_64? If so is there some dependency missing from DEVELOPMENT.md?

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

No branches or pull requests

1 participant