Opened 12 years ago

Closed 4 years ago

#37115 closed defect (wontfix)

gcc43 produces on PPC Mac OS X 10.4.11, Tiger, an error with /opt/local/include/X11/Xlib.h

Reported by: ballapete (Peter "Pete" Dyballa) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.1.2
Keywords: Cc: mww@…
Port: gcc43

Description

The invocation is:

gcc-mp-4.3 -std=gnu99 -o xaw3d -I/opt/local/include -g -ggdb3 -H -pipe -fPIC -fno-common -Os -mcpu=7450 -mtune=7450 -maltivec -faltivec -mabi=altivec -I/opt/local/include/ImageMagick -L/opt/local/lib -v -Wl,-v -Wl,-bind_at_load -Wl,-t xaw3d.c -lgnutls -lMagickWand -lMagickCore -lX11 -lpthread  -mwarn-altivec-long

according to what the configure script uses. The error is this:

Apple Inc version cctools-806, GNU assembler version 1.38
Compiler executable checksum: 23c71723296e01b69e431a6dc6818a24
. /opt/local/include/X11/Intrinsic.h
.. /opt/local/include/X11/Xlib.h
... /usr/include/sys/types.h
.... /usr/include/sys/appleapiopts.h
.... /usr/include/sys/cdefs.h
.... /usr/include/machine/types.h
..... /usr/include/ppc/types.h
...... /usr/include/ppc/_types.h
.... /usr/include/sys/_types.h
..... /usr/include/machine/_types.h
.... /usr/include/machine/endian.h
..... /usr/include/ppc/endian.h
...... /usr/include/sys/_endian.h
....... /usr/include/stdint.h
....... /usr/include/libkern/OSByteOrder.h
........ /usr/include/libkern/ppc/OSByteOrder.h
... /opt/local/include/X11/X.h
... /opt/local/include/X11/Xfuncproto.h
... /opt/local/include/X11/Xosdefs.h
... /opt/local/lib/gcc43/gcc/ppc-apple-darwin8/4.3.6/include/stddef.h
In file included from /opt/local/include/X11/Intrinsic.h:53,
                 from xaw3d.c:78:
/opt/local/include/X11/Xlib.h:419: error: duplicate 'unsigned'
/opt/local/include/X11/Xlib.h:419: error: both 'long' and 'short' in declaration specifiers
.. /opt/local/include/X11/Xutil.h
... /opt/local/include/X11/keysym.h
.... /opt/local/include/X11/keysymdef.h
.. /opt/local/include/X11/Xresource.h
.. /usr/include/string.h
... /usr/include/_types.h
.. /opt/local/lib/gcc43/gcc/ppc-apple-darwin8/4.3.6/include/stddef.h
.. /opt/local/include/X11/Core.h
.. /opt/local/include/X11/Composite.h
.. /opt/local/include/X11/Constraint.h
.. /opt/local/include/X11/Object.h
.. /opt/local/include/X11/RectObj.h
. /opt/local/include/X11/Xaw3d/Simple.h
.. /opt/local/include/X11/Xaw3d/Xaw3dP.h
... /opt/local/include/X11/IntrinsicP.h
.... /opt/local/include/X11/CoreP.h
.... /opt/local/include/X11/CompositeP.h
.... /opt/local/include/X11/ConstrainP.h
.... /opt/local/include/X11/ObjectP.h
.... /opt/local/include/X11/RectObjP.h
.. /opt/local/include/X11/Xmu/Converters.h
Multiple include guards may be useful for:
/opt/local/include/X11/keysym.h
/opt/local/include/X11/keysymdef.h
Exit 1

The code in X11/xlib.h is:

  415	/*
  416	 * Data structure used by color operations
  417	 */
  418	typedef struct {
  419		unsigned long pixel;
  420		unsigned short red, green, blue;
  421		char flags;  /* do_red, do_green, do_blue */
  422		char pad;
  423	} XColor;

being expanded to:

typedef struct {
 unsigned long __attribute__((altivec(pixel__))) unsigned short;
 unsigned short red, green, blue;
 char flags;
 char pad;
} XColor;

The reason for this is this built-in rule:

#define _ARCH_PPC 1
#define _ARCH_PPCGR 1
#define __ALTIVEC__ 1
#define __VEC__ 10206
#define __vector __attribute__((altivec(vector__)))
#define __pixel __attribute__((altivec(pixel__))) unsigned short
#define __bool __attribute__((altivec(bool__))) unsigned

Isn't it pretty silly to assume that a pixel will always have 16 bit? These 16 bit would be OK for each colour component and the alpha channel for transparency…

Attachments (1)

xaw3d.c (2.2 KB) - added by ballapete (Peter "Pete" Dyballa) 12 years ago.
C test programme from configure

Download all attachments as: .zip

Change History (2)

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

Attachment: xaw3d.c added

C test programme from configure

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

Resolution: wontfix
Status: newclosed

please reopen with new information if still relevant!

Note: See TracTickets for help on using tickets.