Multiple definitions of symbols fail compilation on OS X
Hi all,
my third email of the day ;-) compilation on OS X with gcc 4.0 fails. I think it is due to some multiple definitions of symbols. I have searched for fixes to this. It seems to be a very common problem but I did not find any clear answer. Maybe it is so simple that people on mailing lists just do not bother answering such questions. One common answer was to use gcc to link and not ld but I don't know to which extent it means something.
jiho@...993...:inkscape$ ./makeosx.sh make all-recursive Making all in src /bin/sh ../libtool --mode=link g++ -Wall -W -Wpointer-arith -Wcast- align -Wsign-compare -Woverloaded-virtual -Wswitch -Wno-unused- parameter -O3 -Wall -L/sw/lib -o inkscape --export-dynamic main.o libinkpre.a application/libinkapp.a ui/dialog/libuidialog.a dialogs/ libspdialogs.a jabber_whiteboard/libjabber_whiteboard.a trace/ libtrace.a svg/libspsvg.a widgets/libspwidgets.a display/ libspdisplay.a helper/libspchelp.a libcroco/libcroco.a libnrtype/ libnrtype.a libnr/libnr.a libavoid/libavoid.a livarot/libvarot.a ui/ view/libuiview.a ui/libui.a ui/widget/libuiwidget.a graphlayout/ libgraphlayout.a removeoverlap/libremoveoverlap.a extension/ libextension.a extension/implementation/libimplementation.a extension/ internal/libinternal.a extension/script/libscript.a dom/libdom.a xml/ libspxml.a util/libinkutil.a io/libio.a inkjar/libinkjar.a libinkpost.a debug/libinkdebug.a -L/sw/lib -L/usr/X11R6/lib - lgtkmm-2.4 -lgdkmm-2.4 -latkmm-1.6 -lpangomm-1.4 -lglibmm-2.4 -lgtk- x11-2.0 -lgdk-x11-2.0 -lXrandr -lXinerama -lXext -lXcursor -latk-1.0 - lgdk_pixbuf-2.0 -lpangoxft-1.0 -lXft -lXrender -lpangox-1.0 -lX11 - lpangoft2-1.0 -lfontconfig -lfreetype -lpango-1.0 -lgobject-2.0 - lgmodule-2.0 -lxslt -lxml2 -lpthread -lz -lm -lsigc-2.0 -lgthread-2.0 -lglib-2.0 -lintl -liconv -lpng -lz -lpopt -L/sw/lib -lgnomevfs-2 - lbonobo-2 -lgconf-2 -lbonobo-activation -lORBit-2 -lm -lgmodule-2.0 - lgthread-2.0 -lglib-2.0 -lintl -liconv -L/usr/X11R6/lib -lXft - lfreetype -lXrender -lfontconfig -L/sw/lib -L/usr/X11R6/lib - lpangoft2-1.0 -lfontconfig -lfreetype -lpango-1.0 -lm -lgobject-2.0 - lgmodule-2.0 -lglib-2.0 -lintl -liconv -L/usr/X11R6/lib - lfreetype -L/usr/local/lib /System/Library/Perl/5.8.6/darwin-thread- multi-2level/auto/DynaLoader/DynaLoader.a -L/System/Library/Perl/ 5.8.6/darwin-thread-multi-2level/CORE -lperl -ldl -lm -lc -lgc - llcms g++ -Wall -W -Wpointer-arith -Wcast-align -Wsign-compare -Woverloaded- virtual -Wswitch -Wno-unused-parameter -O3 -Wall -o inkscape --export- dynamic main.o -Wl,-bind_at_load -L/sw/lib libinkpre.a application/ libinkapp.a ui/dialog/libuidialog.a dialogs/libspdialogs.a jabber_whiteboard/libjabber_whiteboard.a trace/libtrace.a svg/ libspsvg.a widgets/libspwidgets.a display/libspdisplay.a helper/ libspchelp.a libcroco/libcroco.a libnrtype/libnrtype.a libnr/libnr.a libavoid/libavoid.a livarot/libvarot.a ui/view/libuiview.a ui/libui.a ui/widget/libuiwidget.a graphlayout/libgraphlayout.a removeoverlap/ libremoveoverlap.a extension/libextension.a extension/implementation/ libimplementation.a extension/internal/libinternal.a extension/script/ libscript.a dom/libdom.a xml/libspxml.a util/libinkutil.a io/libio.a inkjar/libinkjar.a libinkpost.a debug/libinkdebug.a -L/usr/X11R6/lib / sw/lib/libgtkmm-2.4.dylib /sw/lib/libgdkmm-2.4.dylib /sw/lib/ libatkmm-1.6.dylib /sw/lib/libpangomm-1.4.dylib /sw/lib/ libglibmm-2.4.dylib /sw/lib/libgtk-x11-2.0.dylib /sw/lib/libgdk- x11-2.0.dylib -lXrandr -lXinerama -lXext -lXcursor /sw/lib/ libatk-1.0.dylib /sw/lib/libgdk_pixbuf-2.0.dylib /sw/lib/ libpangoxft-1.0.dylib /sw/lib/libpangox-1.0.dylib -lX11 /sw/lib/ libxslt.dylib /sw/lib/libsigc-2.0.dylib -lpng /sw/lib/ libgnomevfs-2.dylib /sw/lib/libxml2.dylib -lz /sw/lib/ libbonobo-2.dylib /sw/lib/libgconf-2.dylib /sw/lib/libbonobo- activation.dylib /sw/lib/libORBitCosNaming-2.dylib /sw/lib/ libORBit-2.dylib /sw/lib/libpopt.dylib -lresolv /sw/lib/ libgthread-2.0.dylib -lXft -lXrender /sw/lib/libpangoft2-1.0.dylib - lfontconfig /sw/lib/libpango-1.0.dylib /sw/lib/libgobject-2.0.dylib / sw/lib/libgmodule-2.0.dylib /sw/lib/libglib-2.0.dylib /sw/lib/ libintl.dylib /sw/lib/libiconv.dylib -lfreetype -L/usr/local/lib / System/Library/Perl/5.8.6/darwin-thread-multi-2level/auto/DynaLoader/ DynaLoader.a -L/System/Library/Perl/5.8.6/darwin-thread-multi-2level/ CORE -lperl -ldl -lc /sw/lib/libgc.dylib -lpthread /sw/lib/ liblcms.dylib -lm /usr/bin/ld: warning multiple definitions of symbol _locale_charset /sw/lib/libintl.dylib(localcharset.o) definition of _locale_charset /sw/lib/libiconv.dylib(localcharset.o) definition of _locale_charset /usr/bin/ld: Undefined symbols: typeinfo for Atk::Implementor typeinfo for Gtk::Bin typeinfo for Gtk::Dialog typeinfo for Gtk::Object typeinfo for Gtk::Widget typeinfo for Gtk::Window typeinfo for Gtk::Container typeinfo for Glib::ObjectBase typeinfo for Glib::Object typeinfo for Glib::Interface typeinfo for Gtk::CellLayout typeinfo for Gtk::TreeModelColumnRecord typeinfo for Gtk::ComboBox typeinfo for Gtk::Box typeinfo for Gtk::VBox typeinfo for Gtk::Table typeinfo for Gtk::CheckButton typeinfo for Gtk::ToggleButton typeinfo for Gtk::HBox typeinfo for Gtk::Button typeinfo for Gtk::FileChooser typeinfo for Gtk::FileChooserDialog typeinfo for Gtk::ScrolledWindow typeinfo for Gtk::RadioButton typeinfo for Gtk::Item typeinfo for Gtk::MenuItem typeinfo for Gtk::SpinButton typeinfo for Gtk::CellEditable typeinfo for Gtk::Entry typeinfo for Gtk::Editable typeinfo for Gtk::EventBox typeinfo for Gtk::HandleBox typeinfo for Gtk::Adjustment collect2: ld returned 1 exit status make[2]: *** [inkscape] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2
Thank you in advance for any comment. I hope I'll be able to compile inkscape someday, the development builds for OS X are pretty old now ;-)
JiHO --- Windows, c'est un peu comme le beaujolais nouveau : a chaque nouvelle cuvee on sait que ce sera degueulasse, mais on en prend quand meme par masochisme. --- http://jo.irisson.free.fr/
On Tue, Apr 18, 2006 at 03:36:27PM +0200, jiho wrote:
Hi all,
my third email of the day ;-) compilation on OS X with gcc 4.0 fails. I think it is due to some multiple definitions of symbols. I have searched for fixes to this. It seems to be a very common problem but I did not find any clear answer. Maybe it is so simple that people on mailing lists just do not bother answering such questions. One common answer was to use gcc to link and not ld but I don't know to which extent it means something.
I don't think it's a simple problem; linker errors are notorious for being a bit hard to sort out.
My guess is that the issue you've run into are a peculiarity of either the linker on OSX, or an issue with having more than one version of required libraries getting linked in. I've not seen '.dylib' before, so you might start by finding out what that is. Usually, it doesn't hurt to link against the same library multiple times, but maybe on OSX with your setup, it doesn't like that?
You're also getting an 'undefined symbols' error, but it's not clear what symbols are undefined. A common cause for that is that the link order of libraries isn't quite right, or that you're linking against a newer or older version of the lib, which lacks the required symbols.
Anyway, other than these vague hints, I'm afraid I don't know much more. I usually end up just fiddling around with the Makefile to isolate which lib is causing the problem, shuffle the order of that lib around, or whatever, until the issue goes away...
Bryce
jiho@...993...:inkscape$ ./makeosx.sh make all-recursive Making all in src /bin/sh ../libtool --mode=link g++ -Wall -W -Wpointer-arith -Wcast- align -Wsign-compare -Woverloaded-virtual -Wswitch -Wno-unused- parameter -O3 -Wall -L/sw/lib -o inkscape --export-dynamic main.o libinkpre.a application/libinkapp.a ui/dialog/libuidialog.a dialogs/ libspdialogs.a jabber_whiteboard/libjabber_whiteboard.a trace/ libtrace.a svg/libspsvg.a widgets/libspwidgets.a display/ libspdisplay.a helper/libspchelp.a libcroco/libcroco.a libnrtype/ libnrtype.a libnr/libnr.a libavoid/libavoid.a livarot/libvarot.a ui/ view/libuiview.a ui/libui.a ui/widget/libuiwidget.a graphlayout/ libgraphlayout.a removeoverlap/libremoveoverlap.a extension/ libextension.a extension/implementation/libimplementation.a extension/ internal/libinternal.a extension/script/libscript.a dom/libdom.a xml/ libspxml.a util/libinkutil.a io/libio.a inkjar/libinkjar.a libinkpost.a debug/libinkdebug.a -L/sw/lib -L/usr/X11R6/lib - lgtkmm-2.4 -lgdkmm-2.4 -latkmm-1.6 -lpangomm-1.4 -lglibmm-2.4 -lgtk- x11-2.0 -lgdk-x11-2.0 -lXrandr -lXinerama -lXext -lXcursor -latk-1.0 - lgdk_pixbuf-2.0 -lpangoxft-1.0 -lXft -lXrender -lpangox-1.0 -lX11 - lpangoft2-1.0 -lfontconfig -lfreetype -lpango-1.0 -lgobject-2.0 - lgmodule-2.0 -lxslt -lxml2 -lpthread -lz -lm -lsigc-2.0 -lgthread-2.0 -lglib-2.0 -lintl -liconv -lpng -lz -lpopt -L/sw/lib -lgnomevfs-2 - lbonobo-2 -lgconf-2 -lbonobo-activation -lORBit-2 -lm -lgmodule-2.0 - lgthread-2.0 -lglib-2.0 -lintl -liconv -L/usr/X11R6/lib -lXft - lfreetype -lXrender -lfontconfig -L/sw/lib -L/usr/X11R6/lib - lpangoft2-1.0 -lfontconfig -lfreetype -lpango-1.0 -lm -lgobject-2.0 - lgmodule-2.0 -lglib-2.0 -lintl -liconv -L/usr/X11R6/lib - lfreetype -L/usr/local/lib /System/Library/Perl/5.8.6/darwin-thread- multi-2level/auto/DynaLoader/DynaLoader.a -L/System/Library/Perl/ 5.8.6/darwin-thread-multi-2level/CORE -lperl -ldl -lm -lc -lgc - llcms g++ -Wall -W -Wpointer-arith -Wcast-align -Wsign-compare -Woverloaded- virtual -Wswitch -Wno-unused-parameter -O3 -Wall -o inkscape --export- dynamic main.o -Wl,-bind_at_load -L/sw/lib libinkpre.a application/ libinkapp.a ui/dialog/libuidialog.a dialogs/libspdialogs.a jabber_whiteboard/libjabber_whiteboard.a trace/libtrace.a svg/ libspsvg.a widgets/libspwidgets.a display/libspdisplay.a helper/ libspchelp.a libcroco/libcroco.a libnrtype/libnrtype.a libnr/libnr.a libavoid/libavoid.a livarot/libvarot.a ui/view/libuiview.a ui/libui.a ui/widget/libuiwidget.a graphlayout/libgraphlayout.a removeoverlap/ libremoveoverlap.a extension/libextension.a extension/implementation/ libimplementation.a extension/internal/libinternal.a extension/script/ libscript.a dom/libdom.a xml/libspxml.a util/libinkutil.a io/libio.a inkjar/libinkjar.a libinkpost.a debug/libinkdebug.a -L/usr/X11R6/lib / sw/lib/libgtkmm-2.4.dylib /sw/lib/libgdkmm-2.4.dylib /sw/lib/ libatkmm-1.6.dylib /sw/lib/libpangomm-1.4.dylib /sw/lib/ libglibmm-2.4.dylib /sw/lib/libgtk-x11-2.0.dylib /sw/lib/libgdk- x11-2.0.dylib -lXrandr -lXinerama -lXext -lXcursor /sw/lib/ libatk-1.0.dylib /sw/lib/libgdk_pixbuf-2.0.dylib /sw/lib/ libpangoxft-1.0.dylib /sw/lib/libpangox-1.0.dylib -lX11 /sw/lib/ libxslt.dylib /sw/lib/libsigc-2.0.dylib -lpng /sw/lib/ libgnomevfs-2.dylib /sw/lib/libxml2.dylib -lz /sw/lib/ libbonobo-2.dylib /sw/lib/libgconf-2.dylib /sw/lib/libbonobo- activation.dylib /sw/lib/libORBitCosNaming-2.dylib /sw/lib/ libORBit-2.dylib /sw/lib/libpopt.dylib -lresolv /sw/lib/ libgthread-2.0.dylib -lXft -lXrender /sw/lib/libpangoft2-1.0.dylib - lfontconfig /sw/lib/libpango-1.0.dylib /sw/lib/libgobject-2.0.dylib / sw/lib/libgmodule-2.0.dylib /sw/lib/libglib-2.0.dylib /sw/lib/ libintl.dylib /sw/lib/libiconv.dylib -lfreetype -L/usr/local/lib / System/Library/Perl/5.8.6/darwin-thread-multi-2level/auto/DynaLoader/ DynaLoader.a -L/System/Library/Perl/5.8.6/darwin-thread-multi-2level/ CORE -lperl -ldl -lc /sw/lib/libgc.dylib -lpthread /sw/lib/ liblcms.dylib -lm /usr/bin/ld: warning multiple definitions of symbol _locale_charset /sw/lib/libintl.dylib(localcharset.o) definition of _locale_charset /sw/lib/libiconv.dylib(localcharset.o) definition of _locale_charset /usr/bin/ld: Undefined symbols: typeinfo for Atk::Implementor typeinfo for Gtk::Bin typeinfo for Gtk::Dialog typeinfo for Gtk::Object typeinfo for Gtk::Widget typeinfo for Gtk::Window typeinfo for Gtk::Container typeinfo for Glib::ObjectBase typeinfo for Glib::Object typeinfo for Glib::Interface typeinfo for Gtk::CellLayout typeinfo for Gtk::TreeModelColumnRecord typeinfo for Gtk::ComboBox typeinfo for Gtk::Box typeinfo for Gtk::VBox typeinfo for Gtk::Table typeinfo for Gtk::CheckButton typeinfo for Gtk::ToggleButton typeinfo for Gtk::HBox typeinfo for Gtk::Button typeinfo for Gtk::FileChooser typeinfo for Gtk::FileChooserDialog typeinfo for Gtk::ScrolledWindow typeinfo for Gtk::RadioButton typeinfo for Gtk::Item typeinfo for Gtk::MenuItem typeinfo for Gtk::SpinButton typeinfo for Gtk::CellEditable typeinfo for Gtk::Entry typeinfo for Gtk::Editable typeinfo for Gtk::EventBox typeinfo for Gtk::HandleBox typeinfo for Gtk::Adjustment collect2: ld returned 1 exit status make[2]: *** [inkscape] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2
Thank you in advance for any comment. I hope I'll be able to compile inkscape someday, the development builds for OS X are pretty old now ;-)
JiHO
Windows, c'est un peu comme le beaujolais nouveau : a chaque nouvelle cuvee on sait que ce sera degueulasse, mais on en prend quand meme par masochisme.
This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&da... _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
On 18 Apr 2006, at 22:46 , Bryce Harrington wrote:
On Tue, Apr 18, 2006 at 03:36:27PM +0200, jiho wrote:
my third email of the day ;-) compilation on OS X with gcc 4.0 fails. I think it is due to some multiple definitions of symbols. I have searched for fixes to this. It seems to be a very common problem but I did not find any clear answer. Maybe it is so simple that people on mailing lists just do not bother answering such questions. One common answer was to use gcc to link and not ld but I don't know to which extent it means something.
I don't think it's a simple problem; linker errors are notorious for being a bit hard to sort out.
My guess is that the issue you've run into are a peculiarity of either the linker on OSX, or an issue with having more than one version of required libraries getting linked in. I've not seen '.dylib' before, so you might start by finding out what that is. Usually, it doesn't hurt to link against the same library multiple times, but maybe on OSX with your setup, it doesn't like that?
.dylib is the .so of OS X. I don't know why they changed this but... well... it's not exactly unix after all. It seems that the multiple links warnings are something new in the last versions of os X developer tools. basically, the new ld does not like them. and, as I mentioned, the "cure" advised is to use gcc on the command line to link, and not ld. I thought gcc as a linker actually called ld but it seems to be wrong.
You're also getting an 'undefined symbols' error, but it's not clear what symbols are undefined. A common cause for that is that the link order of libraries isn't quite right, or that you're linking against a newer or older version of the lib, which lacks the required symbols.
I thought that the undefined symbols came from the fact that, as two libs were present with the same symbol, none of them was used and hence all other symbols of the lib were unknown. could it be that? anyway, I'll check the versions of my libraries (I used some binaries and them some newer source versions at some point so it might be a good guess).
Anyway, other than these vague hints, I'm afraid I don't know much more. I usually end up just fiddling around with the Makefile to isolate which lib is causing the problem, shuffle the order of that lib around, or whatever, until the issue goes away...
thank you for the hints and for taking the time to answer this. I'll try what I can.
cheers
jiho@...993...:inkscape$ ./makeosx.sh make all-recursive Making all in src /bin/sh ../libtool --mode=link g++ -Wall -W -Wpointer-arith -Wcast- align -Wsign-compare -Woverloaded-virtual -Wswitch -Wno-unused- parameter -O3 -Wall -L/sw/lib -o inkscape --export-dynamic main.o libinkpre.a application/libinkapp.a ui/dialog/libuidialog.a dialogs/ libspdialogs.a jabber_whiteboard/libjabber_whiteboard.a trace/ libtrace.a svg/libspsvg.a widgets/libspwidgets.a display/ libspdisplay.a helper/libspchelp.a libcroco/libcroco.a libnrtype/ libnrtype.a libnr/libnr.a libavoid/libavoid.a livarot/libvarot.a ui/ view/libuiview.a ui/libui.a ui/widget/libuiwidget.a graphlayout/ libgraphlayout.a removeoverlap/libremoveoverlap.a extension/ libextension.a extension/implementation/libimplementation.a extension/ internal/libinternal.a extension/script/libscript.a dom/libdom.a xml/ libspxml.a util/libinkutil.a io/libio.a inkjar/libinkjar.a libinkpost.a debug/libinkdebug.a -L/sw/lib -L/usr/X11R6/lib - lgtkmm-2.4 -lgdkmm-2.4 -latkmm-1.6 -lpangomm-1.4 -lglibmm-2.4 -lgtk- x11-2.0 -lgdk-x11-2.0 -lXrandr -lXinerama -lXext -lXcursor - latk-1.0 - lgdk_pixbuf-2.0 -lpangoxft-1.0 -lXft -lXrender -lpangox-1.0 -lX11 - lpangoft2-1.0 -lfontconfig -lfreetype -lpango-1.0 -lgobject-2.0 - lgmodule-2.0 -lxslt -lxml2 -lpthread -lz -lm -lsigc-2.0 -lgthread-2.0 -lglib-2.0 -lintl -liconv -lpng -lz -lpopt -L/sw/lib - lgnomevfs-2 - lbonobo-2 -lgconf-2 -lbonobo-activation -lORBit-2 -lm -lgmodule-2.0 - lgthread-2.0 -lglib-2.0 -lintl -liconv -L/usr/X11R6/lib -lXft - lfreetype -lXrender -lfontconfig -L/sw/lib -L/usr/X11R6/lib - lpangoft2-1.0 -lfontconfig -lfreetype -lpango-1.0 -lm -lgobject-2.0 - lgmodule-2.0 -lglib-2.0 -lintl -liconv -L/usr/X11R6/lib - lfreetype -L/usr/local/lib /System/Library/Perl/5.8.6/darwin- thread- multi-2level/auto/DynaLoader/DynaLoader.a -L/System/Library/Perl/ 5.8.6/darwin-thread-multi-2level/CORE -lperl -ldl -lm -lc -lgc - llcms g++ -Wall -W -Wpointer-arith -Wcast-align -Wsign-compare - Woverloaded- virtual -Wswitch -Wno-unused-parameter -O3 -Wall -o inkscape -- export- dynamic main.o -Wl,-bind_at_load -L/sw/lib libinkpre.a application/ libinkapp.a ui/dialog/libuidialog.a dialogs/libspdialogs.a jabber_whiteboard/libjabber_whiteboard.a trace/libtrace.a svg/ libspsvg.a widgets/libspwidgets.a display/libspdisplay.a helper/ libspchelp.a libcroco/libcroco.a libnrtype/libnrtype.a libnr/libnr.a libavoid/libavoid.a livarot/libvarot.a ui/view/libuiview.a ui/libui.a ui/widget/libuiwidget.a graphlayout/libgraphlayout.a removeoverlap/ libremoveoverlap.a extension/libextension.a extension/implementation/ libimplementation.a extension/internal/libinternal.a extension/ script/ libscript.a dom/libdom.a xml/libspxml.a util/libinkutil.a io/libio.a inkjar/libinkjar.a libinkpost.a debug/libinkdebug.a -L/usr/X11R6/ lib / sw/lib/libgtkmm-2.4.dylib /sw/lib/libgdkmm-2.4.dylib /sw/lib/ libatkmm-1.6.dylib /sw/lib/libpangomm-1.4.dylib /sw/lib/ libglibmm-2.4.dylib /sw/lib/libgtk-x11-2.0.dylib /sw/lib/libgdk- x11-2.0.dylib -lXrandr -lXinerama -lXext -lXcursor /sw/lib/ libatk-1.0.dylib /sw/lib/libgdk_pixbuf-2.0.dylib /sw/lib/ libpangoxft-1.0.dylib /sw/lib/libpangox-1.0.dylib -lX11 /sw/lib/ libxslt.dylib /sw/lib/libsigc-2.0.dylib -lpng /sw/lib/ libgnomevfs-2.dylib /sw/lib/libxml2.dylib -lz /sw/lib/ libbonobo-2.dylib /sw/lib/libgconf-2.dylib /sw/lib/libbonobo- activation.dylib /sw/lib/libORBitCosNaming-2.dylib /sw/lib/ libORBit-2.dylib /sw/lib/libpopt.dylib -lresolv /sw/lib/ libgthread-2.0.dylib -lXft -lXrender /sw/lib/libpangoft2-1.0.dylib - lfontconfig /sw/lib/libpango-1.0.dylib /sw/lib/libgobject-2.0.dylib / sw/lib/libgmodule-2.0.dylib /sw/lib/libglib-2.0.dylib /sw/lib/ libintl.dylib /sw/lib/libiconv.dylib -lfreetype -L/usr/local/lib / System/Library/Perl/5.8.6/darwin-thread-multi-2level/auto/DynaLoader/ DynaLoader.a -L/System/Library/Perl/5.8.6/darwin-thread-multi-2level/ CORE -lperl -ldl -lc /sw/lib/libgc.dylib -lpthread /sw/lib/ liblcms.dylib -lm /usr/bin/ld: warning multiple definitions of symbol _locale_charset /sw/lib/libintl.dylib(localcharset.o) definition of _locale_charset /sw/lib/libiconv.dylib(localcharset.o) definition of _locale_charset /usr/bin/ld: Undefined symbols: typeinfo for Atk::Implementor typeinfo for Gtk::Bin typeinfo for Gtk::Dialog typeinfo for Gtk::Object typeinfo for Gtk::Widget typeinfo for Gtk::Window typeinfo for Gtk::Container typeinfo for Glib::ObjectBase typeinfo for Glib::Object typeinfo for Glib::Interface typeinfo for Gtk::CellLayout typeinfo for Gtk::TreeModelColumnRecord typeinfo for Gtk::ComboBox typeinfo for Gtk::Box typeinfo for Gtk::VBox typeinfo for Gtk::Table typeinfo for Gtk::CheckButton typeinfo for Gtk::ToggleButton typeinfo for Gtk::HBox typeinfo for Gtk::Button typeinfo for Gtk::FileChooser typeinfo for Gtk::FileChooserDialog typeinfo for Gtk::ScrolledWindow typeinfo for Gtk::RadioButton typeinfo for Gtk::Item typeinfo for Gtk::MenuItem typeinfo for Gtk::SpinButton typeinfo for Gtk::CellEditable typeinfo for Gtk::Entry typeinfo for Gtk::Editable typeinfo for Gtk::EventBox typeinfo for Gtk::HandleBox typeinfo for Gtk::Adjustment collect2: ld returned 1 exit status make[2]: *** [inkscape] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2
Thank you in advance for any comment. I hope I'll be able to compile inkscape someday, the development builds for OS X are pretty old now ;-)
JiHO
Windows, c'est un peu comme le beaujolais nouveau : a chaque nouvelle cuvee on sait que ce sera degueulasse, mais on en prend quand meme par masochisme.
This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel? cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
JiHO --- Windows, c'est un peu comme le beaujolais nouveau : a chaque nouvelle cuvee on sait que ce sera degueulasse, mais on en prend quand meme par masochisme. --- http://jo.irisson.free.fr/
On Wed, Apr 19, 2006 at 02:50:18PM +0200, jiho wrote:
You're also getting an 'undefined symbols' error, but it's not clear what symbols are undefined. A common cause for that is that the link order of libraries isn't quite right, or that you're linking against a newer or older version of the lib, which lacks the required symbols.
I thought that the undefined symbols came from the fact that, as two libs were present with the same symbol, none of them was used and hence all other symbols of the lib were unknown. could it be that?
Yeah that could be. I don't think I've seen that with gcc, but if the ld is something non-standard, this behavior is certainly possible.
Bryce
On Tue, 18 Apr 2006, jiho wrote:
my third email of the day ;-) compilation on OS X with gcc 4.0 fails. I think it is due to some multiple definitions of symbols. I have searched for fixes to this. It seems to be a very common problem but I did not find any clear answer.
I've just built from scratch with gcc-4.0 four workspaces of Inkscape on OSX with a fresh fink (10.4 tree, all built with gcc-4.0) and they all built fine and run perfectly.
Problems like the one you describe are often due to one of the libraries being built with an earlier version of gcc. Are you sure GTK was built with gcc-4.0.
The only other thing that may be different is that everything on my machines was built with the latest version of Apple gcc from Xcode 2.2.1:
(GCC) 4.0.1 (Apple Computer, Inc. build 5250)
Earlier versions of Xcode have a gcc 4.0.0, which may also be part of the cause.
Cheers, Michael
On 21/04/06, Michael Wybrow <mjwybrow@...1047...> wrote:
On Tue, 18 Apr 2006, jiho wrote:
my third email of the day ;-) compilation on OS X with gcc 4.0 fails. I think it is due to some multiple definitions of symbols. I have searched for fixes to this. It seems to be a very common problem but I did not find any clear answer.
jiho, your work on Inkscape (which is probably greater than mine) is very much appreciated. If you can give a link to this "very common problem", I will endeavour to attach a clear answer.
Problems like the one you describe are often due to one of the libraries being built with an earlier version of gcc. Are you sure GTK was built with gcc-4.0.
Just to second that comment. The likely explanation is that fink was compiled with gcc-3.n and you have been using gcc-4. There was an ABI change in GCC at that major version upgrade. It is to be hoped that the fink project will switch to gcc-4 (and I thought that this might have happened), until then, it is easiest to use gcc-3.n, and there is a simple way of doing this: Try the command:
sudo gcc_select
which should give a pointer as to how to switch between the compilers available on Tiger.
Ben
On 21/04/06, Ben Fowler <ben.the.mole@...400...> wrote:
On 21/04/06, Michael Wybrow <mjwybrow@...1047...> wrote:
On Tue, 18 Apr 2006, jiho wrote:
my third email of the day ;-) compilation on OS X with gcc 4.0 fails. I think it is due to some multiple definitions of symbols. I have searched for fixes to this. It seems to be a very common problem but I did not find any clear answer.
jiho, your work on Inkscape (which is probably greater than mine) is very much appreciated. If you can give a link to this "very common problem", I will endeavour to attach a clear answer.
See http://permalink.gmane.org/gmane.os.apple.fink.gnome/1152 .
Ben
On 21 Apr 2006, at 10:59 , Ben Fowler wrote:
On 21/04/06, Ben Fowler <ben.the.mole@...400...> wrote:
On 21/04/06, Michael Wybrow <mjwybrow@...1047...> wrote:
On Tue, 18 Apr 2006, jiho wrote:
my third email of the day ;-) compilation on OS X with gcc 4.0 fails. I think it is due to some multiple definitions of symbols. I have searched for fixes to this. It seems to be a very common problem but I did not find any clear answer.
jiho, your work on Inkscape (which is probably greater than mine) is very much appreciated. If you can give a link to this "very common problem", I will endeavour to attach a clear answer.
See http://permalink.gmane.org/gmane.os.apple.fink.gnome/1152 .
Thanks a lot! I guess my link to this "very common problem" is just a google search with the error message in it (like: `"os x" multiple definitions ld` which yields 126000 hits on very various subjects). I ended most of the time on forum/mailing list messages with no answer. On the very few occasions there were some hints about using gcc instead of ld. It seems I haven't searched hard enough, so thanks again for the pointer.
What surprises me now it that my fink packages were supposed to be build with gcc 4: I remember having to choose gcc versions when I first installed fink on 10.4 and chose gcc 4. but from fink's website: "The compiler for the 10.4-transitional distribution is complicated: g ++-3.3 is being used along with gcc-4.0." So in fact I this is indeed a compiler version problem, because things are "complicated" in fink 10.4-transitional tree, which I use. I'll wait for some feed back from Michael because it seems that the new non-transitional tree for 10.4 is up now (thought I cannot see any announcement on Fink's website). I'll just reinstall fink, do a fresh svn checkout, update the wiki page with some clues on how to determine which version of gcc is used in fink and stop bothering you all with this.
Thanks again everybody for the various tips.
JiHO --- Windows, c'est un peu comme le beaujolais nouveau : a chaque nouvelle cuvee on sait que ce sera degueulasse, mais on en prend quand meme par masochisme. --- http://jo.irisson.free.fr/
On 21/04/06, jiho <jo.irisson@...400...> wrote:
On 21 Apr 2006, at 10:59 , Ben Fowler wrote:
[ snip ]
What surprises me now it that my fink packages were supposed to be build with gcc 4: ... So in fact I this is indeed a compiler version problem, ... ... it seems that the new non-transitional tree for 10.4 is up now (thought I cannot see any announcement on Fink's website).
These are very sound points. It is possible that the fink project (which may be rather undermanned) is concentrating on a switch to Mac Intel and the website may be out of date.
I'll just reinstall fink, do a fresh svn checkout, update the wiki page with some clues on how to determine which version of gcc is used in fink ...
That should do the trick. It seems that Inkscape devs have been amongst the most affected, I think because it is the combination of compiling our own code and linking to fink's gnome libraries. (Most people are linking other fink packages, and only have to be self-consistent). It is a pity that we don't seem to have anyone who is on the fink team also on this list as it would seem to me that a degree of cross pollination would be beneficial here.
I am far from certain, but I think that if you do have a complete re-install of fink, using the final 10.4 tree then you will be able to use gcc-4 (but maybe only fink's gcc). I am not compiling inkscape as often as I would like, but I mainly use Panther.
Do we want a Universal Binary for 0.44? My guess is that we do.
Ben
participants (4)
-
Ben Fowler
-
Bryce Harrington
-
jiho
-
Michael Wybrow