GNOME Bugzilla – Bug 623952
.la files cause linking against wrong glib
Last modified: 2011-03-25 19:04:45 UTC
When I tried rebuilding GNOME Shell (jhbuild build -fac), JHBuild suddenly errored out on me, on Ubuntu 10.10 Alpha 2. Here is the output of jhbuild's execution of make just before the error: /home/kenny_strawn/gnome-shell/install/lib/libgtk-x11-3.0.so: undefined reference to `g_variant_new_bytestring_array' /home/kenny_strawn/gnome-shell/install/lib/libgio-2.0.so: undefined reference to `g_variant_new_bytestring' /home/kenny_strawn/gnome-shell/install/lib/libgio-2.0.so: undefined reference to `g_variant_get_bytestring' This obviously indicates a syntax error in GNOME Shell's code that needs to be fixed.
Can I also add that this is failing since yesterday (8/July) on Ubuntu 9.10 and 10.04 also, with the same crash during the build process. http://pastebin.com/uhrsXFgi
(In reply to comment #0) > This obviously indicates a syntax error in GNOME Shell's code that needs to be > fixed. Unfortunately this is not true - those functions are (1) part of the stack built by jhbuild (glib to be exact) (2) not used directly in gnome-shell The error has been reported by several users on IRC, all of them using Ubuntu. I have to admit that it's still a complete mystery to me ...
From the IRC channel, I just built gnome-shell for the first time in 2 days (woo) remove all .la files from /usr/lib/ gnome-shell now builds once again on ubuntu 9.10
Same here. I have Ubuntu 10.10 Alpha 2.
I also wanted to add that I chose to rm -rf the GNOME Shell directory and start over.
Rebuilding from scratch has not fixed the problem for me. I still see the same error message with a bunch of 'undefined references' (several more than the original reporter listed but along the same line).
I tried moving all the .la files yesterday night but did not remove the gnome-shell folder and in that case the undefined references popped up again. Tonight I re-removed all .la files from /usr/lib/ and deleted the gnome-shell folder. This way I was able to build successfully again on Ubuntu 10.04 What I did: mv /usr/lib/*.la ~/backup/ rm -Rf ~/gnome-shell bash gnome-shell-build-setup.sh jhbuild build
I can confirm that steps prescribed by Steven Van Bael works.
Do other programs need those lib/*.la files? Is it really something I want to remove or will it end up breaking some other program in my system?
I can also confirm that removing all the .la files from /usr/lib allows the shell to do a complete build without errors. I had been trying without success for several days to do a complete build---the make always stalled during making test-theme--I had cleared all of the other errors. There is still a problem with the gnome-shell-build-setup.sh--it will not pickup several .dev files in my testing Maverick 10.10 install. Using Steven's "fix"
(In reply to comment #9) > Do other programs need those lib/*.la files? Is it really something I want to > remove or will it end up breaking some other program in my system? Those files are needed when building the libraries (e.g. libglib-2.0.la is needed while building libglib-2.0.so). They are neither needed at runtime (note that they are installed by the libXXX-dev package) nor when building a program which depends on the library. So no, removing those files won't break programs - messing with files under the control of the package manager is still extremely ugly though. A somewhat nicer alternative would be to install glib/gtk+-3.0 from a PPA and set up jhbuild to skip those modules.
Here's what I did: [kenny-strawn@ubuntu:~]$ sudo rm -rf ~/gnome-shell && jhbuild build -fac This completely removes the GNOME Shell source directory and allows the user to start on a clean slate.
Basically I removed all the *.la files from /home/username/gnome-shell/install/lib, and it worked.
*** Bug 624505 has been marked as a duplicate of this bug. ***
I did what Leslie suggested; that didn't work by itself, but doing that + rebuilding glib (libgio) worked. Sounds like this is maybe a WONTFIX; just rm -rf your build tree and start fresh kind of thing.
(In reply to comment #7) > mv /usr/lib/*.la ~/backup/ > rm -Rf ~/gnome-shell > bash gnome-shell-build-setup.sh > jhbuild build I am able to build only by following these steps, won't this affect the current Ubuntu (10.04)/GNOME installation?
(In reply to comment #16) > I am able to build only by following these steps, won't this affect the current > Ubuntu (10.04)/GNOME installation? Only in the sense that you removed files the package manager assumes to be there (because their packages were installed, but not uninstalled). On a side note: Debian has apparently decided to remove those files eventually: http://wiki.debian.org/ReleaseGoals/LAFileRemoval
*** Bug 625131 has been marked as a duplicate of this bug. ***
now i can't compile gobject-introspectin CCLD libgirepository-everything-1.0.la /bin/sed: can't read /usr/lib/libfreetype.la: No such file or directory
with a wipe it's gone
the same building NetworkManager, but deleting libglib-2.0.la didn't work. /home/pablo/opt/gnome2/lib/libgio-2.0.so: undefined reference to `g_variant_new_bytestring' /home/pablo/opt/gnome2/lib/libgio-2.0.so: undefined reference to `g_variant_new_bytestring_array' /home/pablo/opt/gnome2/lib/libgio-2.0.so: undefined reference to `g_variant_get_bytestring' vs libtool: link: cannot find the library `/home/pablo/opt/gnome2/lib/libglib-2.0.la' or unhandled argument `/home/pablo/opt/gnome2/lib/libglib-2.0.la'
well, it seems this bug is still here so i wanna share my solution. i do: rm -rf ~/gnome-shell/install/lib/*.la after that when i try to jhbuild buildone gnome-shell it will complain about some missing .la files. that error is fixed like this: jhbuild buildone gtk3 -acf jhbuild buildone clutter -acf after these two, i do again: jhbuild buildone gnome-shell and all works fine. Ubuntu Lucid. p.s. i tried removing the gnome-shell directory, but the error wont go away.
this work with a new installation too ?( compile all dependence packages )
(In reply to comment #22) > well, it seems this bug is still here Yes, because it's a bug *in libtool*. Most likely, in between builds, you upgraded some package, thus restoring its .la file in /usr/lib, thus triggering the problems again.
Confirming issue and workaround on gentoo and Gtk+ 3. (Re)moving all libtool archive files (.la) from /opt/gnome/lib*/ and /usr/lib also solves the build failure of Gtk+-3 when it fails with g_application_get_type when generating the Gtk .gir file. I found out that it tried to use the system's glib by sandboxing the build, seems like a libtool bug, it generated a LD_LIBRARY_PATH with /usr/lib before the opt-gnome, reversing the order solved manual building. (Funny thing is that there was a comment in the libtool wrapper that explicitly said it prepended things to override the system, but it might have refered to the two paths before /usr/lib) (btw, I'm using gentoo, jhbuild and libtool v2.2.10, if that's of any relevance) Should this workaround be listed somewhere on <http://live.gnome.org/JhbuildIssues/>? I'm guessing /General would be the place as it seems to affect "random" modules (depending on the build system's .la files)
The workaround is on http://live.gnome.org/GnomeShell/RemovingLaFiles, and it's listed from http://live.gnome.org/GnomeShell/SwatList. I just edited and cleaned up the Building section in http://live.gnome.org/GnomeShell#building to make the issue a bit more obvious
Great, perhaps <http://library.gnome.org/devel/jhbuild/stable/getting-started.html.en> also could have have a link to the list in the "Using JHBuild" section? (Or elsewhere in the JHBuild docs)
This bug is not specific to jhbuild, nor is it related to jhbuild. It's a libtool bug.
it's "related to jhbuild" in the sense that jhbuild is a system designed for doing *exactly* the thing that triggers the libtool bug
the only reason for keeping this bug open was to point people to it when they had this problem, but we point them to the wiki instead. so...