Opened 5 years ago

Closed 4 years ago

#60096 closed defect (fixed)

xorg-server-devel @1.20.4 does not build on macOS Catalina, version 10.15.3, because "../randr/randrstr.h:204:5: error: unknown type name 'RRLease'"

Reported by: ballapete (Peter "Pete" Dyballa) Owned by: jeremyhu (Jeremy Huddleston Sequoia)
Priority: Normal Milestone:
Component: ports Version: 2.6.2
Keywords: catalina Cc:
Port: xorg-server-devel

Description

libtool: compile:  /usr/bin/clang -DHAVE_CONFIG_H -I. -I../include -I../include -I/opt/local/include -I/usr/include -I/opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/x11/xorg-server-devel/files/dri -F/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -DHAVE_DIX_CONFIG_H -Wall -Wpointer-arith -Wmissing-declarations -Wformat=2 -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wbad-function-cast -Wold-style-definition -Wdeclaration-after-statement -Wunused -Wuninitialized -Wshadow -Wmissing-noreturn -Wmissing-format-attribute -Wredundant-decls -Werror=implicit -Werror=nonnull -Werror=init-self -Werror=main -Werror=missing-braces -Werror=sequence-point -Werror=return-type -Werror=trigraphs -Werror=array-bounds -Werror=write-strings -Werror=address -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -fno-strict-aliasing -fno-strict-aliasing -D_DEFAULT_SOURCE -D_BSD_SOURCE -DHAS_FCHOWN -DHAS_STICKY_DIR_BIT -I/opt/local/include/pixman-1 -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I../include -I../include -I../Xext -I../damageext -I../xfixes -I../Xi -I../mi -I../miext/sync -I../miext/shadow -I../miext/damage -I../render -I../randr -I../fb -I../dbe -I../present -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -arch x86_64 -D_THREAD_SAFE -pthread -DROOTLESS_WORKAROUND -DROOTLESS_SAFEALPHA -DNO_ALLOCA -MT pixmap.lo -MD -MP -MF .deps/pixmap.Tpo -c pixmap.c  -fno-common -DPIC -o .libs/pixmap.o

In file included from pixmap.c:45:
../randr/randrstr.h:204:5: error: unknown type name 'RRLease'
    RRLease id;
    ^
1 error generated.

../randr/randrstr.h has:

   29   #ifdef HAVE_DIX_CONFIG_H
   30   #include <dix-config.h>
   31   #endif
   32
   33   #ifndef _RANDRSTR_H_
   34   #define _RANDRSTR_H_
   35
   36   #include <X11/X.h>
   37   #include <X11/Xproto.h>
   38   #include "misc.h"
   39   #include "os.h"
   40   #include "dixstruct.h"
   41   #include "resource.h"
   42   #include "scrnintstr.h"
   43   #include "windowstr.h"
   44   #include "pixmapstr.h"
   45   #include "extnsionst.h"
   46   #include "servermd.h"
   47   #include "rrtransform.h"
   48   #include <X11/extensions/randr.h>
   49   #include <X11/extensions/randrproto.h>
   50   #include <X11/extensions/render.h>      /* we share subpixel order information */
   51   #include "picturestr.h"
   52   #include <X11/Xfuncproto.h>
   53
   54   /* required for ABI compatibility for now */
   55   #define RANDR_10_INTERFACE 1
   56   #define RANDR_12_INTERFACE 1
   57   #define RANDR_13_INTERFACE 1    /* requires RANDR_12_INTERFACE */
   58   #define RANDR_GET_CRTC_INTERFACE 1
   59
   60   #define RANDR_INTERFACE_VERSION 0x0104
   61
   62   typedef XID RRMode;
   63   typedef XID RROutput;
   64   typedef XID RRCrtc;
   65   typedef XID RRProvider;
   66
   67   /* don't define this here. Causes redefinition errors with pre-C11 compilers
   68   due to a conflict in X11/Xmd.h (xorg-xorgproto)
   69   and there is no indication it is used anywhere in the xorg-server source
   70
   71   typedef XID RRLease;                ««««««
   72   */
   73
…
  198
  199   typedef enum _rrLeaseState { RRLeaseCreating, RRLeaseRunning, RRLeaseTerminating } RRLeaseState;
  200
  201   struct _rrLease {
  202       struct xorg_list list;
  203       ScreenPtr screen;
  204       RRLease id;                 ««««««
  205       RRLeaseState state;
  206       void *devPrivate;
  207       int numCrtcs;
  208       RRCrtcPtr *crtcs;
  209       int numOutputs;
  210       RROutputPtr *outputs;
  211   };

The compiler used, /usr/bin/clang, includes C header files in this order:

. ../include/dix-config.h
.. ../include/dix-config-apple-verbatim.h
. /opt/local/include/X11/X.h
.. /opt/local/include/X11/Xmd.h               ««««««
. ../include/scrnintstr.h
.. ../include/screenint.h
... ../include/misc.h
.... /opt/local/include/X11/Xosdefs.h
.... /opt/local/include/X11/Xfuncproto.h
.... /opt/local/include/X11/Xdefs.h
.... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/11.0.0/include/stddef.h
..... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/11.0.0/include/__stddef_max_align_t.h
.... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/11.0.0/include/stdint.h
..... /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdint.h
...... /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types/_int8_t.h
…
.......... /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types/_fd_copy.h
.......... /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types/_fsblkcnt_t.h
.......... /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types/_fsfilcnt_t.h
..... ../present/presentext.h
. ../include/gcstruct.h
. ../include/servermd.h
.. /opt/local/include/X11/Xarch.h
. ../include/site.h
. ../randr/randrstr.h              ««««««
.. ../randr/rrtransform.h
.. /opt/local/include/X11/extensions/randrproto.h

/opt/local/include/X11/Xmd.h does not typedef the variable type RRLease. So it should be OK to remove the comments inside ../randr/randrstr.h.

Attachments (1)

RRLease_patch.diff (530 bytes) - added by ballapete (Peter "Pete" Dyballa) 5 years ago.
Possible patch for RRLease

Download all attachments as: .zip

Change History (6)

Changed 5 years ago by ballapete (Peter "Pete" Dyballa)

Attachment: RRLease_patch.diff added

Possible patch for RRLease

comment:1 Changed 5 years ago by ballapete (Peter "Pete" Dyballa)

In the end it becomes obvious that files in xorg-server-devel-1.20.4/hw/xquartz need to be ported to the recent OS version.

comment:2 Changed 5 years ago by kencu (Ken)

xorg-server-devel is currently behind xorg-server port...so use that until someone like Chris or me gets enthusiastic again :)

I guess at least we could copy that over into devel for parity...

comment:3 Changed 5 years ago by jmroot (Joshua Root)

Cc: jeremyhu@… removed
Owner: set to jeremyhu
Status: newassigned

comment:4 Changed 5 years ago by ATL-Flaneur (Andreas Yankopolus)

Is this copying over something that I could do on my system?

comment:5 Changed 4 years ago by kencu (Ken)

Resolution: fixed
Status: assignedclosed

updated to 1.20.9 now

Note: See TracTickets for help on using tickets.