gtk+ fails to link: Tiger/ppc, MACOSX_DEPLOYMENT_TARGET=10.4
I've been beating my head against this one for 2 weeks and making no progress at all. I need to have MACOSX_DEPLOYMENT_TARGET=10.4 for Gnucash (it won't link with a flat namespace), but if it's set, then gtk+/gtk/gtk-query-immodules-2.0 won't link (Commands and error follow).
Any ideas, anyone?
====================
/bin/sh ../libtool --mode=link gcc -DGDK_PIXBUF_DISABLE_DEPRECATED -O2 -gstabs+3 -std=gnu89 -Wall -L/Users/john/gtk/inst/lib -L/Users/john/gtk/inst/lib -Wl,-headerpad_max_install_names -o gtk-query-immodules-2.0 queryimmodules.o libgtk-quartz-2.0.la ../gdk-pixbuf/libgdk_pixbuf-2.0.la ../gdk/libgdk-quartz-2.0.la -lintl
gcc -DGDK_PIXBUF_DISABLE_DEPRECATED -O2 -gstabs+3 -std=gnu89 -Wall -Wl,-headerpad_max_install_names -o .libs/gtk-query-immodules-2.0 queryimmodules.o -L/Users/john/gtk/inst/lib ./.libs/libgtk-quartz-2.0.dylib -L/Developer/SDKs/MacOSX10.4u.sdk/usr/lib /Users/john/gtk/source/gtk+/gdk/.libs/libgdk-quartz-2.0.dylib /Users/john/gtk/inst/lib/libatk-1.0.dylib ../gdk-pixbuf/.libs/libgdk_pixbuf-2.0.dylib ../gdk/.libs/libgdk-quartz-2.0.dylib /Users/john/gtk/inst/lib/libpangocairo-1.0.dylib /Users/john/gtk/inst/lib/libpangoft2-1.0.dylib /Users/john/gtk/inst/lib/libpango-1.0.dylib /Users/john/gtk/inst/lib/libcairo.dylib /Users/john/gtk/inst/lib/libpixman-1.dylib /Users/john/gtk/inst/lib/libfontconfig.dylib /Users/john/gtk/inst/lib/libfreetype.dylib /Users/john/gtk/inst/lib/libexpat.dylib /Users/john/gtk/inst/lib/libpng12.dylib -lz /Users/john/gtk/source/gtk+/gdk-pixbuf/.libs/libgdk_pixbuf-2.0.dylib /Users/john/gtk/inst/lib/libgio-2.0.dylib /Users/john/gtk/inst/lib/libgobject-2.0.dylib /Users/john/gtk/inst/lib/libgmodule-2.0.dylib /Users/john/gtk/inst/lib/libglib-2.0.dylib -lm /Users/john/gtk/inst/lib/libintl.dylib -liconv -lc
/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld: Undefined symbols:
.objc_class_name_NSAutoreleasePool
.objc_class_name_NSObject
.objc_class_name_NSStatusBar
.objc_class_name_NSString
_NSApp
_objc_msgSend
_objc_msgSendSuper
.objc_class_name_NSPasteboard
_NSGeneralPboard
___CFConstantStringClassReference
_NSDragPboard
_objc_msgSend_stret
.objc_class_name_NSColor
.objc_class_name_NSData
.objc_class_name_NSGraphicsContext
.objc_class_name_NSImage
.objc_class_name_NSMutableSet
.objc_class_name_NSURL
_CGColorSpaceCreateDeviceRGB
_CGColorSpaceRelease
_CGContextDrawImage
_CGDataProviderCreateWithData
_CGDataProviderRelease
_CGImageCreate
_CGImageReelease
_NSColorPboardType
_NSDeviceRGBColorSpace
_NSFilenamesPboardType
_NSStringPboardType
_NSTIFFPboardType
_NSURLPboardType
.objc_class_name_NSMetadataQuery
.objc_class_name_NSNotificationCenter
.objc_class_name_NSPredicate
_GetCurrentEventTime
_KLGetCurrentKeyboardLayout
_KLGetKeyboardLayoutProperty
_KeyTranslate
_LMGetKbdType
_SetSystemUIMode
collect2: ld returned 1 exit status

I'm also on Tiger/PPC with
I'm also on Tiger/PPC with my MACOSX_DEPLOYMENT_TARGET set to 10.4 and I got exactly the same error as you did. I was able to track down all of the undefined symbols with otool. The way I got gtk+ to link was to set the Cocoa, Carbon, CoreFoundation, and ApplicationServices frameworks, plus /usr/lib/libobjc.dylib in the LDFLAGS environment variable in my shell before running "jhbuild build". There may be a way to include those flags in your .jhbuildrc-custom file so they don't have to be set every time you build, but perhaps Richard can advise us if that's possible.
Hope this helps. -Myshkin
Thanks, that worked. The
Thanks, that worked. The jhbuildrc-custom magic is:
module_makeargs["gtk+"]='LDFLAGS="-framework Cocoa -framework Carbon -framework CoreFoundation -framework ApplicationServices -lobjc"'