Re: [MacPorts] #57333: xorg-server-devel @1.20.1 does not build on Mac OS X 10.5.8, Leopard, because of redefinition of typedef ‘CARD32’
MacPorts
noreply at macports.org
Sat Nov 17 22:38:28 UTC 2018
#57333: xorg-server-devel @1.20.1 does not build on Mac OS X 10.5.8, Leopard,
because of redefinition of typedef ‘CARD32’
--------------------------------+----------------------
Reporter: ballapete | Owner: jeremyhu
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.5.4
Resolution: | Keywords: leopard
Port: xorg-server-devel |
--------------------------------+----------------------
Comment (by ballapete):
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
{{{
+#if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1060
typedef XID RRLease;
+#endif
}}}
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'
}}}
--
Ticket URL: <https://trac.macports.org/ticket/57333#comment:9>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list