The linker fails with a 'duplicate symbol' error when attempting to emerge libglade-1.6.2 using prefix-portage on OS X 10.5: i686-apple-darwin9-gcc -dynamiclib -o .libs/libglade-2.0.0.0.7.dylib .libs/glade-init.o .libs/glade-xml.o .libs/glade-parser.o .libs/glade-gtk.o -L/Users/shaunc/Gentoo/usr/lib /Users/shaunc/Gentoo/usr/lib/libxml2.dylib /Users/shaunc/Gentoo/usr/lib/libz.dylib /Users/shaunc/Gentoo/usr/lib/libgtk-quartz-2.0.dylib /Users/shaunc/Gentoo/usr/lib/libgdk-quartz-2.0.dylib /Users/shaunc/Gentoo/usr/lib/libatk-1.0.dylib /Users/shaunc/Gentoo/usr/lib/libgdk_pixbuf-2.0.dylib /Users/shaunc/Gentoo/usr/lib/libpangocairo-1.0.dylib /Users/shaunc/Gentoo/usr/lib/libpng12.dylib /Users/shaunc/Gentoo/usr/lib/libpixman-1.dylib /Users/shaunc/Gentoo/usr/lib/libpangoft2-1.0.dylib /Users/shaunc/Gentoo/usr/lib/libfontconfig.dylib /Users/shaunc/Gentoo/usr/lib/libfreetype.dylib /Users/shaunc/Gentoo/usr/lib/libexpat.dylib /Users/shaunc/Gentoo/usr/lib/libpango-1.0.dylib /Users/shaunc/Gentoo/usr/lib/libcairo.dylib /Users/shaunc/Gentoo/usr/lib/libgobject-2.0.dylib /Users/shaunc/Gentoo/usr/lib/libgmodule-2.0.dylib /Users/shaunc/Gentoo/usr/lib/libglib-2.0.dylib /Users/shaunc/Gentoo/usr/lib/libintl.dylib /Users/shaunc/Gentoo/usr/lib/libiconv.dylib -march=prescott -framework Carbon -install_name /Users/shaunc/Gentoo/usr/lib/libglade-2.0.0.dylib -compatibility_version 1 -current_version 1.7 -Wl,-single_module -Wl,-exported_symbols_list,.libs/libglade-2.0-symbols.expsym ld: duplicate symbol _g_bit_nth_lsf in .libs/glade-xml.o and .libs/glade-init.o collect2: ld returned 1 exit status make[2]: *** [libglade-2.0.la] Error 1 make[2]: Leaving directory `/Users/shaunc/Gentoo/var/tmp/portage/gnome-base/libglade-2.6.2/work/libglade-2.6.2/glade' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/Users/shaunc/Gentoo/var/tmp/portage/gnome-base/libglade-2.6.2/work/libglade-2.6.2' make: *** [all] Error 2 * ERROR: gnome-base/libglade-2.6.2 failed: * compile failure * * Call stack: * ebuild.sh: 49: <call src_compile> * environment:2824: <call gnome2_src_compile> * environment:2159: emake || die "compile failure" * * If you need support, post the topmost build error, and the call stack if relevant. * build log: '/Users/shaunc/Gentoo/var/tmp/portage/gnome-base/libglade-2.6.2/temp/build.log' * ebuild environment: '/Users/shaunc/Gentoo/var/tmp/portage/gnome-base/libglade-2.6.2/temp/environment' * S: '/Users/shaunc/Gentoo/var/tmp/portage/gnome-base/libglade-2.6.2/work/libglade-2.6.2'
Created attachment 152715 [details, diff] Patch against glib-2.16.3 forcing inline functions to be declared 'static inline' on OS X. It seem this is actually a bug with glib and the handling of inline functions on OS X. Re-merging glib with the attached patch (against glib-2.16.3) resolved this issue for me such that libglade merged successfully.
Created attachment 152717 [details] Modified ebuild for glib-2.16.3. Modified ebuild (designated -r00.1 - is that the right approach in prefix-portage?) to apply the attached patch.
wow, thanks! Is this known upstream?
Yes, -r00.1 is correct in Prefix. I applied your patch, thanks again!