32bit GdkPixbuf modules not loaded when using ia32-libs

Bug #205223 reported by Sylvain Pasche
14
Affects Status Importance Assigned to Milestone
gtk+2.0 (Ubuntu)
Fix Released
Undecided
Unassigned
ia32-libs (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

I'm trying to load a 32bit application (Firefox 3 from mozilla.org) on amd64 Hardy, and I'm getting the error:

Gtk-WARNING **: Error loading theme icon 'gtk-ok' for stock: Unable to load image-loading module: /usr/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-png.so: /usr/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-png.so: wrong ELF class: ELFCLASS64

This has been reported in https://bugs.launchpad.net/ubuntu/+source/ia32-libs/+bug/177869 for instance.

This worked on gutsy, the regression seems to be related to this Debian bug:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=439004

   [ Josselin Mouette ]
   * 020_immodules-files-d.patch, 021_loader-files-d.patch: read the
     GDK_PIXBUF_MODULE_FILE and GTK_IM_MODULE_FILE variables before the
     Debian directories. Thanks Thadeu Lima de Souza Cascardo.
     Closes: #439004.

The issue is that the GtkPixbuf modules loading order changed, so that the 64bit loaders are loaded after the 32bit ones, so it fails.

Here's a strace from Gutsy (kept only meaningful calls):

7773 open("/usr/lib/gtk-2.0/2.10.0/loaders/../loader-files.d", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 21
7773 open("/usr/lib/gtk-2.0/2.10.0/loaders/../loader-files.d/libgtk2.0-0.loaders", O_RDONLY|O_LARGEFILE) = 22
7773 open("/usr/lib/gtk-2.0/2.10.0/loaders/../loader-files.d/librsvg2-common.loaders", O_RDONLY|O_LARGEFILE) = 22
7773 open("/etc/gtk-2.0/gdk-pixbuf.loaders.32", O_RDONLY|O_LARGEFILE) = 21
7773 stat64(0x835e328, 0xffe83a2c) = 0
7773 open("/usr/lib32/gtk-2.0/2.10.0/loaders/libpixbufloader-png.so", O_RDONLY) = 21 <-- OK: we're loading the 32bit module

Strace from Hardy:

19698 open("/etc/gtk-2.0/gdk-pixbuf.loaders.32", O_RDONLY|O_LARGEFILE) = 21
19698 open("/usr/lib/gtk-2.0/2.10.0/loaders/../loader-files.d", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|0x80000) = 21
19698 open("/usr/lib/gtk-2.0/2.10.0/loaders/../loader-files.d/libwmf0.2-7.loaders", O_RDONLY|O_LARGEFILE) = 22
19698 open("/usr/lib/gtk-2.0/2.10.0/loaders/../loader-files.d/libgtk2.0-0.loaders", O_RDONLY|O_LARGEFILE) = 22
19698 open("/usr/lib/gtk-2.0/2.10.0/loaders/../loader-files.d/librsvg2-common.loaders", O_RDONLY|O_LARGEFILE) = 22
19698 open("/usr/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-png.so", O_RDONLY) = 21 <-- ISSUE HERE: the 64bit module is read, which will fail to load with a 32bit binary.

I think one good way to solve this issue may be to first look if directory /usr/lib32/gtk-2.0/2.10.0/loaders exists, and use that instead of PIXBUF_LIBDIR for the gdkpixbuf_module_files_d_str variable (021_loader-files-d.patch).

(The other quick and dirty way would be to revert the Debian patch. Unfortunately this also reverts the issue that the reporter was having, but this issue here may be more important for Hardy users of 32bit software on amd64).

Related branches

Revision history for this message
estama (estama) wrote :

I also see the same bug. I run hardy on amd64 here and have the same problems with 32 bit applications (firefox ia32, thunderbird ia32, acrobat reader).

I think that these bugs are duplicates of this bug:

#190227, #210794

Please revert the above mentioned Debian patch. Ia32 apps worked beautifully in gutsy.

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

please recheck with http://people.ubuntu.com/~doko/tmp/ia32-libs_2.2ubuntu10_amd64.deb
apparently the ia32 patch is not updated in hardy, The best thing would be to access to loaders dir with a relative path name.

Changed in gtk+2.0:
status: New → Incomplete
Changed in ia32-libs:
status: New → Incomplete
Revision history for this message
Sylvain Pasche (sylvain-pasche) wrote :

I installed that package and tested again. The issue is still here (no stock icons).

 Error loading theme icon 'gtk-close' for stock: Unable to load image-loading module: /usr/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-png.so: /usr/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-png.so: wrong ELF class: ELFCLASS64

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

this contradicts your comment in https://bugs.edge.launchpad.net/ubuntu/+source/ia32-libs/+bug/177869/comments/11

which comment is the correct one?

Revision history for this message
Sylvain Pasche (sylvain-pasche) wrote :

That's not my comment there. I tested with a simple GTK app, not with vmware.

Revision history for this message
Sylvain Pasche (sylvain-pasche) wrote :

My system was not up to date (I had kernel and hibernate issues, to I did not update for some weeks).

I now tested in a hardy 64bit chroot on another system (gutsy 64bit), and I have no issues with stock icons loading, but with the default ia32-libs from hardy.

Maybe I'll try to dist-upgrade my other system and test again. What did you do in that new ia32-libs package? Did you modify the gtk2.0-0 package to restore the previous version of 020_immodules-files-d.patch, 021_loader-files-d.patch and rebuild ia32-libs with this?

Revision history for this message
C de-Avillez (hggdh2) wrote :

Matthias, I tested with vmware. on bug 177869. I just downloaded & installed http://people.ubuntu.com/~doko/tmp/ia32-libs_2.2ubuntu10_amd64.deb, and I still see the same errors when loading vmware:

Unable to load image-loading module: /usr/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-png.so: /usr/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-png.so: wrong ELF class: ELFCLASS64
Unable to load image-loading module: /usr/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-png.so: /usr/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-png.so: wrong ELF class: ELFCLASS64
Unable to load image-loading module: /usr/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-png.so: /usr/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-png.so: wrong ELF class: ELFCLASS64
Unable to load image-loading module: /usr/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-png.so: /usr/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-png.so: wrong ELF class: ELFCLASS64
Unable to load image-loading module: /usr/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-png.so: /usr/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-png.so: wrong ELF class: ELFCLASS64
Unable to load image-loading module: /usr/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-png.so: /usr/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-png.so: wrong ELF class: ELFCLASS64
...

Revision history for this message
estama (estama) wrote :

Matthias, i also tested firefox 32bit and thunderbirds 32bit on amd64 Hardy with your .deb, and i still see the same behavior as before. 32bit apps not having icons in gnone panel.

Revision history for this message
Rob van den Berg (rghvdberg) wrote :

I've installed this package http://people.ubuntu.com/~doko/tmp/ia32-libs_2.2ubuntu10~test1_amd64.deb
and it solved the icon problems in acroread and transcribe (http://www.seventhstring.com/xscribe/overview.html)
although transcribe still gives this warning Gtk-WARNING **: /usr/lib/gtk-2.0/2.10.0/filesystems/libgio.so: wrong ELF class: ELFCLASS64, but it seems to work ok

Revision history for this message
Matthias Klose (doko) wrote : Re: [Bug 205223] Re: 32bit GdkPixbuf modules not loaded when using ia32-libs

Rob van den Berg schrieb:
 > although transcribe still gives this warning Gtk-WARNING **:
/usr/lib/gtk-2.0/2.10.0/filesystems/libgio.so: wrong ELF class: ELFCLASS64, but
it seems to work ok

this file is part of libgnomeui-0, which is not included in ia32-libs.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gtk+2.0 - 2.12.9-3ubuntu2

---------------
gtk+2.0 (2.12.9-3ubuntu2) hardy; urgency=low

  * Use 32bit pixbuf loaders when running the i386 binary on amd64.
    LP: #205223, #177869, #190227.

 -- Matthias Klose <email address hidden> Fri, 18 Apr 2008 16:38:13 +0000

Changed in gtk+2.0:
status: Incomplete → Fix Released
Revision history for this message
exactt (giesbert) wrote :

i just upgraded to the latest hardy including:

ii gtk2-engines-pixbuf 2.12.9-3ubuntu2 Pixbuf-based theme for GTK+ 2.x

but i still get the errors described in https://bugs.launchpad.net/medibuntu/+bug/219071 which seems to be a duplicate. right?

Revision history for this message
estama (estama) wrote :

Latest update of ia32-libs fixed the problems for me.

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

> Latest update of ia32-libs fixed the problems for me.

closing

Changed in ia32-libs:
status: Incomplete → Fix Released
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.