Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mesa does not work with STEAM_RUNTIME=1 #102

Open
darkbasic opened this issue May 7, 2014 · 11 comments
Open

mesa does not work with STEAM_RUNTIME=1 #102

darkbasic opened this issue May 7, 2014 · 11 comments

Comments

@darkbasic
Copy link

libGL error: dlopen /usr/lib32/dri/radeonsi_dri.so failed (/home/niko/.local/share/Steam/ubuntu12_32/steam-runtime/i386/lib/i386-linux-gnu/libgcc_s.so.1: version GCC_4.7.0' not found (required by /usr/lib32/dri/radeonsi_dri.so)) libGL error: unable to load driver: radeonsi_dri.so libGL error: driver pointer missing libGL error: failed to load driver: radeonsi libGL error: dlopen /usr/lib32/dri/swrast_dri.so failed (/home/niko/.local/share/Steam/ubuntu12_32/steam-runtime/i386/lib/i386-linux-gnu/libgcc_s.so.1: versionGCC_4.7.0' not found (required by /usr/lib32/dri/swrast_dri.so))
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast
ExecCommandLine: "/home/niko/.local/share/Steam/ubuntu12_32/steam"
System startup time: 15,89 seconds
libGL error: dlopen /usr/lib32/dri/radeonsi_dri.so failed (/home/niko/.local/share/Steam/ubuntu12_32/steam-runtime/i386/lib/i386-linux-gnu/libgcc_s.so.1: version GCC_4.7.0' not found (required by /usr/lib32/dri/radeonsi_dri.so)) libGL error: unable to load driver: radeonsi_dri.so libGL error: driver pointer missing libGL error: failed to load driver: radeonsi libGL error: dlopen /usr/lib32/dri/swrast_dri.so failed (/home/niko/.local/share/Steam/ubuntu12_32/steam-runtime/i386/lib/i386-linux-gnu/libgcc_s.so.1: versionGCC_4.7.0' not found (required by /usr/lib32/dri/swrast_dri.so))
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast

@anyc
Copy link
Owner

anyc commented May 10, 2014

Looks like he's prefering the libgcc_s.so.1 from the steam runtime instead of using the system library which /usr/lib32/dri/radeonsi_dri.so is linked against. What does a ldd /usr/lib32/dri/radeonsi_dri.so give you? Maybe preloading the right libgcc_s.so with LD_PRELOAD helps?

@Nowaker
Copy link

Nowaker commented May 13, 2014

It happens when mesa is compiled with gcc 4.9. It crashes my X.

@Nowaker
Copy link

Nowaker commented May 13, 2014

LD_PRELOAD=/usr/lib32/libgcc_s.so.1 steam works for me.

@V10lator
Copy link

@Nowaker To be fair it happens with every gcc version other than 4.7.0 (see also this part of the error: "version `GCC_4.7.0' not found"). This is most likely cause Ubuntu and SteamOS are compiled with that version. Anyway, your LD_PRELOAD trick seems to work even if the path seems to be wrong. I had to use:
LD_PRELOAD=/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.2/32/libgcc_s.so.1 STEAM_RUNTIME=1 steam

[EDIT]
The LD_PRELOAD trick does not work! Yes, the error message goes away but I can't start any game and am seeing this a lot:
ERROR: ld.so: object '/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.2/32/libgcc_s.so.1' from LD_PRELOAD cannot be preloaded: ignored.
[/EDIT]

@anyc I know this is from r600g and not radeonsi but beside that the problem is exactly the same, so I hope this helps:

$ ldd /usr/lib32/dri/r600_dri.so
    linux-gate.so.1 (0xf7766000)
    libelf.so.1 => /usr/lib32/libelf.so.1 (0xf6eb4000)
    libexpat.so.1 => /usr/lib32/libexpat.so.1 (0xf6e8a000)
    libpthread.so.0 => /lib32/libpthread.so.0 (0xf6e6e000)
    libdl.so.2 => /lib32/libdl.so.2 (0xf6e69000)
    libLLVM-3.4.so => /usr/lib32/libLLVM-3.4.so (0xf5ba5000)
    libdrm.so.2 => /usr/lib32/libdrm.so.2 (0xf5b98000)
    libdrm_radeon.so.1 => /usr/lib32/libdrm_radeon.so.1 (0xf5b8a000)
    libstdc++.so.6 => /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.2/32/libstdc++.so.6 (0xf5a98000)
    libm.so.6 => /lib32/libm.so.6 (0xf5a54000)
    libc.so.6 => /lib32/libc.so.6 (0xf58a3000)
    libgcc_s.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.2/32/libgcc_s.so.1 (0xf5889000)
    /lib/ld-linux.so.2 (0xf7767000)
    libz.so.1 => /lib32/libz.so.1 (0xf5871000)
    libffi.so.6 => /usr/lib32/libffi.so.6 (0xf5869000)
    libncurses.so.5 => /usr/lib32/libncurses.so.5 (0xf5818000)

@kode9
Copy link

kode9 commented May 16, 2014

Hey,

I was hoping to play don't starve with open source drivers but could not and found out this thread. I have the same issue than you V10lator :

Game update: AppID 219740 "Don't Starve", ProcID 1681, IP 0.0.0.0:0
ERROR: ld.so: object '/usr/lib32/libgcc_s.so.1' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/pluc/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/pluc/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
libGL error: dlopen /usr/lib32/xorg/modules/dri/radeonsi_dri.so failed (/home/pluc/.local/share/Steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /usr/lib32/libLLVM-3.4.so))
libGL error: unable to load driver: radeonsi_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: radeonsi
libGL error: dlopen /usr/lib32/xorg/modules/dri/swrast_dri.so failed (/home/pluc/.local/share/Steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /usr/lib32/libLLVM-3.4.so))
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast

ldd /home/pluc/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so                                                                                                                                                   linux-gate.so.1 (0xf77ac000)
libGL.so.1 => /usr/lib32/libGL.so.1 (0xf76d9000)
librt.so.1 => /usr/lib32/librt.so.1 (0xf76d0000)
libdl.so.2 => /usr/lib32/libdl.so.2 (0xf76cb000)
libstdc++.so.6 => /usr/lib32/libstdc++.so.6 (0xf75d7000)
libpthread.so.0 => /usr/lib32/libpthread.so.0 (0xf75b9000)
/usr/lib/ld-linux.so.2 (0xf77ad000)
libc.so.6 => /usr/lib32/libc.so.6 (0xf73f7000)
libglapi.so.0 => /usr/lib32/libglapi.so.0 (0xf73df000)
libXext.so.6 => /usr/lib32/libXext.so.6 (0xf73cc000)
libXdamage.so.1 => /usr/lib32/libXdamage.so.1 (0xf73c8000)
libXfixes.so.3 => /usr/lib32/libXfixes.so.3 (0xf73c1000)
libX11-xcb.so.1 => /usr/lib32/libX11-xcb.so.1 (0xf73be000)
libX11.so.6 => /usr/lib32/libX11.so.6 (0xf7287000)
libxcb-glx.so.0 => /usr/lib32/libxcb-glx.so.0 (0xf726e000)
libxcb-dri2.so.0 => /usr/lib32/libxcb-dri2.so.0 (0xf7268000)
libxcb-dri3.so.0 => /usr/lib32/libxcb-dri3.so.0 (0xf7263000)
libxcb-present.so.0 => /usr/lib32/libxcb-present.so.0 (0xf725f000)
libxcb-sync.so.1 => /usr/lib32/libxcb-sync.so.1 (0xf7258000)
libxcb.so.1 => /usr/lib32/libxcb.so.1 (0xf7234000)
libxshmfence.so.1 => /usr/lib32/libxshmfence.so.1 (0xf7231000)
libXxf86vm.so.1 => /usr/lib32/libXxf86vm.so.1 (0xf722a000)
libdrm.so.2 => /usr/lib32/libdrm.so.2 (0xf721c000)
libm.so.6 => /usr/lib32/libm.so.6 (0xf71d0000)
libgcc_s.so.1 => /usr/lib32/libgcc_s.so.1 (0xf71b5000)
libXau.so.6 => /usr/lib32/libXau.so.6 (0xf71b1000)
libXdmcp.so.6 => /usr/lib32/libXdmcp.so.6 (0xf71a9000)

I'm on archlinux

@Tele42
Copy link
Contributor

Tele42 commented May 19, 2014

This is a known issue with the steam runtime and is being tracked at ValveSoftware/steam-runtime#13 / ValveSoftware/steam-runtime#14. Newer mesa is using symbols that do not exist in the steam-runtime version of gcc.

@Tele42
Copy link
Contributor

Tele42 commented Aug 31, 2016

We could adapt

if [ "$(glxinfo | grep Mesa)" ]; then
    LD_PRELOAD='/usr/$LIB/libstdc++.so.6 /usr/$LIB/libgcc_s.so.1 /usr/$LIB/libxcb.so.1 /usr/$LIB/libgpg-error.so' exec "$LAUNCHSTEAMDIR/$STEAMBOOTSTRAP" "$@"
else
    exec "$LAUNCHSTEAMDIR/$STEAMBOOTSTRAP" "$@"
fi

(from ValveSoftware/steam-runtime#13 (comment)) to something suitable in /usr/bin/steam for this scenario. It'd not be ideal, but it would not be worse than what most Arch users experience.

I'm thinking a patch on /usr/bin/steam adding

#If using mesa and the steam runtime together, expect trouble, so try a workaround
if [ "$(glxinfo | grep Mesa)" ] && ["$STEAM_RUNTIME" == '1']; then
    LD_FIXUP="LD_PRELOAD='/usr/\$LIB/libstdc++.so.6 /usr/\$LIB/libgcc_s.so.1 /usr/\$LIB/libxcb.so.1 /usr/\$LIB/libgpg-error.so'"
else
    LD_FIXUP=""
fi

then in the last section

if [ "`command -v tee`" != "" ]; then
    mkdir -p --mode=777 /tmp/dumps
    exec $LD_FIXUP "$LAUNCHSTEAMDIR/$STEAMBOOTSTRAP" "$@" 2>&1 | tee "/tmp/dumps/${USER}_stdout.txt"
else
    exec $LD_FIXUP "$LAUNCHSTEAMDIR/$STEAMBOOTSTRAP" "$@"
fi

NOTE: this is probably the wrong syntax, I'm just pondering.

@darkbasic
Copy link
Author

Agree, it's incredibly annoying having to LD_PRELOAD tons of libs every time (Arch).

@gerddie
Copy link

gerddie commented Oct 21, 2017

Actually, when you put symbolic links to the path the correspond to multilib on Debian like

ln -s /usr/lib32 /usr/lib/i386-linux-gnu
ln -s /usr/lib /usr/lib/x86_64-linux-gnu

then the steam runtime will detect the newer libraries on the system and remove the older versions from the run-time.

@Tele42
Copy link
Contributor

Tele42 commented Oct 30, 2017

Fwiw, since STEAM_RUNTIME_PREFER_HOST_LIBRARIES=1 was added as the default, steam plus mesa does run with STEAM_RUNTIME=1, but we either need to LD_PRELOAD libstdc++.so.6 and have LIBGL_DRI3_DISABLE=1 set on first run, or delete libstdc++ and libxcb from the bootstrapper runtime, then it doesn't need other workarounds as long as steam doesn't do a reset.

@EoD
Copy link

EoD commented Nov 3, 2017

@Tele42 is this different than the idea from #193 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants