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 322372 - Quartz backend does not build on Mac OS X v10.3
Quartz backend does not build on Mac OS X v10.3
Status: RESOLVED DUPLICATE of bug 408518
Product: gtk+
Classification: Platform
Component: Backend: Quartz
unspecified
Other Mac OS
: Normal normal
: ---
Assigned To: gtk-quartz maintainers
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2005-11-25 00:00 UTC by Johan (not receiving bugmail) Dahlin
Modified: 2007-05-16 17:18 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Johan (not receiving bugmail) Dahlin 2005-11-25 00:00:54 UTC
I get this error while trying to build gtk+ on MacOS X 10.3 using Xcode 1.5:

 gcc -DHAVE_CONFIG_H -I. -I. -I../.. -DG_LOG_DOMAIN=\"Gdk\" -DGDK_COMPILATION -I../.. -I../../
gdk -I../../gdk -DG_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED 
-DGDK_DISABLE_DEPRECATED -DG_ENABLE_DEBUG -pthreads -I/Users/kiko/Development/prefix/
include/glib-2.0 -I/Users/kiko/Development/prefix/lib/glib-2.0/include -I/Users/kiko/Development/
prefix/include/pango-1.0 -I/Users/kiko/Development/prefix//include/cairo -xobjective-c -I/Users/
kiko/Development/prefix/include -framework Carbon -MT GdkQuartzView.lo -MD -MP -MF .deps/
GdkQuartzView.Tpo -c GdkQuartzView.c  -fno-common -DPIC -o .libs/GdkQuartzView.o
gcc: unrecognized option `-pthreads'
In file included from GdkQuartzView.c:22:
GdkQuartzView.h:21:26: Quartz/Quartz.h: No such file or directory
In file included from GdkQuartzView.c:22:
GdkQuartzView.h:26: error: cannot find interface declaration for `NSView', superclass of 
`GdkQuartzView'
make: *** [GdkQuartzView.lo] Error 1
Comment 1 Johan (not receiving bugmail) Dahlin 2005-11-26 14:53:21 UTC
Seems that Quartz.h is supposed to be in the Quartz framework which is only
available on 10.4.
Comment 2 Dave Vasilevsky 2006-06-22 06:21:13 UTC
The Quartz framework is only a wrapper around some other frameworks. On Tiger, I can still build everything in gtk+/gdk/quartz if '#import <Quartz/Quartz.h>' is replaced with '#import <AppKit/AppKit.h>' in GtkQuartzView.h.

AppKit is definitely available on Panther, but there may be additional things preventing Gtk/OSX from building on Panther. Could you please verify that this bug is still valid even if you change the #import?
Comment 3 Hubert Figuiere (:hub) 2006-07-25 19:36:00 UTC
For CoreGraphics you need to import <ApplicationServices/ApplicationServices.h>
Comment 4 Richard Hult 2006-07-25 21:45:33 UTC
Some APIs only available in tiger are used though. I don't remember which ones off the top of my head but it should be fairly simple to make it work on panther if someone wants to take a look at that.
Comment 5 Hubert Figuiere (:hub) 2006-07-25 22:25:21 UTC
(In reply to comment #4)
> Some APIs only available in tiger are used though. I don't remember which ones
> off the top of my head but it should be fairly simple to make it work on
> panther if someone wants to take a look at that.
> 

Why don't you just use the SDK? You can build using 10.3 API only.
Comment 6 Dave Vasilevsky 2006-07-26 13:56:15 UTC
Hub, I was trying to do a complete build of gtk+ and its dependencies from scratch before, using the SDKs. Unfortunately, it's a little tricky to build Makefile-based projects that way.

Apparently there's a bug in Apple's ld (what else is new?) so that if it gets more than one -syslibroot flags it dies, even if they're all the same. Also, if Apple's gcc sees -isysroot then it automagically passes -syslibroot to ld. (This behavior isn't documented, of course.) Altogether, this means that the instructions Apple gives don't work (http://developer.apple.com/documentation/developertools/Conceptual/cross_development/Using/chapter_3_section_2.html#//apple_ref/doc/uid/20002000-1114311-BABGCAAB).

Most projects will still work with just -isysroot in CPPFLAGS, but others still get screwed up. For example, freetype uses both CPPFLAGS and LDFLAGS in its configure tests, but then only LDFLAGS when it links libfreetype. So there's actually no combination of flags that works. Ugh.

Anyhow, I think I've discovered a really ugly workaround, and I've got a build with the 10.3.9 SDK running now. I expect it will probably die somewhere in cairo or pango, we'll see.
Comment 7 Dave Vasilevsky 2006-07-26 17:12:59 UTC
Alright, it looks like everything builds fine up to Gtk+. Changing Quartz.h to AppKit.h in all the headers appears to work.

Here are the 10.4-only APIs that we use:

CGContextSetAllowsAntialiasing
CGContextSetBlendMode
CGContextClipToMask
CGImageCreateCopy
CGImageGetBitmapInfo
-[NSScreen userSpaceScaleFactor]


Comment 8 Richard Hult 2007-05-16 17:18:57 UTC

*** This bug has been marked as a duplicate of 408518 ***