Bug 107170

Summary: Build fails if building against X server/libxrandr with no leases support
Product: Mesa Reporter: network723
Component: Mesa coreAssignee: mesa-dev
Status: RESOLVED MOVED QA Contact: mesa-dev
Severity: normal    
Priority: medium CC: danylo.piliaiev
Version: git   
Hardware: Other   
OS: All   
See Also: https://bugs.freedesktop.org/show_bug.cgi?id=107176
Whiteboard:
i915 platform: i915 features:

Description network723 2018-07-09 20:58:33 UTC
With recent Mesa-git versions build fails when building against X.Org 1.18.3 and libXrandr 1.5.0

[  204s]   CC       util/vk_enum_to_str.lo
[  204s] wsi/wsi_common_display.c: In function 'wsi_acquire_xlib_display':
[  204s] wsi/wsi_common_display.c:2164:4: error: unknown type name 'xcb_randr_lease_t'
[  204s]     xcb_randr_lease_t lease = xcb_generate_id(connection);
[  204s]     ^
[  204s] wsi/wsi_common_display.c:2165:4: error: unknown type name 'xcb_randr_create_lease_cookie_t'
[  204s]     xcb_randr_create_lease_cookie_t cl_c =
[  204s]     ^
[  204s] wsi/wsi_common_display.c:2166:7: error: implicit declaration of function 'xcb_randr_create_lease' [-Werror=implicit-function-declaration]
[  204s]        xcb_randr_create_lease(connection, root, lease, 1, 1,
[  204s]        ^
[  204s] wsi/wsi_common_display.c:2168:4: error: unknown type name 'xcb_randr_create_lease_reply_t'
[  204s]     xcb_randr_create_lease_reply_t *cl_r =
[  204s]     ^
[  204s] wsi/wsi_common_display.c:2169:7: error: implicit declaration of function 'xcb_randr_create_lease_reply' [-Werror=implicit-function-declaration]
[  204s]        xcb_randr_create_lease_reply(connection, cl_c, NULL);
[  204s]        ^
[  204s] wsi/wsi_common_display.c:2169:7: warning: initialization makes pointer from integer without a cast [enabled by default]
[  204s] wsi/wsi_common_display.c:2174:12: error: request for member 'nfd' in something not a structure or union
[  204s]     if (cl_r->nfd > 0) {
[  204s]             ^
[  204s] wsi/wsi_common_display.c:2175:7: error: implicit declaration of function 'xcb_randr_create_lease_reply_fds' [-Werror=implicit-function-declaration]
[  204s]        int *rcl_f = xcb_randr_create_lease_reply_fds(connection, cl_r);
[  204s]        ^
[  204s] wsi/wsi_common_display.c:2175:20: warning: initialization makes pointer from integer without a cast [enabled by default]
[  204s]        int *rcl_f = xcb_randr_create_lease_reply_fds(connection, cl_r);
[  204s]                     ^
[  204s] cc1: some warnings being treated as errors
[  204s] Makefile:736: recipe for target 'wsi/wsi_common_display.lo' failed
[  204s] make[3]: *** [wsi/wsi_common_display.lo] Error 1
Comment 1 Danylo 2018-07-11 11:28:51 UTC
Made a patch to fix compilation: https://patchwork.freedesktop.org/patch/237719/
Comment 2 Emil Velikov 2018-07-24 16:04:45 UTC
Note that the xcb_randr API is not provided by libXrandr but xcb-randr ;-)
A simple version check of the latter should fix things.
Comment 3 network723 2018-09-22 11:37:09 UTC
Is this bug is still being worked on? It seems that patch never reached GIT master...
Comment 4 GitLab Migration User 2019-09-18 20:27:14 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/1027.
Comment 5 network723 2019-09-19 04:45:58 UTC
(In reply to GitLab Migration User from comment #4)
> You can subscribe and participate further through the new bug through this
> link to our GitLab instance:
> https://gitlab.freedesktop.org/mesa/mesa/issues/1027.

No freaking way. I was happy with my bugzilla account, and your fancy gitlab abomination requires too much of my personal information to register. Report bugs yourselves, thanks.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.