GNOME Bugzilla – Bug 322374
Examples does not build on MacOS X
Last modified: 2006-05-15 22:20:56 UTC
To be able to build the examples using pango head I had to set CFLAGS to "-framework Foundation -framework AppKit". With that modification it built without problems
For which examples are these exactly needed? If really needed, they belong to somewhere else I suspect, in pangocairo or cairo, not the examples...
Any/All examples. They're using symbols from Foundation/AppKit but they're not linked properly.
Ok, then is it pangocairo that is taking those symbols in? I don't see any reference to anything Apple-specific in the examples' code.
I don't have access to the machine right now so I cannot give the exact compilation error. The symbols are in the atsu backend (pangoatsui-fontmap.c, pango_atsui_family_list_faces and pango_atsui_font_map_init), which needs to be compiled with an objective C compiler.
Andersca, can you roll a patch? Are these flags already in pangocairo.pc and only a problem in examples/?
This is weird. I don't need those flags, and not Anders either. As I understand it, nothing from those two frameworks are used in cairo or pango. Johan, could you try adding -lobjc and see if that helps?
Apparently somebody else was experiencing this too, as verbosely reported on one of the lists recently.
Richard Hult committed the following: diff -u -p -d -r1.139 -r1.140 --- pango/Makefile.am 31 Mar 2006 12:28:09 -0000 1.139 +++ pango/Makefile.am 15 May 2006 17:55:30 -0000 1.140 @@ -297,6 +297,7 @@ libpangocairo_1_0_la_SOURCES += \ pangocairo-atsuifontmap.c libpangocairo_1_0_la_CFLAGS = -xobjective-c +libpangocairo_1_0_la_LDFLAGS += -framework CoreFoundation -framework Carbon -framework Cocoa endif # ------------------- libpangowin32 ------------------- 2006-05-15 Richard Hult <richard@imendio.com> * pango/Makefile.am (libpangocairo_1_0_la_LDFLAGS): Add the necessary frameworks to make this build with -no-undefined.