32-bit gtk applications don't load modules or theme engines properly ("wrong ELF class" message)

Bug #140604 reported by Brian Rogers
8
Affects Status Importance Assigned to Milestone
ia32-libs (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: ia32-libs

On a current Ubuntu Gutsy, 32-bit gtk applications look for theme engines where the 64-bit libraries are located, meaning they fail to load themes. Applications generally work, but they don't look right. In theory it affects things other than themes, but I haven't personally seen it. Also, the following message is produced:

(test:15581): Gtk-WARNING **: /usr/lib/gtk-2.0/2.10.0/engines/libubuntulooks.so: wrong ELF class: ELFCLASS64

That information at http://library.gnome.org/devel/gtk/unstable/gtk-running.html about GTK_PATH provides the hint for a solution. When searching for modules, GTK will look under a subdirectory named after its platform if it sees one. Therefore, a properly named symlink to the directory containing 32-bit gtk modules will solve this problem, like so:

sudo ln -s /usr/lib32/gtk-2.0/2.10.0 /usr/lib/gtk-2.0/2.10.0/i486-pc-linux-gnu

It would be nice if this symlink (or some other solution to this problem) was included in ia32-libs.

Revision history for this message
estama (estama) wrote :

Brian Rogers THANK YOU for this. It solved all the problems with the 32-bit firefox and 32-bit thunderbird that i have here (ontop of 64bit Gutsy).

I've tested the suggestion and it works better than anything else.

Everywhere else all the suggestions are to edit the startup scripts and insert an:

export GTK_PATH=/usr/lib32/gtk-2.0

The result is that when running a 32bit-thunderbird, whenever i try to open a pdf file, evince comes without a theme at all because the GTK_PATH points to the 32bit libraries (which obviously 64-bit evince cannot use).

The suggestion given above:

sudo ln -s /usr/lib32/gtk-2.0/2.10.0 /usr/lib/gtk-2.0/2.10.0/i486-pc-linux-gnu

solved all the 64-bit and 32-bit problems i had with gtk. Without changing a SINGLE line everything works beatifully. 64-bit applications see 64-bit gtk and 32-bit applications see 32-bit gtk.

PLEASE PLEASE put this in ia32-libs. It really solves a lot of problems with gutsy.

Revision history for this message
estama (estama) wrote :

Is there anything we can do to make the solution in this bug more visible?

This bug affects anyone who runs 32bit application on top of Ubuntu 64. For such a small change a lot of my problems with 32bit applications went away. Before the solutions in this bug i had to change the startup scripts of 32bit applications and endure the no theming of 64bit applications launched from inside 32bit applications.

The solution in this bug solves all these problems transparently. And it is only ONE soft link.

Please consider putting it inside gutsy 64.

Revision history for this message
Nagy Ferenc László (nfl) wrote :

Thanks for the tip. It solved my only problem I noticed after upgrading to Gutsy.

Revision history for this message
Matthias Klose (doko) wrote :

ia32-libs (2.1ubuntu3) gutsy; urgency=low

  * Add libssl0.9.8 (Scott Ritchie).
  * Add libsigc++-2.0-0c2a. LP: #146559.
  * Add libhal1.
  * Add libart-2.0-2. LP: #141297.
  * Add symlink to find the 32bit gtk modules. LP: #140604.
  * Freshen packages.

 -- Matthias Klose <email address hidden> Wed, 10 Oct 2007 13:14:46 +0000

Changed in ia32-libs:
status: New → Fix Released
Revision history for this message
Angel (angelsowmiya) wrote :

I try to launch firefox from command prompt with my flash plugin.

I can see the flash content playing in my firefox browser .

 If I close a tab by leave any non flash content . It is properply closing the browser.

But if I close the browser with flash content I can see the following error messages in my terminal.

(firefox:6877): Gtk-CRITICAL **: gtk_widget_destroy: assertion `GTK_IS_WIDGET (widget)' failed

While debugging I could see that it happening after closing my plugin instance.

I am not so friendly with gtk . Could you suggest the cause for the error or how to solve this issue.

Revision history for this message
Håkon Enger (hakon-enger) wrote :

For your information: In jaunty, I got the following error message from Adobe Reader (acroread), which is a 32-bit only application:

Gtk-Message: Failed to load module "canberra-gtk-module": /usr/lib/gtk-2.0/modules/libcanberra-gtk-module.so: wrong ELF class: ELFCLASS64

The program still started, and I did not notice any problems while running the program, but anyway I found a workaround that seems to remove the above error message. The problem is that while a 32-bit canberra module is available in /usr/lib32/gtk-2.0/modules, this directory is not searched even though the symlink mentioned in this bug is in place, since the 'modules' subdirectory is not inside the 2.10.0 subdirectory. A solution (which removes the error message, at least, might have other effects, use at your own risk!) seems to be:

sudo mv /usr/lib32/gtk-2.0/modules /usr/lib32/gtk-2.0/2.10.0/
sudo mv /usr/lib/gtk-2.0/modules /usr/lib/gtk-2.0/2.10.0/

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.