Opened 6 years ago
Closed 4 years ago
#57333 closed defect (fixed)
xorg-server-devel @1.20.1 does not build on Mac OS X 10.5.8, Leopard, because of redefinition of typedef ‘CARD32’
Reported by: | ballapete (Peter "Pete" Dyballa) | Owned by: | jeremyhu (Jeremy Huddleston Sequoia) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.5.4 |
Keywords: | leopard | Cc: | |
Port: | xorg-server-devel |
Description
/bin/sh ../libtool --tag=CC --mode=compile /usr/bin/gcc-4.2 -std=gnu99 -DHAVE_CONFIG_H -I. -I../include -I../include -I/opt/local/include -I/usr/include -I/opt/local/var/macports/sources/nue.de.rsync.macports.org/macports/release/tarballs/ports/x11/xorg-server-devel/files/dri -F/System/Library/Frameworks/ApplicationServices.framework/Frameworks -I/opt/local/var/macports/sources/nue.de.rsync.macports.org/macports/release/tarballs/ports/x11/xorg-server-devel/files/include -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=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 -arch ppc -D_THREAD_SAFE -pthread -DROOTLESS_WORKAROUND -DROOTLESS_SAFEALPHA -DNO_ALLOCA -MT pixmap.lo -MD -MP -MF .deps/pixmap.Tpo -c -o pixmap.lo pixmap.c libtool: compile: /usr/bin/gcc-4.2 -std=gnu99 -DHAVE_CONFIG_H -I. -I../include -I../include -I/opt/local/include -I/usr/include -I/opt/local/var/macports/sources/nue.de.rsync.macports.org/macports/release/tarballs/ports/x11/xorg-server-devel/files/dri -F/System/Library/Frameworks/ApplicationServices.framework/Frameworks -I/opt/local/var/macports/sources/nue.de.rsync.macports.org/macports/release/tarballs/ports/x11/xorg-server-devel/files/include -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=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 -arch ppc -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:66: error: redefinition of typedef ‘CARD32’ /opt/local/include/X11/Xmd.h:111: error: previous declaration of ‘CARD32’ was here make[2]: *** [pixmap.lo] Error 1 make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_x11_xorg-server-devel/xorg-server-devel/work/xorg-server-devel-1.20.1/dix' make[1]: *** [all] Error 2
/opt/local/include/X11/Xmd.h
has:
106 # ifdef LONG64 107 typedef unsigned long CARD64; 108 typedef unsigned int CARD32; 109 # else 110 typedef unsigned long long CARD64; 111 typedef unsigned long CARD32; 112 # endif
and ../randr/randrstr.h
has:
62 typedef XID RRMode; 63 typedef XID RROutput; 64 typedef XID RRCrtc; 65 typedef XID RRProvider; 66 typedef XID RRLease; 67 68 extern int RREventBase, RRErrorBase;
So this error report cannot be true.
Attachments (6)
Change History (32)
Changed 6 years ago by ballapete (Peter "Pete" Dyballa)
comment:1 Changed 6 years ago by mf2k (Frank Schima)
Cc: | jeremyhu@… removed |
---|---|
Owner: | set to jeremyhu |
Status: | new → assigned |
comment:2 follow-ups: 3 4 7 Changed 6 years ago by kencu (Ken)
that redefinition of typdef business usually means that a newer compiler version is required -- we've seen that a lot in various ports over the past few years.
Try gcc6 and hold your breath :>
comment:3 Changed 6 years ago by ballapete (Peter "Pete" Dyballa)
Replying to kencu:
that redefinition of typdef business usually means that a newer compiler version is required -- we've seen that a lot in various ports over the past few years.
Try gcc6 and hold your breath :>
Before doing so I can see in the pre-processor's output this when it includes ../randr/randrstr.h
:
typedef XID RRMode; typedef XID RROutput; typedef XID RRCrtc; typedef XID RRProvider; typedef XID CARD32;
comment:4 Changed 6 years ago by ballapete (Peter "Pete" Dyballa)
Replying to kencu:
With GCC6 pixmap.c
at least compiles…
comment:5 Changed 6 years ago by ballapete (Peter "Pete" Dyballa)
With GCC6 this problem stops compilation:
source='X11Application.m' object='X11Application.lo' libtool=yes \ DEPDIR=.deps depmode=none /bin/sh ../../depcomp \ /bin/sh ../../libtool --mode=compile /opt/local/bin/gcc-mp-6 -DHAVE_CONFIG_H -I. -I../../include -DBUILD_DATE=\"20181010\" -DXSERVER_VERSION=\"1.20.1\" -DINXQUARTZ -DUSE_NEW_CLUT -DXFree86Server -I../../miext/rootless -I../../pseudoramiX -DX11LIBDIR=\"/opt/local/lib\" -I/opt/local/include -I/usr/include -I/opt/local/var/macports/sources/nue.de.rsync.macports.org/macports/release/tarballs/ports/x11/xorg-server-devel/files/dri -F/System/Library/Frameworks/ApplicationServices.framework/Frameworks -I/opt/local/var/macports/sources/nue.de.rsync.macports.org/macports/release/tarballs/ports/x11/xorg-server-devel/files/include -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 -Wlogical-op -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 -m32 -D_THREAD_SAFE -pthread -DROOTLESS_WORKAROUND -DROOTLESS_SAFEALPHA -DNO_ALLOCA -c -o X11Application.lo X11Application.m libtool: compile: /opt/local/bin/gcc-mp-6 -DHAVE_CONFIG_H -I. -I../../include -DBUILD_DATE=\"20181010\" -DXSERVER_VERSION=\"1.20.1\" -DINXQUARTZ -DUSE_NEW_CLUT -DXFree86Server -I../../miext/rootless -I../../pseudoramiX -DX11LIBDIR=\"/opt/local/lib\" -I/opt/local/include -I/usr/include -I/opt/local/var/macports/sources/nue.de.rsync.macports.org/macports/release/tarballs/ports/x11/xorg-server-devel/files/dri -F/System/Library/Frameworks/ApplicationServices.framework/Frameworks -I/opt/local/var/macports/sources/nue.de.rsync.macports.org/macports/release/tarballs/ports/x11/xorg-server-devel/files/include -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 -Wlogical-op -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 -m32 -D_THREAD_SAFE -pthread -DROOTLESS_WORKAROUND -DROOTLESS_SAFEALPHA -DNO_ALLOCA -c X11Application.m -fno-common -DPIC -o .libs/X11Application.o In file included from X11Controller.h:41:0, from X11Application.h:36, from X11Application.m:39: xpr/x-list.h:51:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void' X_EXTERN void X_PFX(list_free_1) (x_list * node); ^~~~ xpr/x-list.h:48:18: error: unknown type name '__private_extern__' #define X_EXTERN __private_extern__ ^ xpr/x-list.h:48:18: note: in definition of macro 'X_EXTERN' #define X_EXTERN __private_extern__ ^~~~~~~~~~~~~~~~~~ xpr/x-list.h:52:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token X_EXTERN x_list *X_PFX(list_prepend) (x_list * lst, void *data); ^
These are not all lines with error reports. They are all from the same sort, except for the end:
xpr/x-list.h:75:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token X_EXTERN x_list *X_PFX(list_sort) (x_list * lst, ^ X11Application.m:99:12: warning: redundant redeclaration of 'darwinFakeButtons' [-Wredundant-decls] extern int darwinFakeButtons; ^~~~~~~~~~~~~~~~~ In file included from X11Application.m:41:0: darwin.h:68:12: note: previous declaration of 'darwinFakeButtons' was here extern int darwinFakeButtons; ^~~~~~~~~~~~~~~~~ X11Application.m: In function '-[X11Application sendEvent:]': X11Application.m:285:25: warning: 'X11Application' may not respond to '-_setKeyWindow:' [self _setKeyWindow:nil]; ^ X11Application.m:285:25: warning: (Messages without a matching method signature X11Application.m:285:25: warning: will be assumed to return 'id' and accept X11Application.m:285:25: warning: '...' as arguments.) X11Application.m:289:21: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] NSWindow *mainWindow = [self mainWindow]; ^~~~~~~~ X11Application.m:291:25: warning: 'X11Application' may not respond to '-_setMainWindow:' [self _setMainWindow:nil]; ^ X11Application.m:433:17: warning: 'X11Application' may not respond to '-set_front_process:' [self set_front_process:nil]; ^ X11Application.m: In function 'X11ApplicationCanEnterRandR': X11Application.m:1092:5: warning: non-ASCII character in CFString literal [--CLASSPATH] msg = NSLocalizedString( ^~~ make[3]: *** [X11Application.lo] Error 1 make[3]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_x11_xorg-server-devel/xorg-server-devel/work/xorg-server-devel-1.20.1/hw/xquartz'
Changed 6 years ago by ballapete (Peter "Pete" Dyballa)
Attachment: | main.2.log added |
---|
Main.log from PPC Leopard with GCC6
comment:6 Changed 6 years ago by ballapete (Peter "Pete" Dyballa)
xpr/x-list.h
has:
31 #ifndef X_LIST_H 32 #define X_LIST_H 1 33 34 /* This is just a cons. */ 35 36 typedef struct x_list_struct x_list; 37 38 struct x_list_struct { 39 void *data; 40 x_list *next; 41 }; 42 43 #ifndef X_PFX 44 #define X_PFX(x) x_ ## x 45 #endif 46 47 #ifndef X_EXTERN 48 #define X_EXTERN __private_extern__ 49 #endif 50 51 X_EXTERN void X_PFX(list_free_1) (x_list * node); 52 X_EXTERN x_list *X_PFX(list_prepend) (x_list * lst, void *data); 53 54 X_EXTERN x_list *X_PFX(list_append) (x_list * lst, void *data); 55 X_EXTERN x_list *X_PFX(list_remove) (x_list * lst, void *data); 56 X_EXTERN void X_PFX(list_free) (x_list * lst); 57 X_EXTERN x_list *X_PFX(list_pop) (x_list * lst, void **data_ret); 58 59 X_EXTERN x_list *X_PFX(list_copy) (x_list * lst); 60 X_EXTERN x_list *X_PFX(list_reverse) (x_list * lst); 61 X_EXTERN x_list *X_PFX(list_find) (x_list * lst, void *data); 62 X_EXTERN x_list *X_PFX(list_nth) (x_list * lst, int n); 63 X_EXTERN x_list *X_PFX(list_filter) (x_list * src, 64 int (*pred)(void *item, void *data), 65 void *data); 66 X_EXTERN x_list *X_PFX(list_map) (x_list * src, 67 void *(*fun)(void *item, void *data), 68 void *data); 69 70 X_EXTERN unsigned int X_PFX(list_length) (x_list * lst); 71 X_EXTERN void X_PFX(list_foreach) (x_list * lst, void (*fun) 72 (void *data, void *user_data), 73 void *user_data); 74 75 X_EXTERN x_list *X_PFX(list_sort) (x_list * lst, 76 int (*less)(const void *, const void *)); 77 78 #endif /* X_LIST_H */
comment:7 follow-up: 8 Changed 6 years ago by ballapete (Peter "Pete" Dyballa)
Replying to kencu:
Try gcc6 and hold your breath :>
This does not seem to be the proper advice… On https://www.x.org GCC 2.95 is mentioned as required development tool…
comment:8 Changed 6 years ago by ballapete (Peter "Pete" Dyballa)
comment:9 Changed 6 years ago by ballapete (Peter "Pete" Dyballa)
This is interesting! When I use -ansi
to be closer to GCC 2.95
compilation stops at the same spot where GCC 6
stops. When I am using -std=c99
it stops with exactly the same CARD32
error.
This CARD32
error comes from the C preprocessor. It turns in randr/randrstr.h
the statement
typedef XID RRLease;
into
typedef XID CARD32;
Cause is that /opt/local/include/X11/extensions/randrproto.h
is included which has
48 #define RROutput CARD32 49 #define RRMode CARD32 50 #define RRCrtc CARD32 51 #define RRProvider CARD32 52 #define RRModeFlags CARD32 53 #define RRLease CARD32
Why are
typedef XID RRMode; typedef XID RROutput; typedef XID RRCrtc; typedef XID RRProvider;
not processed? Anyway, we could try a patch à la
+# ifndef XMD_H typedef XID RRLease; +# endif
because the "previous" C header file /opt/local/include/X11/Xmd.h
defines XMD_H
, and see whether compilation goes further. No error happens. Here. A new one comes up:
/bin/sh ../libtool --tag=CC --mode=compile /usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -I../include -I/opt/local/include -I/usr/include -I/opt/local/var/macports/sources/nue.de.rsync.macports.org/macports/release/tarballs/ports/x11/xorg-server-devel/files/dri -F/System/Library/Frameworks/ApplicationServices.framework/Frameworks -I/opt/local/var/macports/sources/nue.de.rsync.macports.org/macports/release/tarballs/ports/x11/xorg-server-devel/files/include -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=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 -std=c99 -faltivec -arch ppc -D_THREAD_SAFE -pthread -DROOTLESS_WORKAROUND -DROOTLESS_SAFEALPHA -DNO_ALLOCA -c -o log.lo log.c libtool: compile: /usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -I../include -I/opt/local/include -I/usr/include -I/opt/local/var/macports/sources/nue.de.rsync.macports.org/macports/release/tarballs/ports/x11/xorg-server-devel/files/dri -F/System/Library/Frameworks/ApplicationServices.framework/Frameworks -I/opt/local/var/macports/sources/nue.de.rsync.macports.org/macports/release/tarballs/ports/x11/xorg-server-devel/files/include -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=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 -std=c99 -faltivec -arch ppc -D_THREAD_SAFE -pthread -DROOTLESS_WORKAROUND -DROOTLESS_SAFEALPHA -DNO_ALLOCA -c log.c -fno-common -DPIC -o .libs/log.o log.c:134: error: expected declaration specifiers or „...“ before string constant log.c:134: warning: data definition has no type or storage class log.c:134: warning: type defaults to „int“ in declaration of „asm“ log.c:134: warning: function declaration isn“t a prototype log.c:189: warning: expected [error|warning|ignored] after „#pragma GCC diagnostic“ log.c:229: warning: expected [error|warning|ignored] after „#pragma GCC diagnostic“ make[1]: *** [log.lo] Error 1 make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_x11_xorg-server-devel/xorg-server-devel/work/xorg-server-devel-1.20.1/os'
The code here is:
123 #ifdef __APPLE__ 124 #include <AvailabilityMacros.h> 125 126 static char __crashreporter_info_buff__[4096] = { 0 }; 127 128 static const char *__crashreporter_info__ __attribute__ ((__used__)) = 129 &__crashreporter_info_buff__[0]; 130 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050 131 // This is actually a toolchain requirement, but I'm not sure the correct check, 132 // but it should be fine to just only include it for Leopard and later. This line 133 // just tells the linker to never strip this symbol (such as for space optimization) 134 asm(".desc ___crashreporter_info__, 0x10"); 135 #endif 136 #endif
Why not leaving this for Snow Leopard
and later? Because who woul read crash reports from Leopard
? Something like
-#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050 +#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
should allow the build to enter the unknown…
Making all in glx make[1]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_x11_xorg-server-devel/xorg-server-devel/work/xorg-server-devel-1.20.1/glx' /bin/sh ../libtool --tag=CC --mode=compile /usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -I../include -I../hw/xfree86/os-support -I../hw/xfree86/os-support/bus -I../hw/xfree86/common -I../hw/xfree86/dri -I../hw/xfree86/dri2 -I../mi -I../present -I/opt/local/include -I/usr/include -I/opt/local/var/macports/sources/nue.de.rsync.macports.org/macports/release/tarballs/ports/x11/xorg-server-devel/files/dri -F/System/Library/Frameworks/ApplicationServices.framework/Frameworks -I/opt/local/var/macports/sources/nue.de.rsync.macports.org/macports/release/tarballs/ports/x11/xorg-server-devel/files/include -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=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 -std=c99 -faltivec -arch ppc -D_THREAD_SAFE -pthread -DROOTLESS_WORKAROUND -DROOTLESS_SAFEALPHA -DNO_ALLOCA -c -o indirect_dispatch.lo indirect_dispatch.c libtool: compile: /usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -I../include -I../hw/xfree86/os-support -I../hw/xfree86/os-support/bus -I../hw/xfree86/common -I../hw/xfree86/dri -I../hw/xfree86/dri2 -I../mi -I../present -I/opt/local/include -I/usr/include -I/opt/local/var/macports/sources/nue.de.rsync.macports.org/macports/release/tarballs/ports/x11/xorg-server-devel/files/dri -F/System/Library/Frameworks/ApplicationServices.framework/Frameworks -I/opt/local/var/macports/sources/nue.de.rsync.macports.org/macports/release/tarballs/ports/x11/xorg-server-devel/files/include -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=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 -std=c99 -faltivec -arch ppc -D_THREAD_SAFE -pthread -DROOTLESS_WORKAROUND -DROOTLESS_SAFEALPHA -DNO_ALLOCA -c indirect_dispatch.c -fno-common -DPIC -o .libs/indirect_dispatch.o In file included from glxserver.h:70, from indirect_dispatch.c:29: ../include/glx_extinit.h:33: error: redefinition of typedef „__GLXscreen„ glxscreens.h:119: error: previous declaration of „__GLXscreen„ was here make[1]: *** [indirect_dispatch.lo] Error 1 make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_x11_xorg-server-devel/xorg-server-devel/work/xorg-server-devel-1.20.1/glx'
comment:10 Changed 6 years ago by ballapete (Peter "Pete" Dyballa)
OK, the
typedef struct __GLXscreen __GLXscreen;
can be easily guarded, because the C header file with its previous typedef
also #define
s _GLX_screens_h_
. So we come further, Frank N.:
/bin/sh ../../../libtool --tag=CC --mode=link /usr/bin/gcc-4.2 -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=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 -std=c99 -faltivec -arch ppc -D_THREAD_SAFE -pthread -DROOTLESS_WORKAROUND -DROOTLESS_SAFEALPHA -DNO_ALLOCA -Wl,-framework,CoreServices -L/opt/local/lib -Wl,-headerpad_max_install_names -arch ppc -o Xquartz stub.o launchd_fd.o mach_startupUser.o -lm libtool: link: /usr/bin/gcc-4.2 -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=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 -std=c99 -faltivec -arch ppc -D_THREAD_SAFE -pthread -DROOTLESS_WORKAROUND -DROOTLESS_SAFEALPHA -DNO_ALLOCA -Wl,-framework -Wl,CoreServices -Wl,-headerpad_max_install_names -arch ppc -o Xquartz stub.o launchd_fd.o mach_startupUser.o -L/opt/local/lib -lm -pthread /usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -I../../../include -I./.. -DBUILD_DATE=\"20181118\" -DXSERVER_VERSION=\"1.20.1\" -DX11BINDIR=\"/opt/local/bin\" -I/opt/local/include -I/usr/include -I/opt/local/var/macports/sources/nue.de.rsync.macports.org/macports/release/tarballs/ports/x11/xorg-server-devel/files/dri -F/System/Library/Frameworks/ApplicationServices.framework/Frameworks -I/opt/local/var/macports/sources/nue.de.rsync.macports.org/macports/release/tarballs/ports/x11/xorg-server-devel/files/include -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=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 -std=c99 -faltivec -arch ppc -D_THREAD_SAFE -pthread -DROOTLESS_WORKAROUND -DROOTLESS_SAFEALPHA -DNO_ALLOCA -c -o bundle-main.o bundle-main.c bundle-main.c:98: error: expected declaration specifiers or „...“ before string constant bundle-main.c:98: warning: data definition has no type or storage class bundle-main.c:98: warning: type defaults to „int“ in declaration of „asm“ bundle-main.c:98: warning: function declaration isn“t a prototype bundle-main.c: In function „checkin_or_register“: bundle-main.c:176: warning: „bootstrap_register“ is deprecated (declared at /usr/include/servers/bootstrap.h:268) make[4]: *** [bundle-main.o] Error 1 make[4]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_x11_xorg-server-devel/xorg-server-devel/work/xorg-server-devel-1.20.1/hw/xquartz/mach-startup' make[3]: *** [all] Error 2 make[3]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_x11_xorg-server-devel/xorg-server-devel/work/xorg-server-devel-1.20.1/hw/xquartz/mach-startup' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_x11_xorg-server-devel/xorg-server-devel/work/xorg-server-devel-1.20.1/hw/xquartz' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_x11_xorg-server-devel/xorg-server-devel/work/xorg-server-devel-1.20.1/hw' make: *** [all-recursive] Error 1 make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_x11_xorg-server-devel/xorg-server-devel/work/xorg-server-devel-1.20.1' Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_x11_xorg-server-devel/xorg-server-devel/work/xorg-server-devel-1.20.1" && /usr/bin/make -w all V=1
The block of code,
91 static char __crashreporter_info_buff__[4096] = { 0 }; 92 static const char *__crashreporter_info__ __attribute__((__used__)) = 93 &__crashreporter_info_buff__[0]; 94 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050 95 // This is actually a toolchain requirement, but I'm not sure the correct check, 96 // but it should be fine to just only include it for Leopard and later. This line 97 // just tells the linker to never strip this symbol (such as for space optimization) 98 asm (".desc ___crashreporter_info__, 0x10"); 99 #endif
can be solved by leaving it to Snow Leopard or some modern macOS version, as previously done.
Changed 6 years ago by ballapete (Peter "Pete" Dyballa)
Attachment: | Portfile.patch added |
---|
Changed 6 years ago by ballapete (Peter "Pete" Dyballa)
Attachment: | CrashReporter.patch added |
---|
Changed 6 years ago by ballapete (Peter "Pete" Dyballa)
Attachment: | too_much__GLXscreen.patch added |
---|
Changed 6 years ago by ballapete (Peter "Pete" Dyballa)
Attachment: | dix-RRLease.patch added |
---|
comment:11 Changed 6 years ago by kencu (Ken)
One data point:
On 10.5 Leopard Intel, the stock build fails with /usr/bin/gcc-4.2
with the same error regarding redefinition of CARD32, but it succeeds without any modifications if built with clang-3.4. That won't help Leopard PPC, but it's a useful point to know:
$ port -v installed xorg-server-devel The following ports are currently installed: xorg-server-devel @1.20.1_0 (active) platform='darwin 9' archs='i386' date='2018-11-18T13:36:17-0800'
comment:12 Changed 6 years ago by kencu (Ken)
I was worried this would happen eventually.
gcc-4.2 doesn't have the chops to build this due to the typedef redefintions; gcc6 can get past the typedef redefinitions, but gets bogged down in the objective-c code -- either it can't support a newer objc standard, or I can't figure out how to make it accept a newer objc standard.
eliminating the typedef redefinitions with the RRLease and GLXscreen hacks does let this build with gcc-4.2, for now.
comment:13 Changed 6 years ago by kencu (Ken)
my "homemade" clang-3.8
for PPC Leopard had absolutely no trouble building it, without touching anything in the Portfile:
$ port -v installed xorg-server-devel The following ports are currently installed: xorg-server-devel @1.20.1_0 (active) platform='darwin 9' archs='ppc' date='2018-11-18T17:35:41-0800'
and it works just fine, it appears. So -- I guess I better hurry up and finish that :>
comment:14 Changed 6 years ago by kencu (Ken)
Here's another approach we could consider... we could build with gcc6 (to get around the redefinition of typedef error), and then fix the gcc6 build up with these two small additions, which I think are straightforward enough:
xorg-server-devel on 10.5 leopard add to hw/xquartz/xpr/x-list.h #ifndef X_PFX #define X_PFX(x) x_ ## x #endif +#ifndef __private_extern__ +#define __private_extern__ extern +#endif #ifndef X_EXTERN #define X_EXTERN __private_extern__ #endif ========= in hw/xquartz/pbproxy/Makefile -OBJCFLAGS = $(CFLAGS) +OBJCFLAGS = $(CFLAGS) -fobjc-exceptions
I'm not 1000% sure of the _private_extern__
business, but it was found in a Google search for this error and indeed does fix it. I'm not sure all of the lineage to that fix.
comment:15 Changed 6 years ago by kencu (Ken)
another ref on the web <https://gvsmirnov.ru/blog/tech/2014/02/07/building-openjdk-8-on-osx-maverick.html> suggests this, which sounds logical enough:
#define __private_extern__ __attribute__((visibility("hidden")))
Edit- well, it looked better, but it doesn't work. X11.app builds, but the menus don't do anything. The other version ("extern") works just fine tho.
comment:16 Changed 6 years ago by kencu (Ken)
OK - more or less all straightened out. xorg-server-devel
works perfectly well on Tiger as well, with a few minor tweaks.
comment:18 Changed 6 years ago by kencu (Ken)
Essentially, we / I need to decide whether to make changes to the port to build with newer gcc versions on these older systems as here 57333#comment:14 which has some nice approaches to it and seems to be a perhaps more long-term solution or ...
whether to hack around the redefinitions using some tricky #undef / #def stuff to move the conflicting definition out of the way. Then the port can continue to build (for a while at least) with the older gcc versions as it does on xorg-server
.
Both approaches work fine. We'll pick one of them. I don't know which Jeremy would prefer - probably not the one forcing gcc6+, I rather imagine, unless we have no other options.
comment:19 follow-ups: 21 23 Changed 6 years ago by kencu (Ken)
So for some reason, today on Tiger PPC, only Pete's simple GLXscreens patch was needed. Still investigating why that is. That Tiger machine has xorg-xorgproto
installed, and that previously caused an issue with CARD32 -- but not today.
Here is my WIP <https://github.com/kencu/macports-ports/commit/ceba3fa8f3e66e709b5e455d733f55b72237976e>
comment:21 Changed 6 years ago by ballapete (Peter "Pete" Dyballa)
Replying to kencu:
So for some reason, today on Tiger PPC, only Pete's simple GLXscreens patch was needed. Still investigating why that is. That Tiger machine has
xorg-xorgproto
installed, and that previously caused an issue with CARD32 -- but not today.
I need on PPC Tiger at first enabling the configure
option --disable-dependency-tracking
…
comment:22 Changed 6 years ago by kencu (Ken)
Indeed so. Pete, please see the PR at <https://github.com/macports/macports-ports/pull/3543> and thanks for your legwork on this. We're just waiting for Jeremy to look it over, if he has time these days.
comment:23 Changed 6 years ago by ballapete (Peter "Pete" Dyballa)
Replying to kencu:
So for some reason, today on Tiger PPC, only Pete's simple GLXscreens patch was needed. Still investigating why that is. That Tiger machine has
xorg-xorgproto
installed, and that previously caused an issue with CARD32 -- but not today.
Confirmed!
But XQuartz 1.20.3 (xorg-server 1.20.3)
seems to have problems. Not all clients from my .xinitrc file are launched. Console
reports:
Jan 31 23:37:48 Tiger X[23214]: Xquartz: start_x11_server: (ipc/mig) server died Jan 31 23:38:21 Tiger X11.bin[23420]: kevent failure: Interrupted system call
~/Library/Logs/X11/org.macports.log
reports:
X11.app: Debug Info: kKLuchrData failed, trying kKLKCHRData.
comment:24 follow-up: 25 Changed 6 years ago by kencu (Ken)
Can you tell me how to reproduce this error?
comment:25 Changed 6 years ago by ballapete (Peter "Pete" Dyballa)
Replying to kencu:
Can you tell me how to reproduce this error?
It works for me on HighSierra, macOS 10.13.6, and on Tiger to reproduce the error. It looks like I have to launch X11 twice to have it working, i.e. launching all the X clients from .xinitrc.
OK, I am not sure whether ~/.xinitrc or the files in ~/.xinitr.d are used. From ps
it looks as if it is using the file ~/.xinitrc (actually output from pstree
):
-+= 00001 root /sbin/launchd \-+- 07604 pete /bin/tcsh -c /opt/local/bin/startx \-+- 07610 pete /bin/sh /opt/local/bin/startx \-+- 07683 pete xinit /Users/pete/.xinitrc -- /opt/local/bin/X :0 -listen tcp -iglx -dpi 133 -auth /Users/pete/.serverauth.7610 \-+= 07693 pete /opt/local/bin/fluxbox \-+- 07739 pete /usr/local/bin/emacs-26.1 -geometry 100x55+1221+167 -T 26.1 --debug-init -fn Lucida Sans Typewriter:autohint=true:antialias=true:size=9
Stripping off all comment lines ~/.xinitrc has essentially:
set -x echo "vor XRDB" xrdb -all -merge ${HOME}/.Xresources echo "nach XRDB" echo "org.macports.X11 X11_PREFS_DOMAIN 1" echo "org.x.X11 X11_PREFS_DOMAIN" echo "X11_PREFS_DOMAIN ist --$X11_PREFS_DOMAIN--" xset fp+ /usr/local/texlive/2009/texmf-dist/fonts/truetype/arkandis/libris/ WM=/opt/local/bin/fluxbox /opt/local/bin/gkrellm & env LC_NUMERIC=C /usr/local/bin/emacs-26.1 -geometry 100x55+1221+167 -T 26.1 --debug-init -fn 'Lucida Sans Typewriter:autohint=true:antialias=true:size=9' & /usr/local/bin/emacs-23.4 -geometry 99x66+200+234 -T 23.4x --debug-init -fn 'Lucida Sans Typewriter:autohint=true:antialias=true:size=9' & exec $WM
I launch X11 by double-clicking on the icon in Dock.
comment:26 Changed 4 years ago by kencu (Ken)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
updated to 1.20.9 now, builds
Main.log from PPC Leopard