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

build error with --disable-wayland-shared #4636

Closed
sezero opened this issue Aug 11, 2021 · 7 comments
Closed

build error with --disable-wayland-shared #4636

sezero opened this issue Aug 11, 2021 · 7 comments
Assignees
Labels
notourbug This bug is caused by an external component wontfix This will not be worked on

Comments

@sezero
Copy link
Contributor

sezero commented Aug 11, 2021

src/video/wayland/SDL_waylandsym.h: In function 'SDL_WAYLAND_LoadSymbols':
src/video/wayland/SDL_waylandsym.h:77:23: error: 'wl_proxy_set_tag' undeclared (first use in this function); did you mean 'wl_proxy_get_id'?
 SDL_WAYLAND_SYM(void, wl_proxy_set_tag, (struct wl_proxy *, const char * const *))
                       ^
src/video/wayland/SDL_waylanddyn.c:164:54: note: in definition of macro 'SDL_WAYLAND_SYM'
 #define SDL_WAYLAND_SYM(rc,fn,params) WAYLAND_##fn = fn;
                                                      ^~
src/video/wayland/SDL_waylandsym.h:77:23: note: each undeclared identifier is reported only once for each function it appears in
 SDL_WAYLAND_SYM(void, wl_proxy_set_tag, (struct wl_proxy *, const char * const *))
                       ^
src/video/wayland/SDL_waylanddyn.c:164:54: note: in definition of macro 'SDL_WAYLAND_SYM'
 #define SDL_WAYLAND_SYM(rc,fn,params) WAYLAND_##fn = fn;
                                                      ^~
src/video/wayland/SDL_waylandsym.h:78:39: error: 'wl_proxy_get_tag' undeclared (first use in this function); did you mean 'wl_proxy_set_tag'?
 SDL_WAYLAND_SYM(const char * const *, wl_proxy_get_tag, (struct wl_proxy *))
                                       ^
src/video/wayland/SDL_waylanddyn.c:164:54: note: in definition of macro 'SDL_WAYLAND_SYM'
 #define SDL_WAYLAND_SYM(rc,fn,params) WAYLAND_##fn = fn;
                                                      ^~
make: *** [Makefile:698: build/SDL_waylanddyn.lo] Error 1
src/video/wayland/SDL_waylandvideo.c: In function 'SDL_WAYLAND_register_surface':
src/video/wayland/SDL_waylandvideo.c:137:9: warning: implicit declaration of function 'wl_proxy_set_tag'; did you mean 'wl_proxy_get_id'? [-Wimplicit-function-declaration]
         wl_proxy_set_tag((struct wl_proxy *)surface, &SDL_WAYLAND_surface_tag);
         ^~~~~~~~~~~~~~~~
         wl_proxy_get_id
src/video/wayland/SDL_waylandvideo.c: In function 'SDL_WAYLAND_own_surface':
src/video/wayland/SDL_waylandvideo.c:151:16: warning: implicit declaration of function 'wl_proxy_get_tag'; did you mean 'wl_proxy_get_id'? [-Wimplicit-function-declaration]
         return wl_proxy_get_tag((struct wl_proxy *) surface) == &SDL_WAYLAND_surface_tag;
                ^~~~~~~~~~~~~~~~
                wl_proxy_get_id
src/video/wayland/SDL_waylandvideo.c:151:62: warning: comparison between pointer and integer
         return wl_proxy_get_tag((struct wl_proxy *) surface) == &SDL_WAYLAND_surface_tag;
                                                              ^~
src/video/wayland/SDL_waylandvideo.c: In function 'SDL_WAYLAND_own_output':
src/video/wayland/SDL_waylandvideo.c:159:61: warning: comparison between pointer and integer
         return wl_proxy_get_tag((struct wl_proxy *) output) == &SDL_WAYLAND_output_tag;
                                                             ^~
@flibitijibibo
Copy link
Collaborator

I think this is because the build system's wayland-client is older than 1.18? Maybe? I've been building on CentOS 7 which is much older than that and it's been okay, though that's as dynamic. #4543 and a couple other issues were supposed to address this.

@smcv
Copy link
Contributor

smcv commented Aug 12, 2021

I had this on a Debian-10-based system, and avoided it with --enable-wayland-shared. I'm pretty sure it's caused by an older libwayland-client.

I think it's reasonable that if you're building with --disable-wayland-shared (static dependencies that provide full functionality, suitable for traditional distributions), you have to have suitable versions of all the dependencies; if you're building a version to bundle with some self-contained binary like Steam or a game, then --enable-wayland-shared (dynamic dependencies and graceful degradation at runtime) seems a better fit.

@dos1
Copy link
Contributor

dos1 commented Aug 17, 2021

Yup, src/video/wayland/SDL_waylandsym.h marks the functions as available only from certain wayland-client version and for dynamic loading that's handled well, but seems like there's nothing that would prevent them from actually being referenced in the code when dynamic loading is disabled.

/* These functions are available in Wayland >= 1.4 */
SDL_WAYLAND_MODULE(WAYLAND_CLIENT_1_4)
SDL_WAYLAND_SYM(struct wl_proxy *, wl_proxy_marshal_constructor, (struct wl_proxy *, uint32_t opcode, const struct wl_interface *interface, ...))

SDL_WAYLAND_MODULE(WAYLAND_CLIENT_1_10)
SDL_WAYLAND_SYM(struct wl_proxy *, wl_proxy_marshal_constructor_versioned, (struct wl_proxy *proxy, uint32_t opcode, const struct wl_interface *interface, uint32_t version, ...))

SDL_WAYLAND_MODULE(WAYLAND_CLIENT_1_18)
SDL_WAYLAND_SYM(void, wl_proxy_set_tag, (struct wl_proxy *, const char * const *))
SDL_WAYLAND_SYM(const char * const *, wl_proxy_get_tag, (struct wl_proxy *))
src/video/wayland/SDL_waylanddyn.c:#define SDL_WAYLAND_MODULE(modname) int SDL_WAYLAND_HAVE_##modname = 0;
src/video/wayland/SDL_waylanddyn.c:#define SDL_WAYLAND_MODULE(modname) SDL_WAYLAND_HAVE_##modname = 0;
src/video/wayland/SDL_waylanddyn.c:#define SDL_WAYLAND_MODULE(modname) SDL_WAYLAND_HAVE_##modname = 1; /* default yes */
src/video/wayland/SDL_waylanddyn.c:#define SDL_WAYLAND_MODULE(modname) thismod = &SDL_WAYLAND_HAVE_##modname;
src/video/wayland/SDL_waylanddyn.c:#define SDL_WAYLAND_MODULE(modname) SDL_WAYLAND_HAVE_##modname = 1; /* default yes */
src/video/wayland/SDL_waylanddyn.h:#define SDL_WAYLAND_MODULE(modname) extern int SDL_WAYLAND_HAVE_##modname;
#else  /* no dynamic WAYLAND */

#define SDL_WAYLAND_MODULE(modname) SDL_WAYLAND_HAVE_##modname = 1; /* default yes */
#define SDL_WAYLAND_SYM(rc,fn,params) WAYLAND_##fn = fn;
#define SDL_WAYLAND_INTERFACE(iface) WAYLAND_##iface = &iface;
#include "SDL_waylandsym.h"

#endif

@flibitijibibo
Copy link
Collaborator

Officially marking this as "NOTOURBUG" - but as part of this we'll need to request a --max-version for wayland-scanner.

@flibitijibibo flibitijibibo added the notourbug This bug is caused by an external component label Mar 24, 2022
@flibitijibibo flibitijibibo added this to the 2.0.24 milestone Mar 24, 2022
@flibitijibibo flibitijibibo self-assigned this Mar 24, 2022
@flibitijibibo
Copy link
Collaborator

@flibitijibibo
Copy link
Collaborator

Feedback from the maintainers (in the above report and a couple other SDL reports) suggests this may not be happening... so removing the milestone from this.

Ubuntu 20.04 LTS has an EOL date of ~April 2025, we should bump the requirement to 1.20 at that time.

@flibitijibibo flibitijibibo removed this from the 2.0.24 milestone Apr 4, 2022
@sezero
Copy link
Contributor Author

sezero commented Apr 4, 2022

I suggest closing this one.

@flibitijibibo flibitijibibo added the wontfix This will not be worked on label Apr 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
notourbug This bug is caused by an external component wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

4 participants