You are not logged in.

#1 2009-08-11 14:28:30

warnec
Member
From: Poland
Registered: 2009-06-22
Posts: 166

Chromium cries for 32-bit libraries

Hi. I use Arch 64-bit and built chromium from AUR today. At first, launching "chrome" command told me there's no libjpeg.so.62, so I symlinked the 7th version of libjpeg as 62. Then it said it's 64-bit, and it needs 32:

[warnec@chakra ~]$ chrome
/usr/lib/chromium-browser/chromium-browser: error while loading shared libraries: libjpeg.so.62: wrong ELF class: ELFCLASS64
[warnec@chakra ~]$

I had a similar issue with my printer driver (where program looked for 32-bit libraries not in /opt/lib32/usr/lib, but in /usr/lib) and rebooting helped. So I symlinked 7th libjpeg to 6.2 libjpeg in /opt/lib32/usr/lib and rebooted. Still the same error.

Offline

#2 2009-08-11 14:31:17

jelly
Administrator
From: /dev/null
Registered: 2008-06-10
Posts: 714

Re: Chromium cries for 32-bit libraries

hmm symlinking isnt a nice solution for your problem after updates it get's messy. Maybe try a chroot

Offline

#3 2009-08-11 14:40:06

warnec
Member
From: Poland
Registered: 2009-06-22
Posts: 166

Re: Chromium cries for 32-bit libraries

How do I use it?  You mean:

[warnec@chakra ~]$ sudo chroot /opt/lib32 chrome

?
In that case, it gives:

chroot: cannot run command `chrome': No such file or directory

Offline

#4 2009-08-11 14:42:36

warnec
Member
From: Poland
Registered: 2009-06-22
Posts: 166

Re: Chromium cries for 32-bit libraries

Maybe I found something. In /usr/bin/chromium-browser it says:

# On x64, 32bit gtk2 is not looking for modules in the right place.
# Workaround it by setting GTK_PATH. We also backup the previous
# value of GTK_PATH into CHROMIUM_SAVED_GTK_PATH so that chromium
# can restore it before calling native x64 apps using xdg-open
# also at-spi bridge does not work and causes crashes; we disable
# this explicitly by setting NO_AT_BRIDGE
if [ -d /usr/lib32/gtk-2.0 ] ; then
  export CHROMIUM_SAVED_GTK_PATH=$GTK_PATH
  export GTK_PATH=/usr/lib32/gtk-2.0
  export NO_AT_BRIDGE=1
fi

But:

[warnec@chakra ~]$ /usr/bin/chromium-browser
/usr/lib/chromium-browser/chromium-browser: error while loading shared libraries: libjpeg.so.62: wrong ELF class: ELFCLASS64
[warnec@chakra ~]$

Offline

#5 2009-08-11 14:54:26

evr
Arch Linux f@h Team Member
Registered: 2009-01-23
Posts: 554

Re: Chromium cries for 32-bit libraries

don't you need the corresponding 32bit libraries installed?
probably lib32-libjpeg?

I agree that symlinking is a bad idea.

Offline

#6 2009-08-11 15:00:58

warnec
Member
From: Poland
Registered: 2009-06-22
Posts: 166

Re: Chromium cries for 32-bit libraries

I have lib32-libjpeg installed. In other case, there won't be any lib files in /opt/lib32/usr/lib/. That's the problem - Chromium looks for libraries in the wrong directory.

Offline

#7 2009-08-11 15:09:17

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,941
Website

Re: Chromium cries for 32-bit libraries

how does /usr/bin/chromium-browser looks up?
i see from aur build that is installing a custom wrapper. should be like this: http://aur.archlinux.org/packages/chrom … browser-64


Give what you have. To someone, it may be better than you dare to think.

Offline

#8 2009-08-11 15:37:25

warnec
Member
From: Poland
Registered: 2009-06-22
Posts: 166

Re: Chromium cries for 32-bit libraries

My chromium-browser:

#!/bin/sh

# Chromium launcher

# Authors:
#  Fabien Tassin <fta@sofaraway.org>
# License: GPLv2 or later

APPNAME=chromium-browser
LIBDIR=/usr/lib/chromium-browser
GDB=/usr/bin/gdb

usage () {
  echo "$APPNAME [-h|--help] [-g|--debug] [options] [url]"
  echo
  echo "        -g or --debug           Start within $GDB"
  echo "        -h or --help            This help screen"
  echo
  echo " Other supported options are:"
  MANWIDTH=80 man chromium-browser | sed -e '1,/OPTIONS/d; /ENVIRONMENT/,$d'
  echo " See 'man chromium-browser' for more details"
}

if [ -f /etc/$APPNAME/default ] ; then
  . /etc/$APPNAME/default
fi

# Prefer user defined CHROMIUM_USER_FLAGS (fron env) over system
# default CHROMIUM_FLAGS (from /etc/$APPNAME/default)
CHROMIUM_FLAGS=${CHROMIUM_USER_FLAGS:-"$CHROMIUM_FLAGS"}

# FFmpeg needs to know where its libs are located
if [ "Z$LD_LIBRARY_PATH" != Z ] ; then
  LD_LIBRARY_PATH=$LIBDIR:$LD_LIBRARY_PATH
else
  LD_LIBRARY_PATH=$LIBDIR
fi
export LD_LIBRARY_PATH

# On x64, 32bit gtk2 is not looking for modules in the right place.
# Workaround it by setting GTK_PATH. We also backup the previous
# value of GTK_PATH into CHROMIUM_SAVED_GTK_PATH so that chromium
# can restore it before calling native x64 apps using xdg-open
# also at-spi bridge does not work and causes crashes; we disable
# this explicitly by setting NO_AT_BRIDGE
if [ -d /usr/lib32/gtk-2.0 ] ; then
  export CHROMIUM_SAVED_GTK_PATH=$GTK_PATH
  export GTK_PATH=/usr/lib32/gtk-2.0
  export NO_AT_BRIDGE=1
fi

# For the Default Browser detection to work, we need to give access
# to xdg-settings. Also set CHROME_WRAPPER in case xdg-settings is
# not able to do anything useful
export PATH="$LIBDIR:$PATH"
export CHROME_WRAPPER=true

want_debug=0
while [ $# -gt 0 ]; do
  case "$1" in
    -h | --help | -help )
      usage
      exit 0 ;;
    -g | --debug )
      want_debug=1
      shift ;;
    -- ) # Stop option prcessing
      shift
      break ;;
    * )
      break ;;
  esac
done

if [ $want_debug -eq 1 ] ; then
  if [ ! -x $GDB ] ; then
    echo "Sorry, can't find usable $GDB. Please install it."
    exit 1
  fi
  tmpfile=`mktemp /tmp/chromiumargs.XXXXXX` || { echo "Cannot create temporary file" >&2; exit 1; }
  trap " [ -f \"$tmpfile\" ] && /bin/rm -f -- \"$tmpfile\"" 0 1 2 3 13 15
  echo "set args $CHROMIUM_FLAGS ${1+"$@"}" > $tmpfile
  echo "# Env:"
  echo "#     LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
  echo "#                PATH=$PATH"
  echo "#            GTK_PATH=$GTK_PATH"
  echo "# CHROMIUM_USER_FLAGS=$CHROMIUM_USER_FLAGS"
  echo "#      CHROMIUM_FLAGS=$CHROMIUM_FLAGS"
  echo "$GDB $LIBDIR/$APPNAME -x $tmpfile"
  $GDB "$LIBDIR/$APPNAME" -x $tmpfile
  exit $?
else
  exec $LIBDIR/$APPNAME $CHROMIUM_FLAGS "$@"
fi

Exporting the variables from here:
http://aur.archlinux.org/packages/chrom … browser-64

Didn't help. Same error message. I  built from here:

http://aur.archlinux.org/packages.php?ID=24266

not here:

http://aur.archlinux.org/packages.php?ID=26425

Don't know if it matters.

PS.: I don't have /opt/chromium-browser.

Last edited by warnec (2009-08-11 15:40:54)

Offline

#9 2009-08-11 15:40:08

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,941
Website

Re: Chromium cries for 32-bit libraries

what did you installed? use aur build http://aur.archlinux.org/packages.php?ID=26425 or if you prefer with google logo http://aur.archlinux.org/packages.php?ID=27031


Give what you have. To someone, it may be better than you dare to think.

Offline

#10 2009-08-11 15:42:31

warnec
Member
From: Poland
Registered: 2009-06-22
Posts: 166

Re: Chromium cries for 32-bit libraries

Ok, maybe I installed from wrong AUR site. I will use chromium-snapshot. But before that, tell me how to get rid of current chromium.

PS.:

 yaourt -R chromium-browser

Did the trick. Trying chromium-snapshot now.

Last edited by warnec (2009-08-11 16:04:43)

Offline

#11 2009-08-11 16:13:08

warnec
Member
From: Poland
Registered: 2009-06-22
Posts: 166

Re: Chromium cries for 32-bit libraries

chromium-snapshot works. Everything starts like a charm.

Offline

Board footer

Powered by FluxBB