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

compile issues with libXrandr < 1.5.4 #297

Closed
lexxxel opened this issue Oct 10, 2023 · 2 comments
Closed

compile issues with libXrandr < 1.5.4 #297

lexxxel opened this issue Oct 10, 2023 · 2 comments

Comments

@lexxxel
Copy link

lexxxel commented Oct 10, 2023

when compiling from source on gentoo with libXrandr 1.5.3, I go the same error I saw other had too:

$ ./setup.py build
Trying to get git version information...
Trying to get git information...
Generating __version__.py
Version 3.9.11
['build']
*** /home/apit/tools/displaycal/displaycal-py3/setup.py build
using distutils
desktopfile: /home/apit/tools/displaycal/displaycal-py3/DisplayCAL/../misc/displaycal.desktop
desktopfile: /home/apit/tools/displaycal/displaycal-py3/DisplayCAL/../misc/displaycal-3dlut-maker.desktop
desktopfile: /home/apit/tools/displaycal/displaycal-py3/DisplayCAL/../misc/displaycal-apply-profiles.desktop
desktopfile: /home/apit/tools/displaycal/displaycal-py3/DisplayCAL/../misc/displaycal-curve-viewer.desktop
desktopfile: /home/apit/tools/displaycal/displaycal-py3/DisplayCAL/../misc/displaycal-profile-info.desktop
desktopfile: /home/apit/tools/displaycal/displaycal-py3/DisplayCAL/../misc/displaycal-scripting-client.desktop
desktopfile: /home/apit/tools/displaycal/displaycal-py3/DisplayCAL/../misc/displaycal-synthprofile.desktop
desktopfile: /home/apit/tools/displaycal/displaycal-py3/DisplayCAL/../misc/displaycal-testchart-editor.desktop
desktopfile: /home/apit/tools/displaycal/displaycal-py3/DisplayCAL/../misc/displaycal-vrml-to-x3d-converter.desktop
DisplayCAL/RealDisplaySizeMM.c: In function ‘get_displays’:
DisplayCAL/RealDisplaySizeMM.c:871:71: warning: passing argument 12 of ‘XRRGetOutputProperty’ from incompatible pointer type [-Wincompatible-pointer-types]
  871 |                                     &ret_type, &ret_format, &ret_len, &ret_togo, &atomv) == Success
      |                                                                       ^~~~~~~~~
      |                                                                       |
      |                                                                       long unsigned int **
In file included from DisplayCAL/RealDisplaySizeMM.c:33:
/usr/include/X11/extensions/Xrandr.h:339:61: note: expected ‘long unsigned int *’ but argument is of type ‘long unsigned int **’
  339 |                       unsigned long *nitems, unsigned long *bytes_after,
      |                                              ~~~~~~~~~~~~~~~^~~~~~~~~~~

Updating to 1.5.4 fixed that compile error. I created the issue for discussion if it's only my setup or a general thing.
PS: I cloned the current develop branch for that test

@Quppa
Copy link

Quppa commented Nov 4, 2023

I get this warning with libXrandr 1.5.4, too. More to the point, I don't understand why it should be new - the XRRGetOutputProperty function signature hasn't changed in forever.

Should unsigned long *ret_togo; just be changed to unsigned long ret_togo;?
https://github.com/eoyilmaz/displaycal-py3/blob/develop/DisplayCAL/RealDisplaySizeMM.c#L851

@eoyilmaz
Copy link
Owner

I hate this C-Extension, and want to get rid of it. The only thing that extension is doing is to get the "real display size in millimeters", I don't know how important this is to know, and in most of the OSes we can get the same data from the EDID data.

Closing this as it seems that you have a workaround that people can follow.

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

3 participants