LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Multilib related 32 Bit gtk.immodules Segmentation Fault. (http://www.linuxquestions.org/questions/slackware-14/multilib-related-32-bit-gtk-immodules-segmentation-fault-4175498914/)

cwizardone 03-20-2014 08:04 PM

Multilib related 32 Bit gtk.immodules Segmentation Fault.
 
Happy First Day of Spring!

In the spirit of "Spring Cleaning" I did a fresh, from scratch, installation of Slackware64-14.1, brought it current and all was well. I then added the Multilib files and re-booted and was presented with this error message,

Quote:

updating 32 bit gtk immodules:
/usr/bin/gtk-quer-immodules-2.0-31 --update cache /usr/bin/update-gtk-immodules-2..0: line 14: 867 Segmentation fault /usr/bin/gtk-query-immodules-2.0-32 --update-cache 2> /dev/null
I cannot install any gtk applications, but other than that, the system is running. I dug around, but can't find anything on this particular topic.

Any suggestions would be greatly appreciated.
:)

Thanks.

Paulo2 03-20-2014 11:38 PM

Hello cwizardone , for me is the first day of Autumn :)

This is a coincidence because I was searching for these files a few hours ago.

My Slackware is current 32 but I think this file "/usr/bin/gtk-quer-immodules-2.0-31 " would be the same as mine
Code:

paulo@paulobash 4.2.45~ $ v /usr/bin/gtk-query-immodules-*
lrwxrwxrwx 1 root root  26 Nov 21 13:43 /usr/bin/gtk-query-immodules-2.0 -> gtk-query-immodules-2.0-32
-rwxr-xr-x 1 root root 9016 Jul 26  2013 /usr/bin/gtk-query-immodules-2.0-32
lrwxrwxrwx 1 root root  26 Nov 21 13:43 /usr/bin/gtk-query-immodules-3.0 -> gtk-query-immodules-3.0-32
-rwxr-xr-x 1 root root 9168 Jul 26  2013 /usr/bin/gtk-query-immodules-3.0-32

This file is called by /usr/bin/update-gtk-immodules-2.0 if the system has multilib
Code:

case "$host" in
  s390x*|x86_64*)
  if [ -x /usr/bin/gtk-query-immodules-2.0-64 ]; then
    if [ "$1" = "--verbose" ]; then
      echo "Updating gtk.immodules for ${host}:"
      echo "  /usr/bin/gtk-query-immodules-2.0-64 --update-cache"
    fi
    /usr/bin/gtk-query-immodules-2.0-64 --update-cache 2>/dev/null
    # Check for multilib
    if [ -x /usr/bin/gtk-query-immodules-2.0-32 ]; then
      if [ "$1" = "--verbose" ]; then
        echo "Updating 32bit gtk.immodules: "
        echo "  /usr/bin/gtk-query-immodules-2.0-32 --update-cache"
      fi
      /usr/bin/gtk-query-immodules-2.0-32 --update-cache 2>/dev/null
    fi
  fi
  ;;


cwizardone 03-22-2014 04:07 PM

Hello, Paulo2.

For a few minutes I thought I found the answer, but it was not to be.
I re-partitioned the hard drive and did, again, a fresh install.
As this problem is Multilib related, I installed the compat32 packages one at a time to see if I could find the problem and Pango did return an error, saying it could not find, libz.so.1.
As I have all the files on a backup drive, I did another install of the 64 bit version of Pango and it returned a similar error.
So, I went online and downloaded "fresh" copies of all the related files, i.e., the 64 bit versions of Pango and Zlib, and the compat32 versions of the same.
After installing the "fresh" copies of Zlib, Pango installed without any errors.

So, I thought this might have fixed the problem, but upon rebooting, with the multilib files installed, the same error appeared as reported in message number 1, above.

Oh, well... back to the drawing board....
:)

cwizardone 03-25-2014 07:35 PM

Well... At this point I've done 4, as in four, fresh, from scratch installations and I'm right back at the same point.
Everything is fine until the multilib files are installed.
I'll gone so far, as mentioned before, to install the multilib files one by one looking for error messages. This last installation went smoothly, but upon re-booting it produced the same error message as in post 1. Here it is again:

Quote:

/usr/bin/gtk-query-immodules-2.0-31 --update cache /usr/bin/update-gtk-immodules-2..0: line 14: 867 Segmentation fault /usr/bin/gtk-query-immodules-2.0-32 --update-cache 2> /dev/null
EXCEPT this time it was a 851 segmenation fault, not 867.
:scratch:

phenixia2003 03-26-2014 04:49 AM

Hello,

I have two natives (and several virtual) Slackware64/multilib 14.1 without any issue.

1. Have you checked the output of ldd /usr/bin/gtk-query-immodules-2.0-32 ?

2. Try to run /usr/bin/gtk-query-immodules-2.0-32 --update-cache by hand (without 2>/dev/null)

3. If you have installed the multilib by hand (i.e. without slackpkg+ or multilibpkg/compat32pkg), some of the downloaded packages might be corrupted on your side. In this case it will be useful to check their md5.

--
SeB

cwizardone 03-26-2014 10:42 PM

Thank you for your reply.
Yes, I had thought of that and have twiced "re-freshed" the files.
The problem seems to be with gtk+2-compat32-2.24.20. I just downloaded it from two different mirrors, but each time I've "upgraded" the package it gives an error similar to the one mentioned in my first post,

Quote:

==============================================================================
| Upgrading gtk+2-compat32-2.24.20-x86_64-1compat32 package using ./gtk+2-compat32-2.24.20-x86_64-1compat32.txz
+==============================================================================

Pre-installing package gtk+2-compat32-2.24.20-x86_64-1compat32...
/usr/bin/update-gtk-immodules-2.0: line 14: 8130 Segmentation fault /usr/bin/gtk-query-immodules-2.0-32 --update-cache 2> /dev/null
cat: etc/gtk-2.0/im-multipress.conf.new: No such file or directory

Removing package /var/log/packages/gtk+2-compat32-2.24.20-x86_64-1compat32-upgraded-2014-03-26,19:34:50...

Verifying package gtk+2-compat32-2.24.20-x86_64-1compat32.txz.
Installing package gtk+2-compat32-2.24.20-x86_64-1compat32.txz:
PACKAGE DESCRIPTION:
# GTK+ version 2 (multi-platform GUI toolkit)
#
# This is GTK+, a multi-platform toolkit for creating graphical user
# interfaces. Offering a complete set of widgets, GTK+ is suitable for
# projects ranging from small one-off projects to complete application
# suites.
#
# This package contains 32-bit compatibility binaries.
Executing install script for gtk+2-compat32-2.24.20-x86_64-1compat32.txz.
/usr/bin/update-gtk-immodules-2.0: line 14: 8490 Segmentation fault /usr/bin/gtk-query-immodules-2.0-32 --update-cache 2> /dev/null
cat: etc/gtk-2.0/im-multipress.conf.new: No such file or directory
Package gtk+2-compat32-2.24.20-x86_64-1compat32.txz installed.

Package gtk+2-compat32-2.24.20-x86_64-1compat32 upgraded with new package ./gtk+2-compat32-2.24.20-x86_64-1compat32.txz.

phenixia2003 03-27-2014 05:28 AM

Hello,

gtk-query-immodules-2.0-32 --update-cache updates the file /usr/lib/gtk-2.0/2.10.0/immodules.cache. Is this file present on your side ?

If you don't have this file, I guess the segmentation fault is thrown before gtk-query-immodules-2.0-32 writes it. Maybe running strace /usr/bin/gtk-query-immodules-2.0-32 --update-cache can give us more information.

If the file is present, I guess the segmentation fault could be caused by something wrong on the hard drive. So I suggest :

1. Rename /usr/llib/gtk-2.0/2.10.0/immodules to /usr/llib/gtk-2.0/2.10.0/immodules.bak (or what you want), then restart you computer and/or run /usr/bin/gtk-query-immodules-2.0-32 --update-cache.

and / or

2. Run /usr/bin/gtk-query-immodules-2.0-32 > /tmp/immodules.cache

Hope this helps.

--
SeB

cwizardone 03-27-2014 10:59 AM

Quote:

Originally Posted by phenixia2003 (Post 5142072)
Hello,

gtk-query-immodules-2.0-32 --update-cache updates the file /usr/lib/gtk-2.0/2.10.0/immodules.cache. Is this file present on your side ? ...

No, it is not...
Thanks, again for taking the time to reply.

phenixia2003 03-27-2014 11:14 AM

Quote:

Originally Posted by cwizardone (Post 5142260)
No, it is not...
Thanks, again for taking the the to reply.

can you post the output of :

Code:

$ strace /usr/bin/gtk-query-immodules-2.0-32 --update-cache

cwizardone 03-28-2014 02:12 AM

Fifth time is a charm.
This time, before starting to install the multilib files I downloaded "fresh" 32 bit copies of gtk+2 and a few others and converted them to compat32 files.

It all went well, except for a two minor errors.

Upon installation, gtk+2-compat32, issued the error,
Quote:

"cat: etc/gtk-2.0/im-multipress.conf.new: no such file or directory"
and lesstif-compat32, reported this error,
Quote:

"install/donist.she: line 23: systax error: unexpected end of line."
However, the boot-up error is gone, so, while I'm not really sure what caused the original error, it is "solved" for now.

Thank you, phenixia2003, for your help!

:hattip:

phenixia2003 03-28-2014 05:57 AM

Hello,

Quote:

Originally Posted by cwizardone (Post 5142664)
Fifth time is a charm.
This time, before starting to install the multilib files I downloaded "fresh" 32 bit copies of gtk+2 and a few others and converted them to compat32 files.

However, the boot-up error is gone, so, while I'm not really sure what caused the original error, it is "solved" for now.

Well, that's a good new :)

Quote:

[...] except for a two minor errors.

Upon installation gtk+2-compat32 issued the error, and lesstif-compat32, reported this error,
Anyway you have helped to discover a small bug.

Even if the error thrown by doinst.sh from gtk+2 has no consequence, the error thrown by doinst.sh from lesstif reveals a problem in convertpkg-compat32.

Here is the doinst.sh from lesstif-compat32 :
Code:

mkdir -p usr/lib/X11/config
touch usr/lib/X11/config/host.def
if ! grep LessTif usr/lib/X11/config/host.def 1> /dev/null 2> /dev/null ; then
  cat usr/lib/LessTif/config/host.def >> usr/lib/X11/config/host.def
( cd usr/lib ; rm -rf libDtPrint.so )
( cd usr/lib ; ln -sf libDtPrint.so.1.0.0 libDtPrint.so )
( cd usr/lib ; rm -rf libDtPrint.so.1 )
( cd usr/lib ; ln -sf libDtPrint.so.1.0.0 libDtPrint.so.1 )
( cd usr/lib ; rm -rf libMrm.so.2 )
( cd usr/lib ; ln -sf libMrm.so.2.0.1 libMrm.so.2 )
( cd usr/lib ; rm -rf libXm.so.2 )
( cd usr/lib ; ln -sf libXm.so.2.0.1 libXm.so.2 )
( cd usr/lib ; rm -rf libXm.so )
( cd usr/lib ; ln -sf libXm.so.2.0.1 libXm.so )
( cd usr/lib/X11 ; rm -rf mwm )
( cd usr/lib/X11 ; ln -sf ../../../etc/X11/mwm mwm )
( cd usr/lib ; rm -rf libMrm.so )
( cd usr/lib ; ln -sf libMrm.so.2.0.1 libMrm.so )
( cd usr/lib ; rm -rf libUil.so )
( cd usr/lib ; ln -sf libUil.so.2.0.1 libUil.so )
( cd usr/lib ; rm -rf libUil.so.2 )
( cd usr/lib ; ln -sf libUil.so.2.0.1 libUil.so.2 )

Note that the if statment is not closed, so the code will not be executed, and the symlinks will not be created.

I checked convertpkg-compat32 (from compat32-tools-3.2-noarch-1alien) and found the lines #260-261 to be the source of this issue :
Code:

259:  # Only keep lines that deal with symlinks in bin/32 and lib directories:
260:  ( cat install/doinst.sh |grep -v "etc/ld.so.conf" \
261:      |grep -E '(usr/bin |lib |lib/)' > install/doinst.sh.2

262:    cat install/doinst.sh.1 install/doinst.sh.2 \
263:      |sed -e 's#usr/bin#usr/bin/32#g' > install/doinst.sh
264:    rm -f install/doinst.sh.1 install/doinst.sh.2 ) || true

if you run this on lesstif::doinst.sh, the following line will be saved (red=string that match the patterns passed to grep):
Code:

mkdir -p usr/lib/X11/config
touch usr/lib/X11/config/host.def
if ! grep LessTif usr/lib/X11/config/host.def 1> /dev/null 2> /dev/null ; then
  cat usr/lib/LessTif/config/host.def >> usr/lib/X11/config/host.def
( cd usr/lib ; rm -rf libDtPrint.so )
( cd usr/lib ; ln -sf libDtPrint.so.1.0.0 libDtPrint.so )
( cd usr/lib ; rm -rf libDtPrint.so.1 )
( cd usr/lib ; ln -sf libDtPrint.so.1.0.0 libDtPrint.so.1 )
( cd usr/lib ; rm -rf libMrm.so.2 )
( cd usr/lib ; ln -sf libMrm.so.2.0.1 libMrm.so.2 )
( cd usr/lib ; rm -rf libXm.so.2 )
( cd usr/lib ; ln -sf libXm.so.2.0.1 libXm.so.2 )
( cd usr/lib ; rm -rf libXm.so )
( cd usr/lib ; ln -sf libXm.so.2.0.1 libXm.so )
( cd usr/lib/X11 ; rm -rf mwm )
( cd usr/lib/X11 ; ln -sf ../../../etc/X11/mwm mwm )
( cd usr/lib ; rm -rf libMrm.so )
( cd usr/lib ; ln -sf libMrm.so.2.0.1 libMrm.so )
( cd usr/lib ; rm -rf libUil.so )
( cd usr/lib ; ln -sf libUil.so.2.0.1 libUil.so )
( cd usr/lib ; rm -rf libUil.so.2 )
( cd usr/lib ; ln -sf libUil.so.2.0.1 libUil.so.2 )

while that should be :
Code:

( cd usr/lib ; rm -rf libDtPrint.so )
( cd usr/lib ; ln -sf libDtPrint.so.1.0.0 libDtPrint.so )
( cd usr/lib ; rm -rf libDtPrint.so.1 )
( cd usr/lib ; ln -sf libDtPrint.so.1.0.0 libDtPrint.so.1 )
( cd usr/lib ; rm -rf libMrm.so.2 )
( cd usr/lib ; ln -sf libMrm.so.2.0.1 libMrm.so.2 )
( cd usr/lib ; rm -rf libXm.so.2 )
( cd usr/lib ; ln -sf libXm.so.2.0.1 libXm.so.2 )
( cd usr/lib ; rm -rf libXm.so )
( cd usr/lib ; ln -sf libXm.so.2.0.1 libXm.so )
( cd usr/lib/X11 ; rm -rf mwm )
( cd usr/lib/X11 ; ln -sf ../../../etc/X11/mwm mwm )
( cd usr/lib ; rm -rf libMrm.so )
( cd usr/lib ; ln -sf libMrm.so.2.0.1 libMrm.so )
( cd usr/lib ; rm -rf libUil.so )
( cd usr/lib ; ln -sf libUil.so.2.0.1 libUil.so )
( cd usr/lib ; rm -rf libUil.so.2 )
( cd usr/lib ; ln -sf libUil.so.2.0.1 libUil.so.2 )

The following patch should solve the problem :
Code:

--- convertpkg-compat32.orig    2014-03-28 10:22:29.887609810 +0100
+++ convertpkg-compat32 2014-03-28 10:38:33.334339714 +0100
@@ -258,7 +258,7 @@
  fi
  # Only keep lines that deal with symlinks in bin/32 and lib directories:
  ( cat install/doinst.sh |grep -v "etc/ld.so.conf" \
-      |grep -E '(usr/bin |lib |lib/)' > install/doinst.sh.2
+      |grep -E '^[[:space:]]*[(].*(usr/bin |lib |lib/)' > install/doinst.sh.2
    cat install/doinst.sh.1 install/doinst.sh.2 \
      |sed -e 's#usr/bin#usr/bin/32#g' > install/doinst.sh
    rm -f install/doinst.sh.1 install/doinst.sh.2 ) || true

Hope this helps.

--
SeB

cwizardone 03-28-2014 09:32 AM

^^^
That it does! :)
Thank you very much for all your time and hard work!
:hattip:


All times are GMT -5. The time now is 11:30 PM.