Opened 17 years ago

Closed 16 years ago

Last modified 15 years ago

#13006 closed defect (worksforme)

glib2: libglade2/atk/libgnome/pango fails to build on Mac OS X 10.5 Leopard: duplicate symbol _g_bit_nth_lsf

Reported by: quuxster@… Owned by: rhwood@…
Priority: Normal Milestone:
Component: ports Version: 1.5.2
Keywords: glib2 libglade2 atk libgnome pango leopard Cc: josh.aas@…, brianjlandau@…, frstan@…, quuxster@…, rhwood@…, afb@…, ryandesign (Ryan Carsten Schmidt), vmcgarry@…, bensonk@…, mike@…, nox@…
Port:

Description (last modified by jmpp@…)

gcc -DHAVE_CONFIG_H -I. -I.. -DG_LOG_DOMAIN=\"libglade\" -I.. -DXTHREADS -I/opt/local/include/libxml2 -I/opt/local/include -I/opt/local/include/atk-1.0 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include/gtk-2.0 -I/opt/local/lib/gtk-2.0/include -I/opt/local/include/cairo -I/opt/local/include/pango-1.0 -I/opt/local/include/freetype2 -I/opt/local/include/libpng12 -I/usr/X11/include -DGLADE_LIBDIR=\"/opt/local/lib\" -DGLADE_PREFIX=\"/opt/local\" -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGNOME_DISABLE_DEPRECATED -I/opt/local/include -O2 -Wall -std=c9x -MT glade-parser.lo -MD -MP -MF .deps/glade-parser.Tpo -c glade-parser.c -o glade-parser.o >/dev/null 2>&1
mv -f .deps/glade-parser.Tpo .deps/glade-parser.Plo
/bin/sh ../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -DG_LOG_DOMAIN=\"libglade\" -I.. -DXTHREADS -I/opt/local/include/libxml2 -I/opt/local/include -I/opt/local/include/atk-1.0 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include/gtk-2.0 -I/opt/local/lib/gtk-2.0/include -I/opt/local/include/cairo -I/opt/local/include/pango-1.0 -I/opt/local/include/freetype2 -I/opt/local/include/libpng12 -I/usr/X11/include   -DGLADE_LIBDIR=\""/opt/local/lib"\" -DGLADE_PREFIX=\""/opt/local"\" -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGNOME_DISABLE_DEPRECATED  -I/opt/local/include  -O2 -Wall -std=c9x -MT glade-gtk.lo -MD -MP -MF .deps/glade-gtk.Tpo -c -o glade-gtk.lo glade-gtk.c
 gcc -DHAVE_CONFIG_H -I. -I.. -DG_LOG_DOMAIN=\"libglade\" -I.. -DXTHREADS -I/opt/local/include/libxml2 -I/opt/local/include -I/opt/local/include/atk-1.0 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include/gtk-2.0 -I/opt/local/lib/gtk-2.0/include -I/opt/local/include/cairo -I/opt/local/include/pango-1.0 -I/opt/local/include/freetype2 -I/opt/local/include/libpng12 -I/usr/X11/include -DGLADE_LIBDIR=\"/opt/local/lib\" -DGLADE_PREFIX=\"/opt/local\" -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGNOME_DISABLE_DEPRECATED -I/opt/local/include -O2 -Wall -std=c9x -MT glade-gtk.lo -MD -MP -MF .deps/glade-gtk.Tpo -c glade-gtk.c  -fno-common -DPIC -o .libs/glade-gtk.o
 gcc -DHAVE_CONFIG_H -I. -I.. -DG_LOG_DOMAIN=\"libglade\" -I.. -DXTHREADS -I/opt/local/include/libxml2 -I/opt/local/include -I/opt/local/include/atk-1.0 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include/gtk-2.0 -I/opt/local/lib/gtk-2.0/include -I/opt/local/include/cairo -I/opt/local/include/pango-1.0 -I/opt/local/include/freetype2 -I/opt/local/include/libpng12 -I/usr/X11/include -DGLADE_LIBDIR=\"/opt/local/lib\" -DGLADE_PREFIX=\"/opt/local\" -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGNOME_DISABLE_DEPRECATED -I/opt/local/include -O2 -Wall -std=c9x -MT glade-gtk.lo -MD -MP -MF .deps/glade-gtk.Tpo -c glade-gtk.c -o glade-gtk.o >/dev/null 2>&1
mv -f .deps/glade-gtk.Tpo .deps/glade-gtk.Plo
/bin/sh ../libtool --tag=CC   --mode=link gcc  -O2 -Wall -std=c9x -version-info 0:7:0 -export-symbols-regex "^[^_].*" -no-undefined -L/opt/local/lib -o libglade-2.0.la -rpath /opt/local/lib glade-init.lo glade-xml.lo glade-parser.lo glade-gtk.lo -L/opt/local/lib -L/usr/X11R6/lib -L/usr/X11/lib -lxml2 -lpthread -lm -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lpango-1.0 -lcairo -lSM -lICE -lgobject-2.0 -lgmodule-2.0 -lfreetype -lz -lfontconfig -lexpat -lpng12 -lXrender -lX11 -lglib-2.0 -lintl -liconv   
generating symbol list for `libglade-2.0.la'
/usr/bin/nm -p  .libs/glade-init.o .libs/glade-xml.o .libs/glade-parser.o .libs/glade-gtk.o  | sed -n -e 's/^.*[        ]\([BCDEGRST][BCDEGRST]*\)[     ][      ]*_\([_A-Za-z][_A-Za-z0-9]*\)$/\1 _\2 \2/p' | /usr/bin/sed 's/.* //' | sort | uniq > .libs/libglade-2.0.exp
/usr/bin/grep -E -e "^[^_].*" ".libs/libglade-2.0.exp" > ".libs/libglade-2.0.expT"
mv -f ".libs/libglade-2.0.expT" ".libs/libglade-2.0.exp"
sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < .libs/libglade-2.0.exp > .libs/libglade-2.0-symbols.expsym
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/opt/local/lib -L/usr/X11R6/lib -L/usr/X11/lib /opt/local/lib/libxml2.dylib /opt/local/lib/libz.dylib -lpthread -lm /opt/local/lib/libgtk-x11-2.0.dylib /opt/local/lib/libgdk-x11-2.0.dylib /opt/local/lib/libatk-1.0.dylib /opt/local/lib/libgdk_pixbuf-2.0.dylib /opt/local/lib/libtiff.dylib /opt/local/lib/libjpeg.dylib /opt/local/lib/libpangocairo-1.0.dylib /usr/X11R6/lib/libSM.dylib /usr/X11R6/lib/libICE.dylib /usr/X11R6/lib/libX11.dylib /usr/X11/lib/libXau.6.0.0.dylib /usr/X11/lib/libXdmcp.6.0.0.dylib /opt/local/lib/libpangoft2-1.0.dylib /opt/local/lib/libpango-1.0.dylib /opt/local/lib/libcairo.dylib /usr/X11/lib/libSM.6.0.0.dylib /usr/X11/lib/libICE.6.3.0.dylib /opt/local/lib/libgobject-2.0.dylib /opt/local/lib/libgmodule-2.0.dylib /opt/local/lib/libfreetype.dylib -lz /opt/local/lib/libfontconfig.dylib /opt/local/lib/libexpat.dylib /opt/local/lib/libpng12.dylib /opt/local/lib/libXrender.dylib /usr/X11/lib/libX11.6.2.0.dylib /opt/local/lib/libglib-2.0.dylib /opt/local/lib/libintl.dylib /opt/local/lib/libiconv.dylib  -install_name  /opt/local/lib/libglade-2.0.0.dylib -Wl,-compatibility_version -Wl,1 -Wl,-current_version -Wl,1.7
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[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Error: Status 1 encountered during processing.

Attachments (2)

glib2-inline.patch (1.4 KB) - added by afb@… 16 years ago.
glib2-inline.patch
glib2-inline.2.patch (1.1 KB) - added by afb@… 16 years ago.
glib2-inline.patch

Download all attachments as: .zip

Change History (35)

comment:1 Changed 17 years ago by afb@…

This is yet another extern inline bug (this time in glib/gutils.h)

comment:2 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: quuxster@… rhwood@… added
Milestone: Port Bugs
Owner: changed from macports-dev@… to rhwood@…
Summary: libglade2 fails to build on leopardlibglade2 fails to build on Mac OS X 10.5 Leopard

Changed 16 years ago by afb@…

Attachment: glib2-inline.patch added

glib2-inline.patch

comment:3 Changed 16 years ago by afb@…

Cc: afb@… ryandesign@… added

Here is a gloriously hacky workaround to the broken inlining in Leopard.

It seems to be working for building libglade2 and xchat2, at least...

comment:4 Changed 16 years ago by rhwood@…

Status: newassigned

Has this been reported upstream or not?

comment:5 Changed 16 years ago by afb@…

Hasn't been reported to Radar (by me), yet.

comment:6 Changed 16 years ago by rhwood@…

Resolution: fixed
Status: assignedclosed

comment:7 Changed 16 years ago by afb@…

Resolution: fixed
Status: closedreopened

The workaround (extern inline -> inline) is apparently not working too great, since you will still get duplicate symbols with other ports. So a better long-term solution is required.

http://bugzilla.gnome.org/show_bug.cgi?id=315437

comment:8 Changed 16 years ago by rhwood@…

Ticket:13094 is a duplicate of this ticket.

comment:9 Changed 16 years ago by rhwood@…

Cc: frstan@… added

#13088 duplicates this ticket.

comment:10 Changed 16 years ago by rhwood@…

Cc: vmcgarry@… added

#13131 duplicates this ticket

comment:11 Changed 16 years ago by afb@…

Keywords: glib2 atk libgnome added
Summary: libglade2 fails to build on Mac OS X 10.5 Leopardglib2: libglade2/atk/libgnome fails to build on Mac OS X 10.5 Leopard

comment:12 Changed 16 years ago by afb@…

Cc: brianjlandau@… added
Keywords: pango added
Priority: NormalHigh
Summary: glib2: libglade2/atk/libgnome fails to build on Mac OS X 10.5 Leopardglib2: libglade2/atk/libgnome/pango fails to build on Mac OS X 10.5 Leopard

#13123 duplicates this ticket

comment:13 Changed 16 years ago by afb@…

Trying "static inline" instead of "inline" (as replacement for "extern inline")...

Changed 16 years ago by afb@…

Attachment: glib2-inline.2.patch added

glib2-inline.patch

comment:14 Changed 16 years ago by rhwood@…

Cc: josh.aas@… added

Can someone with leopard please apply the glib2-inline.patch and test it please?

comment:15 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: bensonk@… added

comment:16 Changed 16 years ago by mike@…

This patch worked for me. I think I did the following steps. In any case, atk now compiles, and furthermore I can now try to reinstall wireshark:

  1. sudo port uninstall glib2
  2. sudo port clean --working glib2
  3. cd /opt/local/var/macports/sources/rsync.macports.org/release/ports/devel/glib2
  4. sudo patch -p0 <~/Downloads/glib2-inline.2.patch
  5. sudo install glib2
  6. sudo install atk

comment:17 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: mike@… added

comment:18 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: reopenedclosed

Ok, let's try it! Committed the new patch in r30717. Hope that does it... Please re-open if it does not.

comment:19 Changed 16 years ago by windexh8er@…

Worked for me. Followed the instructions above minus the manual patching. Looks good.

comment:20 Changed 16 years ago by coreymon77@…

Resolution: fixed
Status: closedreopened

i still get the error, i applied the patch, synced macports, everything and i still get the error

comment:21 Changed 16 years ago by brianjlandau@…

Uninstalled glib2, synced, and reinstalled glib2 and then pango did build without errors. So it works for me.

comment:22 Changed 16 years ago by coreymon77@…

okay, pango is fine now, but now orbit2 gives me errors, and when looking at the ticket for orbit2, it says that its a duplicate to this bug. so now orbit2 wont build

comment:23 Changed 16 years ago by nox@…

#13199 duplicates this ticket.

comment:24 Changed 16 years ago by nox@…

Cc: nox@… added

#13239 duplicates this ticket.

comment:25 Changed 16 years ago by sciamachy@…

I got the same trying to build GIMP - ld: duplicate symbol _g_bit_nth_lsf in .libs/atkcomponent.o and .libs/atkaction.o

collect2: ld returned 1 exit status make[3]: * [libatk-1.0.la] Error 1 make[2]: * [all] Error 2 make[1]: * [all-recursive] Error 1 make: * [all] Error 2

I tried sudo port install atk & that returned the same error.

comment:26 Changed 16 years ago by frstan@…

Have you rebuilt glib2 and all its dependents? sudo port -funR upgrade glib2

comment:27 in reply to:  26 Changed 16 years ago by sciamachy@…

Replying to frstan@bellsouth.net:

Have you rebuilt glib2 and all its dependents? sudo port -funR upgrade glib2

I hadn't, but did that once I read your comment, & then tried again, and got the same error. D'you think there might be any other bits & pieces I need to upgrade as well? I must admit to being fairly ignorant of C/C++ programming & using make & the like. I'm a java programmer, so I'm used to a different toolset I guess.

comment:28 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

Summary: glib2: libglade2/atk/libgnome/pango fails to build on Mac OS X 10.5 Leopardglib2: libglade2/atk/libgnome/pango fails to build on Mac OS X 10.5 Leopard: duplicate symbol _g_bit_nth_lsf

comment:29 Changed 16 years ago by jmpp@…

Description: modified (diff)
Priority: HighNormal

comment:30 Changed 16 years ago by rhwood@…

I can not reproduce this error when building these ports on 10.5.1 PPC with XCode 3.0 and glib2 2.14.5. Are all people reporting problems using Intel?

comment:31 Changed 16 years ago by nox@…

Hasn't this been fixed?

comment:32 Changed 16 years ago by rhwood@…

Resolution: worksforme
Status: reopenedclosed

I don't know. I have never been able to create the problem condition. I'm closing it since no one replied in January.

comment:33 Changed 15 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

Note: See TracTickets for help on using tickets.