| Summary: | Cannot compile xf86-video-qxl-0.1.1 with spice-protocol-0.12.3: spiceqxl_display.c:353:56: error: cast from pointer to integer of different size | ||||||
|---|---|---|---|---|---|---|---|
| Product: | xorg | Reporter: | Petr Pisar <petr.pisar> | ||||
| Component: | Driver/qxl | Assignee: | Søren Sandmann Pedersen <soren.sandmann> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | medium | CC: | mail, peter, teuf | ||||
| Version: | unspecified | ||||||
| Hardware: | x86 (IA32) | ||||||
| OS: | Linux (All) | ||||||
| Whiteboard: | |||||||
| i915 platform: | i915 features: | ||||||
| Attachments: |
|
||||||
Confirmed, this is also a problem on Arch Linux and Debian. https://bugs.debian.org/738744 Forgot to mention versions, it still happens with: xf86-video-qxl 0.1.4 spice-protocol 0.12.9 spice 0.12.5 Created attachment 117559 [details] [review] fix cast from pointer to integer of different size Why is qxl->monitors_config casted to QXLPHYSICAL at all? Looks like removing the case fixes the issue. Comment on attachment 117559 [details] [review] fix cast from pointer to integer of different size Review of attachment 117559 [details] [review]: ----------------------------------------------------------------- How is this supposed to help? The prototype in spice.h is: /* since spice 0.12.0 */ void spice_qxl_monitors_config_async(QXLInstance *instance, QXLPHYSICAL monitors_config, int group_id, uint64_t cookie); While xf86-video-qxl/src/qxl.h defines: struct _qxl_screen_t { ... struct QXLMonitorsConfig *monitors_config; int monitors_config_size; ... }; The pointer really needs to be converted to a uint64_t (QXLPHYSICAL). I think that the cast to (uintptr_t) as you proposed on AUR is OK. Don't know whether there is a need to worry about endianess and such though. Should be fixed by https://cgit.freedesktop.org/xorg/driver/xf86-video-qxl/commit/?id=91ee004cda2fb31de75508c44710ac09256edab4 (available in xf86-video-qxl-0.1.5) |
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.
It's not possible to compile spiceqxl_display.c from xf86-video-qxl-0.1.1 with spice-protocol-0.12.3 on 32-bit x86 because there is a cast from pointer to u_int64_t which is not compatible with 32-bit pointers on x86: /var/tmp/portage/x11-drivers/xf86-video-qxl-0.1.1/work/xf86-video-qxl-0.1.1/src/spiceqxl_display.c: In function 'spiceqxl_display_monitors_config': /var/tmp/portage/x11-drivers/xf86-video-qxl-0.1.1/work/xf86-video-qxl-0.1.1/src/spiceqxl_display.c:353:56: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] The bug is at src/spiceqxl_display.c:353 on casting second argument of spice_qxl_monitors_config_async() call: void spiceqxl_display_monitors_config(qxl_screen_t *qxl) { spice_qxl_monitors_config_async(&qxl->display_sin, (QXLPHYSICAL)qxl->monitors_config, MEMSLOT_GROUP, 0); } while spice-1/spice/qxl_dev.h: typedef uint64_t QXLPHYSICAL; and src/qxl.h: typedef struct _qxl_screen_t qxl_screen_t; struct _qxl_screen_t { [...] struct QXLMonitorsConfig *monitors_config; [...] }