After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 780019 - gtk+3 3.22.10 does not compile on macOS Yosemite
gtk+3 3.22.10 does not compile on macOS Yosemite
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: Quartz
2.22.x
Other Mac OS
: Normal blocker
: ---
Assigned To: gtk-quartz maintainers
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2017-03-14 09:00 UTC by FX
Modified: 2017-03-15 11:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
quartz: fix build for <10.12 (953 bytes, patch)
2017-03-14 19:58 UTC, Christoph Reiter (lazka)
committed Details | Review

Description FX 2017-03-14 09:00:51 UTC
Freshly released gtk+3 3.22.10 does not compile on macOS Yosemite. The error is the following:

  CC       gdkwindow-quartz.lo
gdkwindow-quartz.c:2499:7: error: use of undeclared identifier 'NSWindowStyleMask'
      NSWindowStyleMask mask = [impl->toplevel styleMask];


This is due to this recent commit: https://git.gnome.org/browse/gtk+/commit/?h=gtk-3-22&id=7160e3a12f56ab52ea3e0ff2097b8912128a3677

NSWindowStyleMask is an AppKit type, so I guess the file is missing:
#include <AppKit/AppKit.h>
Comment 1 Christoph Reiter (lazka) 2017-03-14 19:58:51 UTC
Created attachment 347944 [details] [review]
quartz: fix build for <10.12

The style mask type was changed from NSUInteger to NSWindowStyleMask.
Use NSUInteger so it also works on older macOS.
Comment 2 Tom Schoonjans 2017-03-14 20:41:43 UTC
(In reply to Christoph Reiter (lazka) from comment #1)
> Created attachment 347944 [details] [review] [review]
> quartz: fix build for <10.12
> 
> The style mask type was changed from NSUInteger to NSWindowStyleMask.
> Use NSUInteger so it also works on older macOS.

I am not sure that will be sufficient to fix this. The NSWindowStyleMask enum constants (https://developer.apple.com/reference/appkit/nswindowstylemask?language=objc) are also new in 10.12, so you will need to #define them when #ifdef AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER is not met.
Comment 3 Christoph Reiter (lazka) 2017-03-14 20:50:19 UTC
It build fine here using 10.11 with xcode 7.

As far as I can see the code doesn't use any of the new constants.
Comment 4 Tom Schoonjans 2017-03-14 21:14:18 UTC
Sorry about that, I thought the new enum constants were used...
Comment 5 Matthias Clasen 2017-03-15 11:18:09 UTC
Review of attachment 347944 [details] [review]:

Sorry about that.
Comment 6 Matthias Clasen 2017-03-15 11:26:25 UTC
Attachment 347944 [details] pushed as 64ec7c2 - quartz: fix build for <10.12