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 655065 - Build failure on OS X 10.7 Lion
Build failure on OS X 10.7 Lion
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: Quartz
2.24.x
Other Mac OS
: Normal normal
: ---
Assigned To: gtk-quartz maintainers
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2011-07-21 17:21 UTC by Roy Liu
Modified: 2012-03-02 18:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
The Makefile patch. (713 bytes, patch)
2011-07-21 17:21 UTC, Roy Liu
needs-work Details | Review
Simple Makefile.am patch to correct CFLAGS for autotestkeywords.c (538 bytes, patch)
2011-10-09 16:21 UTC, John Ralls
none Details | Review
More comprehensive patch, uses default variable LDADD (2.67 KB, patch)
2011-10-09 16:33 UTC, John Ralls
committed Details | Review

Description Roy Liu 2011-07-21 17:21:02 UTC
Created attachment 192394 [details] [review]
The Makefile patch.

GTK doesn't build on Lion because of a small problem at the linking step with a test program named "autotestkeywords". Please find the patch attached. I am puzzled as to why including only headers in a file like autotestkeywords.cc would cause the symbol "_objc_msg_send_fixup" to be generated when using the 10.7 SDK as opposed to the 10.6 SDK? In any case, the patch causes linkage with the requisite frameworks.  It probably causes other problems, which is why I'm consulting with the upstream (I am a MacPorts user).

Below is the abbreviated build log:

----

libtool: link: /Developer/usr/bin/llvm-gcc-4.2 -DGDK_PIXBUF_DISABLE_DEPRECATED -pipe -O2 -fstrict-aliasing -arch x86_64 -Wall -arch x86_64 -o .libs/testtooltips testtooltips.o  -L/opt/local/lib ../gdk/.libs/libgdk-quartz-2.0.dylib ../gtk/.libs/libgtk-quartz-2.0.dylib /opt/local/var/macports/build/_Users_administrator_Documents_build_macports_gnome_gtk2/gtk2/work/gtk+-2.24.4/gdk/.libs/libgdk-quartz-2.0.dylib /opt/local/lib/libpangocairo-1.0.dylib /opt/local/lib/libpangoft2-1.0.dylib /opt/local/lib/libpango-1.0.dylib /opt/local/lib/libatk-1.0.dylib /opt/local/lib/libcairo.dylib /opt/local/lib/libpixman-1.dylib -lpthread /opt/local/lib/libfontconfig.dylib /opt/local/lib/libexpat.dylib /opt/local/lib/libfreetype.dylib -lbz2 /opt/local/lib/libgdk_pixbuf-2.0.dylib /opt/local/lib/libpng14.dylib /opt/local/lib/libgio-2.0.dylib -lz /opt/local/lib/libgobject-2.0.dylib /opt/local/lib/libgmodule-2.0.dylib /opt/local/lib/libgthread-2.0.dylib /opt/local/lib/libglib-2.0.dylib -lresolv -lm /opt/local/lib/libintl.dylib /opt/local/lib/libiconv.dylib -lc -framework Carbon -framework CoreFoundation -framework Cocoa
/bin/sh ../libtool  --tag=CXX   --mode=link /Developer/usr/bin/llvm-g++-4.2  -pipe -O2 -arch x86_64  -L/opt/local/lib -arch x86_64 -o autotestkeywords autotestkeywords-autotestkeywords.o  -lintl 
libtool: link: /Developer/usr/bin/llvm-g++-4.2 -pipe -O2 -arch x86_64 -arch x86_64 -o autotestkeywords autotestkeywords-autotestkeywords.o  -L/opt/local/lib /opt/local/lib/libintl.dylib /opt/local/lib/libiconv.dylib -lc
Undefined symbols for architecture x86_64:
  "_objc_msgSend_fixup", referenced from:
      l_objc_msgSend_fixup_autorelease in autotestkeywords-autotestkeywords.o
     (maybe you meant: l_objc_msgSend_fixup_autorelease)
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status

----

Notice that, with the current Makefile, autotestkeywords links with a reduced set of libraries.
Comment 1 Javier Jardón (IRC: jjardon) 2011-07-21 19:05:09 UTC
Review of attachment 192394 [details] [review]:

This doesnt seem correct. You have to modify tests/Makefile.am, tests/Makefile.in is an autogenerated file
Comment 2 Roy Liu 2011-07-21 19:07:08 UTC
My bad.  That's because I'm a MacPorts user and that was the patch as applied to the GTK source distribution, which I believe is post-automake.
Comment 3 Ethan Tira-Thompson 2011-07-25 21:58:54 UTC
For reference, MacPorts ticket is here:
https://trac.macports.org/ticket/30281
Comment 4 John Ralls 2011-10-09 16:21:43 UTC
Created attachment 198656 [details] [review]
Simple Makefile.am patch to correct CFLAGS for autotestkeywords.c

I'm able to duplicate this when building from the 2.24.6 tarball, but when I build from git gtk-2-24, it builds fine. Perhaps a libtool issue.

Anyway, the fix is harmless, so this patch does what the OP proposed, except to Makefile.am
Comment 5 John Ralls 2011-10-09 16:33:24 UTC
Created attachment 198657 [details] [review]
More comprehensive patch, uses default variable LDADD

However, I like this solution better, because renaming LDADDS to LDADD lets automake take care of adding the default set of link flags; foo_LDADD needn't be assigned in Makefile.am unless there's a special case (and there aren't any yet).
Comment 6 John Ralls 2012-01-27 21:16:22 UTC
Comment on attachment 198656 [details] [review]
Simple Makefile.am patch to correct CFLAGS for autotestkeywords.c

If no-one objects soon, I'm going to push the latest patch...
Comment 7 Roy Liu 2012-01-27 21:19:43 UTC
If it fixes my build, I'm all for it!
Comment 8 Kristian Rietveld 2012-01-28 10:04:38 UTC
(In reply to comment #6)
> (From update of attachment 198656 [details] [review])
> If no-one objects soon, I'm going to push the latest patch...

Would be good if you could double check the patch with Matthias Clasen (now on CC).  I usually don't touch the build system.
Comment 9 Emmanuele Bassi (:ebassi) 2012-02-29 10:50:41 UTC
Review of attachment 198657 [details] [review]:

looks okay to me.
Comment 10 Paul Davis 2012-02-29 12:30:54 UTC
Echoing John's comment above: I'm building git gtk-2-24 on Lion and there is no issue.
Comment 11 John Ralls 2012-03-02 01:07:04 UTC
Comment on attachment 198657 [details] [review]
More comprehensive patch, uses default variable LDADD

Committed on master and backported to 3.2. I'll backport to 2.4 tomorrow.
Comment 12 John Ralls 2012-03-02 18:49:49 UTC
Backported to 2-24.