I had a strange problem last night where I couldn't build some code I was working on. The program (gpsim) depends on the Gtk stack and the errors I got seemed to refer to a nonexistant libtool .la file:
libtool: link: ar cru .libs/libgpsimgui.a gui_break.o gui_callbacks.o gui_dialog.o gui_init.o gui_main.o gui_menu.o gui_processor.o gui_regwin.o gui_src.o gui_src_asm.o gui_src_opcode.o gui_statusbar.o gui_symbols.o gui_watch.o gui_breadboard.o gui_stack.o gui_trace.o gui_profile.o gui_stopwatch.o gui_object.o gui_scope.o settings_exdbm.o gui_hextable.o preferences.o gui_marshal.o
libtool: link: ranlib .libs/libgpsimgui.a
/bin/sed: can't read /usr/lib/libgio-2.0.la: No such file or directory
libtool: link: `/usr/lib/libgio-2.0.la' is not a valid libtool archive
Now, I'm running an up-to-date version of Debian unstable and I couldn't really believe that a problem that stopped people linking things depending on glib would survive very long. The solution came when I realised that references to /path/to/foo.la come from other .la files. Ahah! So, after some thought, I tried a grep command:
$ locate '*.la' | xargs grep libgio-2.0.la | grep '^/opt' | cut -d : -f 1 /opt/gnome/lib/gtk-2.0/modules/libgtkparasite.la /opt/gnome/lib/libgpsim.la /opt/gnome/lib/libgpsimcli.la /opt/gnome/lib/libgpsimgui.la /opt/gnome/lib/libgpsim_ds1307.la /opt/gnome/lib/libgpsim_dspic.la /opt/gnome/lib/libgpsim_graphicLCD.la /opt/gnome/lib/libgpsim_lcd.la /opt/gnome/lib/libgpsim_modules.la /opt/gnome/lib/libgtkextra-x11-2.0.la
Ahah! The culprit was the last line: gpsim still links against the hideously obsolete libgtkextra and I'd forgotten to rebuild my local copy when upgrading my glib package to one that doesn't ship libgio-2.0.la. Editing the libgtkextra .la file might have worked but I just rebuilt the lot to make sure it worked. Sorted!
No comments:
Post a Comment