Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#57334 closed defect (fixed)

gimp2: error: typedef redefinition with different types

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: dbevans (David B. Evans)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: gimp2

Description

gimp2 fails to build on 10.6:

In file included from gimpwidgets-utils.c:37:
In file included from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:30:
In file included from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/QD.framework/Headers/QD.h:41:
/System/Library/Frameworks/ApplicationServices.framework/Frameworks/QD.framework/Headers/QuickdrawTypes.h:267:41: error: typedef redefinition with different types ('struct Cursor' vs 'XID' (aka 'unsigned long'))
typedef struct Cursor                   Cursor;
                                        ^
/opt/local/include/X11/X.h:103:13: note: previous definition is here
typedef XID Cursor;
            ^
1 error generated.
make[3]: *** [gimpwidgets-utils.o] Error 1

Apparently macOS and X11 both define something different called Cursor. Not sure how such a conflict is meant to be dealt with, nor why we don't see the problem with other X11 software. See #19743 for a previous instance of this type of problem with another port, which was unhelpfully closed as invalid.

Change History (4)

comment:2 Changed 6 years ago by dbevans (David B. Evans)

In c22b48d786330cbf539426ef461aef27ef78ea84/macports-ports (master):

gimp2-devel: additional 10.6 build fix

On 10.6 and earlier when GDK_WINDOWING_X11 and PLATFORM_OSX
are defined simultaneously (e.g. +x11), there is
potential for a typedef conflict between X11 and Quickdraw.
In the case where this occurs, #undef PLATFORM_OSX if
GDK_WINDOWING_X11 is defined.

In otherwords, if building for X11 use the X11 API exclusively
even if we are building on OSX.

error: typedef redefinition with different types ('struct Cursor' vs 'XID' (aka 'unsigned long'))

See: #57334

comment:3 Changed 6 years ago by dbevans (David B. Evans)

Resolution: fixed
Status: assignedclosed

In b9c3977e5447f5a26f2c5615eea40442f1262208/macports-ports (master):

gimp2: merge additional build fixes from gimp2-devel

Closes #57334.

comment:4 Changed 6 years ago by dbevans (David B. Evans)

In d555ff30a31fe91e49905e59c260e22f74bc8119/macports-ports (master):

gimp3-devel: merge additional build fixes from gimp2-devel

See: #57334

Note: See TracTickets for help on using tickets.