[MacPorts] #51052: gtk3 @3.20.2 +quartz build error on Mac OS X 10.7

MacPorts noreply at macports.org
Mon Apr 4 22:47:55 PDT 2016


#51052: gtk3 @3.20.2 +quartz build error on Mac OS X 10.7
------------------------+----------------------
  Reporter:  martijn@…  |      Owner:  devans@…
      Type:  defect     |     Status:  assigned
  Priority:  Normal     |  Milestone:
 Component:  ports      |    Version:  2.3.4
Resolution:             |   Keywords:
      Port:  gtk3       |
------------------------+----------------------

Comment (by devans@…):

 The relevant error message from your log file are as follows

 {{{
 1771    :info:build gdkevents-quartz.c:982:10: error: use of undeclared
 identifier 'NSEventPhaseMayBegin'; did you mean 'NSEventPhaseBegan'?
 1772    :info:build     case NSEventPhaseMayBegin:
 1773    :info:build          ^~~~~~~~~~~~~~~~~~~~
 1774    :info:build          NSEventPhaseBegan
 1775    :info:build
 /System/Library/Frameworks/AppKit.framework/Headers/NSEvent.h:128:5: note:
 'NSEventPhaseBegan' declared here
 1776    :info:build     NSEventPhaseBegan       = 0x1 << 0,
 1777    :info:build     ^
 1778    :info:build gdkevents-quartz.c:982:10: error: duplicate case value
 'NSEventPhaseBegan'
 1779    :info:build     case NSEventPhaseMayBegin:
 1780    :info:build          ^
 1781    :info:build gdkevents-quartz.c:943:10: note: previous case defined
 here
 1782    :info:build     case NSEventPhaseBegan:
 1783    :info:build          ^
 1784    :info:build 4 warnings and 2 errors generated.
 1785    :info:build make[4]: *** [gdkevents-quartz.lo] Error 1
 1786    :info:build make[4]: *** Waiting for unfinished jobs....
 1787    :info:build 1 warning generated.
 }}}
 My testing shows gtk3 +quartz builds correctly on 10.8+.  Unfortunately, I
 don't have a machine capable of running 10.7 to test that version so I
 have no way to verify your results.

 However, according to Apple's Appkit Framework
 [https://developer.apple.com/library/mac/documentation/Cocoa/Reference/ApplicationKit/Classes/NSEvent_Class/#//apple_ref/c/tdef/NSEventPhase
 NSEvent Class Reference], the NSEventPhase* constants (including
 NSEventPhaseMayBegin) were introduced in 10.7 so this should build
 correctly on 10.7 although I would expect it to fail on 10.6 and earlier.

 Questions:

  * Would you look in
 /System/Library/Frameworks/AppKit.framework/Headers/NSEvent.h and see if
 NSEventPaseMayBegin is defined there?  The definition should look
 something like
 {{{
 #if MAC_OS_X_VERSION_10_7 <= MAC_OS_X_VERSION_MAX_ALLOWED
 enum {
     NSEventPhaseNone        = 0, // event not associated with a phase.
     NSEventPhaseBegan       = 0x1 << 0,
     NSEventPhaseStationary  = 0x1 << 1,
     NSEventPhaseChanged     = 0x1 << 2,
     NSEventPhaseEnded       = 0x1 << 3,
     NSEventPhaseCancelled   = 0x1 << 4,
     NSEventPhaseMayBegin    = 0x1 << 5,
 };
 #endif
 }}}

  * What version of Xcode are you using? The recommended version for 10.7
 is Xcode 4.6.3 which can be downloaded
 [http://adcdownload.apple.com/Developer_Tools/xcode_4.6.3/xcode4630916281a.dmg
 here.]

-- 
Ticket URL: <https://trac.macports.org/ticket/51052#comment:2>
MacPorts <https://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list