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/