LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   How to force 32 bit PaleMoon to use 32 bit libs instead of 64 bit libs? (https://www.linuxquestions.org/questions/slackware-14/how-to-force-32-bit-palemoon-to-use-32-bit-libs-instead-of-64-bit-libs-4175587962/)

Ook 08-25-2016 10:14 AM

How to force 32 bit PaleMoon to use 32 bit libs instead of 64 bit libs?
 
Slackware 14.2. Fairly clean install.

I have 32 bit PaleMoon installed. It runs and outputs this to console:

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

For testing purposes, I copied the 32 bit files from the 32 bit directory of gdk-pixbuf (NEVER do this it is a horrible hack and will break everything that relies on gdk-pixbuf) and it runs and works as expected. Which tells me that 1) it is looking for gdk-pixbuf in the 64 bit library location instead of the 32 bit location and 2) if it finds the 32 bit version, it works fine.

So my question is how can I force it to use the 32 bit version of gdk-pixbuf? It's there under /usr/lib where you would expect it to be, but PaleMoon looks for it under /usr/lib64

phenixia2003 08-25-2016 10:26 AM

Hello,

why don't you build 64-bit version ?

--
SeB

Ook 08-25-2016 10:34 AM

The SlackBuild script doesn't build from source, it just builds an install package with a pre-built binary. It segfaults on Slackware 14.2. I looked at building the 64 bit version myself from source, but there were several issues that I didn't have time to deal with. The 32 bit version seems to run fine with the exception of the gdk-pixbuf problem.

Skaendo 08-25-2016 10:58 AM

Is your Slackware fully updated? And are you using Pale Moon 26.4.0.1?

phenixia2003 08-25-2016 11:58 AM

Hello,

Quote:

Originally Posted by Ook (Post 5595900)
Slackware 14.2. Fairly clean install.

I have 32 bit PaleMoon installed. It runs and outputs this to console:

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

Installed 32-bit palemoon 25.8.1 (from slackbuilds.org) on a virtualized slackware64 14.2+multilib, and it works well. I've no issue with gdk-pixbuf, only the warnings below :

Code:

$ palemoon

(pale moon:3767): Gtk-WARNING **: Unable to locate theme engine in module_path: "oxygen-gtk",

(pale moon:3767): Gtk-WARNING **: Unable to locate theme engine in module_path: "oxygen-gtk",
GLib-GIO-Message: Using the 'memory' GSettings backend.  Your settings will not be saved or shared with other applications.

Seems there's something wrong with your installation. Can you post the output of commands below :

Code:

$ ls /var/log/packages/*multilib*
$ ls /var/log/packages/*compat32*

P.S: tried palemoon 64-bit (25.8.1 & 26.4.0.1) and both segfault.

--
SeB

Skaendo 08-25-2016 02:18 PM

Quote:

Originally Posted by phenixia2003 (Post 5595935)
Hello,

Installed 32-bit palemoon 25.8.1 (from slackbuilds.org) on a virtualized slackware64 14.2+multilib, and it works well. I've no issue with gdk-pixbuf, only the warnings below :

Code:

$ palemoon

(pale moon:3767): Gtk-WARNING **: Unable to locate theme engine in module_path: "oxygen-gtk",

(pale moon:3767): Gtk-WARNING **: Unable to locate theme engine in module_path: "oxygen-gtk",
GLib-GIO-Message: Using the 'memory' GSettings backend.  Your settings will not be saved or shared with other applications.

--
SeB

Gtk warnings (and resulting crashes) are fixed by modifying the menu to launch Pale Moon with this:
Code:

GTK2_RC_FILES=/usr/share/themes/Adwaita/gtk-2.0/gtkrc palemoon %u
Or passing it to another GTK2 theme.

Ook 08-25-2016 03:38 PM

Quote:

Originally Posted by Skaendo (Post 5596001)
Gtk warnings (and resulting crashes) are fixed by modifying the menu to launch Pale Moon with this:
Code:

GTK2_RC_FILES=/usr/share/themes/Adwaita/gtk-2.0/gtkrc palemoon %u
Or passing it to another GTK2 theme.

Nice catch on the GTK error messages, that actually worked. Sadly, dosn't fix the gdk-pixbuf problem, but it is a step in the right direction.

You would think there would be some easy way to force 32 bit PaleMoon to look in /usr/lib instead of /usr/lib64?

Ook 08-25-2016 04:00 PM

Quote:

Originally Posted by Skaendo (Post 5595919)
Is your Slackware fully updated? And are you using Pale Moon 26.4.0.1?

Yes, and yes. I've duplicated this on a couple of boxes. Specifically, every Slackware 14.2 box I've tested this on, PaleMoon 64 bit segfaults, and while the 32 bit version runs, it tries to load gdk-pixbuf libs from /usr/lib64. The only noticeable effect of this seems to be that various icons in the toolbar and status bar, etc., don't display. Other than that it seems to be working just fine.

Skaendo 08-25-2016 05:55 PM

Quote:

Originally Posted by Ook (Post 5596058)
Yes, and yes. I've duplicated this on a couple of boxes. Specifically, every Slackware 14.2 box I've tested this on, PaleMoon 64 bit segfaults, and while the 32 bit version runs, it tries to load gdk-pixbuf libs from /usr/lib64. The only noticeable effect of this seems to be that various icons in the toolbar and status bar, etc., don't display. Other than that it seems to be working just fine.

Segfaults have been going on since the Feb updates to glibc.

I installed Pale Moon prior to that update and have been updating it with the Pale Moon installer.
If I remember correctly, you can install Slackware 14.1 x64, install Pale Moon, then upgrade to 14.2 and Pale Moon will still work.

Ook 08-25-2016 06:04 PM

Quote:

Originally Posted by Skaendo (Post 5596121)
Segfaults have been going on since the Feb updates to glibc.

I installed Pale Moon prior to that update and have been updating it with the Pale Moon installer.
If I remember correctly, you can install Slackware 14.1 x64, install Pale Moon, then upgrade to 14.2 and Pale Moon will still work.

I've updated several boxes from Slackware 14.1 to 14.2. ALL of them had problems. In the end I decided it was better to just wipe it and install 14.2 from scratch.

However, why would upgrading from 14.1 to 14.2 work, where a clean install of 14.2 not work? I'm thinking that maybe there is something that was removed from Slackware 14.2 causing the problem, and when you upgrade from 14.1 to 14.2, that something is still there?

Stranger and stranger...

Skaendo 08-25-2016 08:37 PM

Quote:

Originally Posted by Ook (Post 5596130)
I've updated several boxes from Slackware 14.1 to 14.2. ALL of them had problems. In the end I decided it was better to just wipe it and install 14.2 from scratch.

However, why would upgrading from 14.1 to 14.2 work, where a clean install of 14.2 not work? I'm thinking that maybe there is something that was removed from Slackware 14.2 causing the problem, and when you upgrade from 14.1 to 14.2, that something is still there?

Stranger and stranger...

Like I said, Pale Moon started segfaulting on clean installs of Slackware-current on Feb 23rd. glibc was upgraded on Feb 23rd. And that is when library linking started going bad. trava90, the Pale Moon Linux "dev" is running Debian (I believe) that is running a patched version of glibc-2.19 where Slackware has been upgraded to glibc-2.23 to fix security issues.

Slackware is not the only distro that is having issues. Manjaro, Ubuntu and Gentoo (that are all on glibc-2.23) are seeing the same problem.

phenixia2003 08-26-2016 02:45 AM

Hello,

Quote:

Originally Posted by Ook (Post 5595900)
Slackware 14.2. Fairly clean install.

I have 32 bit PaleMoon installed. It runs and outputs this to console:

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

I tried several times to reproduce this issue without success. However, it looks like this, and you can try to apply the workaround detailed in this post.

--
SeB

phenixia2003 08-26-2016 08:20 AM

Hello,

Well, gdk-pixbuf2 has changed since 14.1, and the workaround given in my previous post does not work anymore. However, the patch below for /usr/bin/update-gdk-pixbuf-loaders can be used instead :

Code:

--- /usr/bin/update-gdk-pixbuf-loaders.bak      2016-08-26 14:40:42.901913302 +0200
+++ /usr/bin/update-gdk-pixbuf-loaders  2016-08-26 14:49:28.087897472 +0200
@@ -20,18 +20,12 @@
      fi
      /usr/bin/gdk-pixbuf-query-loaders-64 --update-cache
      # Check for x86_64 multilib:
-    if ls -d /etc/gtk-2.0/i?86* 1> /dev/null 2> /dev/null ; then
-      for d in $(ls -d /etc/pango/i?86*); do
-        mlhost=$(basename $d)
-        break
-      done
-      if [ -x /usr/bin/gdk-pixbuf-query-loaders-32 ]; then
-        if [ "$1" = "--verbose" ]; then
-          echo "Updating gdk-pixbuf.loaders for ${mlhost}:"
-          echo "  /usr/bin/gdk-pixbuf-query-loaders-32 --update-cache"
-        fi
-        /usr/bin/gdk-pixbuf-query-loaders-32 --update-cache
+    if [ -x /usr/bin/gdk-pixbuf-query-loaders-32 ]; then
+      if [ "$1" = "--verbose" ]; then
+        echo "Updating gdk-pixbuf.loaders for 32-bit:"
+        echo "  /usr/bin/gdk-pixbuf-query-loaders-32 --update-cache"
        fi
+      /usr/bin/gdk-pixbuf-query-loaders-32 --update-cache
      fi
    else
      if [ "$1" = "--verbose" ]; then

If this does not solve the issue, I suggest to try this :

1. remove packages gdk-pixbuf2 and gdk-pixbuf2-compat32

2. if required, remove the directories /usr/lib/gdk-pixbuf-2.0 and /usr/lib64/gdk-pixbuf-2.0

3. at this point, running palemoon should fail with the following error:
Code:

XCOMPGlueLoad error for file /opt/palemoon/libxul.so
libgdk_pixbuf-2.0.so.0: cannot open shared object file: No such or directory
Couldn't load XPCOM

4. reinstall packages gdk-pixbuf2 and gdk-pixbuf2-compat32

5. At this point, palemoon should start, but with the warning below :
Code:

(pale moon:9531): GdkPixbuf-WARNING **: Cannot open pixbuf loader module file '/usr/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache': No such file or directory

This likely means that your installation is broken.
Try running the command
  gdk-pixbuf-query-loaders > /usr/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
to make things work again for the time being.
GLib-GIO-Message: Using the 'memory' GSettings backend.  Your settings will not be saved or shared with other applications.

6. as root, run the command below (once the patch at top of this post applied) :
Code:

$ /usr/bin/gdk-pixbuf-loaders --verbose
Updating gdk-pixbuf.loaders for x86_64-slackware-linux:
  /usr/bin/gdk-pixbuf-query-loaders-64 --update-cache
Updating gdk-pixbuf.loaders for 32-bit:
  /usr/bin/gdk-pixbuf-query-loaders-32 --update-cache

7. Now, palemoon should start without warning about loaders.cache.


--
SeB

phenixia2003 08-26-2016 08:49 AM

Hello,

I finally understood how to reproduce this and why palemoon was searching for 64-bit version of libpixbufloader-png.so.

In fact, when palemoon is started for the first time, it shows the following warning :

Code:

(pale moon:9531): GdkPixbuf-WARNING **: Cannot open pixbuf loader module file '/usr/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache': No such file or directory
This likely means that your installation is broken.
Try running the command
  gdk-pixbuf-query-loaders > /usr/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache

But, gdk-pixbuf-query-loaders is a symlink to /usr/bin/gdk-pixbuf-query-loaders-64, and therefore, this command creates a loaders.cache with references to 64-bit libraries :
Code:

$ gdk-pixbuf-query-loaders >  /usr/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache

$ cat  /usr/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
# GdkPixbuf Image Loader Modules file
# Automatically generated file, do not edit
# Created by gdk-pixbuf-query-loaders from gdk-pixbuf-2.32.3
#
# LoaderDir = /usr/lib64/gdk-pixbuf-2.0/2.10.0/loaders
#
"/usr/lib64/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-png.so"
"png" 5 "gdk-pixbuf" "PNG" "LGPL"
"image/png" ""
"png" ""
"\211PNG\r\n\032\n" "" 100

"/usr/lib64/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-bmp.so"
"bmp" 5 "gdk-pixbuf" "BMP" "LGPL"
"image/bmp" "image/x-bmp" "image/x-MS-bmp" ""
"bmp" ""
"BM" "" 100

"/usr/lib64/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-qtif.so"
"qtif" 4 "gdk-pixbuf" "QuickTime" "LGPL"
"image/x-quicktime" "image/qtif" ""
"qtif" "qif" ""
"abcdidsc" "xxxx    " 100
"abcdidat" "xxxx    " 100
...

So, when a 32-bit software ask you to run gdk-pixbuf-query-loaders, you must run gdk-pixbuf-query-loaders-32 instead :
Code:

$ gdk-pixbuf-query-loaders-32 >  /usr/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache

$ cat /usr/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache

# GdkPixbuf Image Loader Modules file
# Automatically generated file, do not edit
# Created by gdk-pixbuf-query-loaders from gdk-pixbuf-2.32.3
#
# LoaderDir = /usr/lib/gdk-pixbuf-2.0/2.10.0/loaders
#
"/usr/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-png.so"
"png" 5 "gdk-pixbuf" "PNG" "LGPL"
"image/png" ""
"png" ""
"\211PNG\r\n\032\n" "" 100

"/usr/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-bmp.so"
"bmp" 5 "gdk-pixbuf" "BMP" "LGPL"
"image/bmp" "image/x-bmp" "image/x-MS-bmp" ""
"bmp" ""
"BM" "" 100

"/usr/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-qtif.so"
"qtif" 4 "gdk-pixbuf" "QuickTime" "LGPL"
"image/x-quicktime" "image/qtif" ""
"qtif" "qif" ""
"abcdidsc" "xxxx    " 100
"abcdidat" "xxxx    " 100

...


--
SeB

kjhambrick 08-26-2016 09:19 AM

SeB --

That's is one OUTSTANDING bit of debugging ( again )!

Thanks ( again ) for the education.

You solved a similar issue [SOLVED] 32 bit program (xsane) looking for 64 bit library on multilib system on 2015-01-08 which I implemented 'by hand' in /usr/bin/update-gdk-pixbuf-loaders

And, I don't run palemoon ... but ...

One more Q and only if you know off-hand ...( :) if not, I'll do a grep session for myself :) )

Do you know whether any Programs or doinst.sh scripts would 'auto-execute' the 'update-the-loaders.cache' commands ?
Code:

gdk-pixbuf-query-loaders > /usr/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
If so, it seems like that could sure make a mess on /usr/lib/ for multilib systems unless the Program / doinst.sh script invokes the 32-bit version(s) ...

Thanks again for the enlightenment !

-- kjh


All times are GMT -5. The time now is 02:29 PM.