protonscr

Steam fails to launch with Ubuntu 16.10 due to "wrong ELF class" error, worked in Ubuntu 16.04.1 LTS

steamclosed reviewed
ValveSoftware/steam-for-linux#4677 · opened 2016-10-22 by Spitfire1900 · updated 2017-11-02 · 20 comments · github
SSpitfire1900 2016-10-22 github

Your system information

  • Steam client version: steam-launcher 1.0.0.53
  • Distribution (e.g. Ubuntu): 16.10
  • Opted into Steam client beta?: No
  • Have you checked for system updates?: Yes

I am getting this error, the script below used to fix the libstdc++.so.6 dependency before upgrading to Ubuntu 16.10.

Script:
LD_PRELOAD='/usr/lib/x86_64-linux-gnu/libstdc++.so.6' DISPLAY=:0 steam

uname -a:
Linux mainstay 4.8.0-26-generic [#28](/issue/ValveSoftware/steam-for-linux/28)-Ubuntu SMP Tue Oct 18 14:39:52 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

Output:

Running Steam on ubuntu 16.10 64-bit
STEAM_RUNTIME is enabled automatically
/bin/bash: /home/kyle/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/lib/x86_64-linux-gnu/libtinfo.so.5: no version information available (required by /bin/bash)
grep: symbol lookup error: grep: undefined symbol: pcre_jit_stack_alloc
grep: symbol lookup error: grep: undefined symbol: pcre_jit_stack_alloc
grep: symbol lookup error: grep: undefined symbol: pcre_jit_stack_alloc
ERROR: ld.so: object '/usr/lib/x86_64-linux-gnu/libstdc++.so.6' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
Installing breakpad exception handler for appid(steam)/version(1476379980)
libGL error: unable to load driver: radeonsi_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: radeonsi
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast
SSpitfire1900 2016-10-22 github

I have tried with 32-bit lib as well.

kyle@mainstay:/etc/pam.d$ LD_PRELOAD='/usr/lib/i386-linux-gnu/libstdc++.so.6' DISPLAY=:0 steam
ERROR: ld.so: object '/usr/lib/i386-linux-gnu/libstdc++.so.6' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/usr/lib/i386-linux-gnu/libstdc++.so.6' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
...
ERROR: ld.so: object '/usr/lib/i386-linux-gnu/libstdc++.so.6' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
Running Steam on ubuntu 16.10 64-bit
ERROR: ld.so: object '/usr/lib/i386-linux-gnu/libstdc++.so.6' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
STEAM_RUNTIME is enabled automatically
ERROR: ld.so: object '/usr/lib/i386-linux-gnu/libstdc++.so.6' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/usr/lib/i386-linux-gnu/libstdc++.so.6' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/usr/lib/i386-linux-gnu/libstdc++.so.6' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/usr/lib/i386-linux-gnu/libstdc++.so.6' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/usr/lib/i386-linux-gnu/libstdc++.so.6' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/usr/lib/i386-linux-gnu/libstdc++.so.6' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
grep: symbol lookup error: grep: undefined symbol: pcre_jit_stack_alloc
/bin/bash: /home/kyle/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/lib/x86_64-linux-gnu/libtinfo.so.5: no version information available (required by /bin/bash)
grep: symbol lookup error: grep: undefined symbol: pcre_jit_stack_alloc
grep: symbol lookup error: grep: undefined symbol: pcre_jit_stack_alloc
Installing breakpad exception handler for appid(steam)/version(1476379980)
libGL error: unable to load driver: radeonsi_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: radeonsi
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast

Ggdrewb-valve maintainer 2016-10-22 github

Most likely the same Steam runtime incompatibility problems as in other 16.10 issues open here.

SSpitfire1900 2016-10-23 github

Followed https://bugs.archlinux.org/task/48994 and running the command
find ~/.local/share/Steam/ubuntu12_32/steam-runtime/ -name libgpg-error.so* -delete
to resolve the error
libGL: dlopen /usr/lib/xorg/modules/dri/radeonsi_dri.so failed (/usr/lib/libgcrypt.so.20: symbol gpgrt_lock_lock, version GPG_ERROR_1.0

Now Steam runs.

Startup script:
LD_PRELOAD='/usr/$LIB/libstdc++.so.6' DISPLAY=:0 steam

But now running into issue #4572.

Interestingly enough I did not get this error with my test install in VirtualBox.

Bbjwest 2016-10-23 github

Wondering if this is due to a previous Steam install. I've upgraded both my desktop and laptop with a clean install of 16.10 and decided to go with a clean install of Steam as well using the official package from Valve. I've only redownloaded one game (Civ V) to my desktop so far, but the download and install went fine and it streams great to my laptop. I haven't had any problems, but I've noticed Civ V seems to load and run quite a bit faster than before.

TTheOpenDevProject 2016-10-24 github

Here is my temporary fix.
rm ~/.steam/steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/libstdc++.so.6

Then make a script called steam.sh and always run steam through this script.

#!/bin/bash
export LD_PRELOAD='/usr/$LIB/libstdc++.so.6'
export DISPLAY=:0
steam

There should really be a patch that does this automatically in the steam binary.

Mmmstick 2016-10-24 github

This is working fine for me:

#!/bin/bash
glxinfo | grep OpenGL renderer | grep Mesa && \
    LD_PRELOAD='/usr/$LIB/libstdc++.so.6` DISPLAY=:0 steam || steam
SSpitfire1900 2016-10-25 github

@TheOpenDevProject and @mmstick , the problem file is libtinfo.so.5, not libstdc++.so.6

SSpitfire1900 2016-10-25 github

Is it known if deleting the ~/.local/share/Steam directory is the best way to do a clean re-install of Steam for a user?

Bboombatower 2016-10-27 github
steam --reset
Mmmstick 2016-10-27 github

@Spitfire1900 libstdc++, along with libxcb and libgpg-error is and has been the problem. It's well documented, and I verified this on an Ubuntu 16.10 system running the Gallium3D AMDGPU driver.

SSpitfire1900 2016-10-27 github

@mmstick
LD_PRELOAD='/usr/$LIB/libstdc++.so.6 /usr/$LIB/libgcc_s.so.1 /lib/i386-linux-gnu/libgpg-error.so.0'

resolved issues experienced (Steam runs) though "wrong ELF class: ELFCLASS32" appears repeatedly in console for libgcc_s.so.1 and libgpg-error.so.0.

Set LD_PRELOAD to '/usr/$LIB/libstdc++.so.6 /usr/$LIB/libgcc_s.so.1 /lib/$LIB/libgpg-error.so.0' and Steam will not start.

SSpitfire1900 2016-10-27 github

NVM, this occurs when attempting to launch Company of Heroes 2.

CompanyOfHeroes2: crash reporter initialised with path "/home/kyle/.local/share/feral-interactive/CompanyOfHeroes2/crashes"
libGL error: unable to load driver: radeonsi_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: radeonsi
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast
Mmkitti 2016-10-28 github

This gets the Steam client going for me on 15.10:

$ LD_PRELOAD='/usr/$LIB/libstdc++.so.6 /lib/${PLATFORM}-linux-gnu/libgcc_s.so.1 /usr/$LIB/libxcb.so.1 /lib/${PLATFORM}-linux-gnu/libgpg-error.so.0' /usr/bin/steam

Running Steam on ubuntu 15.10 64-bit
STEAM_RUNTIME is enabled automatically
ERROR: ld.so: object '/lib/${PLATFORM}-linux-gnu/libgcc_s.so.1' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/lib/${PLATFORM}-linux-gnu/libgpg-error.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ExecCommandLine: "/home/mkitti/.local/share/Steam/ubuntu12_32/steam -foreground"
SSpitfire1900 2016-11-20 github

Still looking into this problem. FYI @mkitti this error appears when I attempt the command you provided on 16.10. I do not know (and haven't been able to find documentation) on what the error LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored. actually means.

LD_PRELOAD='/usr/$LIB/libstdc++.so.6 /lib/${PLATFORM}-linux-gnu/libgcc_s.so.1 /usr/$LIB/libxcb.so.1 /lib/${PLATFORM}-linux-gnu/libgpg-error.so.0'; /usr/bin/steam
Running Steam on ubuntu 16.10 64-bit
STEAM_RUNTIME is enabled automatically
/bin/bash: /home/kyle/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/lib/x86_64-linux-gnu/libtinfo.so.5: no version information available (required by /bin/bash)
grep: symbol lookup error: grep: undefined symbol: pcre_jit_stack_alloc
grep: symbol lookup error: grep: undefined symbol: pcre_jit_stack_alloc
grep: symbol lookup error: grep: undefined symbol: pcre_jit_stack_alloc
ERROR: ld.so: object '/lib/${PLATFORM}-linux-gnu/libgcc_s.so.1' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/lib/${PLATFORM}-linux-gnu/libgpg-error.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
Installing breakpad exception handler for appid(steam)/version(1476379980)
libGL error: unable to load driver: radeonsi_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: radeonsi
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast

SSpitfire1900 2016-11-20 github

It appears that the system is not having a problem finding the files though. Which re-emphasizes the need to identify the exact nature of the "cannot open shared object file" error.

$ echo $LD_PRELOAD
/usr/$LIB/libstdc++.so.6 /lib/${PLATFORM}-linux-gnu/libgcc_s.so.1 /usr/$LIB/libxcb.so.1 /lib/${PLATFORM}-linux-gnu/libgpg-error.so.0
$ export LD_TRACE_LOADED_OBJECTS='true'
$ steam
        linux-vdso.so.1 =>  (0x00007fff075a5000)
        /usr/$LIB/libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f7badff6000)
        /lib/${PLATFORM}-linux-gnu/libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f7badddf000)
        /usr/$LIB/libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f7badbbd000)
        /lib/${PLATFORM}-linux-gnu/libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 (0x00007f7bad9a9000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f7bad5e2000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f7bad2d9000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f7bae37e000)
        libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007f7bad0d5000)
        libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f7bacecf000)
$ ls /lib/x86_64-linux-gnu/libgcc_s.so.1 /lib/x86_64-linux-gnu/libgpg-error.so.0
/lib/x86_64-linux-gnu/libgcc_s.so.1  /lib/x86_64-linux-gnu/libgpg-error.so.0

Added output of LD_DEBUG='all' when launching steam.
ld_debug_output.zip

Xxros 2016-12-21 github

I have the same issue here. I tried the commands above but with the same error.
OS: ubuntu 14.04 amd64
Intel HD graphics driver

Here's my guess. I use this method to look up missing dependencies of some libs.

missing dependencies: runtime for 32 bit CPU

cd ~/.local/share/Steam/ubuntu12_32
file * | grep ELF | cut -d: -f1 | LD_LIBRARY_PATH=. xargs ldd | grep 'not found' | sort | uniq
        libdbus-glib-1.so.2 => not found
        libnm-glib.so.4 => not found
        libnm-util.so.2 => not found
        libopenal.so.1 => not found
        libudev.so.0 => not found
        libusb-1.0.so.0 => not found
        libXtst.so.6 => not found

as you can see there are some missing dependencies.

Then I checked another folder using the same method

cd ~/.local/share/Steam/ubuntu12_32/steam-runtime/i386/lib/i386-linux-gnu
file * | grep ELF | cut -d ":" -f1 | LD_LIBRARY_PATH=. xargs ldd | grep 'not found'
# nothing retured : all right.

and

cd ~/.local/share/Steam/ubuntu12_32/steam-runtime/i386/usr/lib
file * | grep ELF | cut -d ":" -f1 | LD_LIBRARY_PATH=. xargs ldd | grep 'not found' | uniq
        libdbus-glib-1.so.2 => not found
        libdbusmenu-glib.so.4 => not found
        libdbusmenu-gtk.so.4 => not found
        libgudev-1.0.so.0 => not found
        libnspr4.so => not found
        libnss3.so => not found
        libsmime3.so => not found

missing dependencies: runtime for 64 bit CPU

cd ~/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/usr/lib/x86_64-linux-gnu
file * | grep ELF | cut -d: -f1 | LD_LIBRARY_PATH=. xargs ldd | grep 'not found' | sort | uniq
        libudev.so.0 => not found

Method from : https://wiki.archlinux.org/index.php/Steam/Troubleshooting#Steam_runtime_issues

Alternatively, while Steam is running, the following command will show which non-system libraries Steam is using (not all of these are part of the Steam runtime):
$ for i in $(pgrep steam); do sed '/\.local/!d;s/.* //g' /proc/$i/maps; done | sort | uniq

I think this is a general steam lib pain on Linux... I suggest Steam use static libs more often than using dynamic libs before driving users crazy...

Llegluondunet 2016-12-24 github

I just innstall Steam on Ubuntu 17.04 Zesty, same bug: Steam did not launch without any error message. I erased libgpg.so.0 files from /home/your_profile_name/.steam like described on this forum:
https://forum.manjaro.org/t/cannot-start-steam/1677
and Steam finally launched.

Kkisak-valve maintainer 2016-12-24 github

Hello, this issue is now being tracked in a unified issue report for steam runtime compatibility issues at #4768. Closing in favor of it.

RRandom12345a 2017-08-13 github

My similar problem was solved by the following thread:

http://steamcommunity.com/app/266510/discussions/0/2333276539593630905/

Specifically, STEAM_RUNTIME_PREFER_HOST_LIBRARIES=0 steam.

Bbernardosulzbach 2017-11-02 github

Specifically, STEAM_RUNTIME_PREFER_HOST_LIBRARIES=0 steam.

This fixed it for me after upgrading to Fedora 26. Thank you.

You can also change /usr/share/applications/steam.desktop to use a executable of your own to fix it.

Nothing extracted yet.