ValveSoftware / steam-for-linux

Issue tracking for the Steam for Linux beta client
4.25k stars 175 forks source link

Steam runtime libcurl-gnutls.so requires version info not found in system libs #6224

Open matthew-cline opened 5 years ago

matthew-cline commented 5 years ago

My system information

Issue details:

When trying to run the game Forager the game window only stays up for a fraction of a second before the game stops running. The problem seems to be that because of linking errors from the 64 bit Steam runtime version (Steam/ubuntu12_32/steam-runtime/amd64/usr/lib/x86_64-linux-gnu) of libcurl-gnutls.so:

$ ldd -r libcurl-gnutls.so.4.2.0

./libcurl-gnutls.so.4.2.0: /lib64/libldap_r-2.4.so.2: no version information available (required by ./libcurl-gnutls.so.4.2.0)
./libcurl-gnutls.so.4.2.0: /lib64/liblber-2.4.so.2: no version information available (required by ./libcurl-gnutls.so.4.2.0)

I was able to fix the problem by overwriting the Steam runtime copy of libcurl-gnutls.so.4.2.0 with my systems copy of /lib64/libcurl.so.4.5.0

Steps for reproducing this issue:

  1. Install and run Forager on Fedora.
kisak-valve commented 5 years ago

Hello @matthew-cline, these messages are generally harmless. Is there a functional issue you're encountering with this game?

matthew-cline commented 5 years ago

@kisak-valve Sorry, I left out that this prevents the game from running (game window only stays open for an instant), and the game runs perfectly fine once I replace the runtime library with the system library. I didn't include that in the description because I thought linking errors always prevented the game from running.

I've updated the issue description to include that it prevents the game from running.

smcv commented 5 years ago

Presumably libldap and liblber have Debian-specific versioned symbols that weren't adopted upstream. libcurl-gnutls is itself Debian-specific (it's libcurl, adapted to use GNUTLS instead of OpenSSL for legal reasons) so it's unsurprising that you don't have a system copy on a non-Debian-derived host OS.

Possible solutions include:

It's also possible that the linking warnings are not the real problem, and some other bug involving libcurl is preventing the game from running.

smcv commented 5 years ago

If you put back the Steam Runtime copy of libcurl-gnutls.so.4.2.0 (unpack it from steam-runtime.tar.xz), and create symlinks libldap_r-2.4.so.2 and liblber-2.4.so.2 in Steam/ubuntu12_32/steam-runtime/pinned_libs_64 like this:

cd /path/to/Steam/ubuntu12_32/steam-runtime/pinned_libs_64
ln -fns ../amd64/usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2 .
ln -fns ../amd64/usr/lib/x86_64-linux-gnu/liblber-2.4.so.2 .

does that fix Forager?

matthew-cline commented 5 years ago

That did not fix them problem, but it no longer complains about the lacking version info, so I guess that wasn't the problem. Here is the gist of Steam's output once I launch Forager.

smcv commented 5 years ago

Looks like there is some other crash not related to the versioned symbols.

You seem to be using the unofficial Flatpak package for Steam, not running it directly on the Fedora 29 host system. Is that correct? (If so, the game will be seeing the libraries from org.freedesktop.Platform, not from Fedora.)

matthew-cline commented 5 years ago

Forager won't run under Flatpak, so I have to launch it via the RPM Fusion package, which re-pins stuff if the previous run of Steam was under Flatpak.

tacticalgoose commented 5 years ago

Forager won't run under Flatpak, so I have to launch it via the RPM Fusion package, which re-pins stuff if the previous run of Steam was under Flatpak.

does this make the game work on Flatpak, if so how does one launch it with RPM Fusion package?

TTimo commented 5 years ago

We did a bit of investigation on our end, and it appears that the Forager binary needs a libcurl-gnutls.so.4 library that is not compatible with the one provided in the steam runtime (the libcurl-gnutls package in Arch will work, for instance)

At this time we are not pinning libcurl-gnutls.so.4 to the version in the steam runtime, but we may have to since it's clear there are ABI-incompatible versions of it floating out there. Unfortunately that would make the problem with Forager worse and require a game specific workaround.

This is likely happening because the Forager binary was not compiled against the steam runtime. My understanding is that it's a GameMaker title so maybe it's a more general GameMaker issue. To be continued..

matthew-cline commented 5 years ago

@tacticalgoose Sorry, I didn't mean that the RPM Fusion package makes it work within Flatpak. What I mean is that I've set up enough symbolic links so that I can run the Steam launcher as a normal non-containerized process (which is where the RPM Fusion package comes in) and run it in a Flatpak container. So far I've been unable to figure out how to get Forager to work within Flatpak.

nanonyme commented 5 years ago

@TTimo in context of Flathub Flatpak app, please keep me in the loop if we have library conflicts. There's now a system in place that allows us to tweak on game level which libraries to prevent from loading but we need informed decision on what to do and some paths to use as anchors.

TTimo commented 5 years ago

@nanonyme can you reach out to me directly via PM or email? (@TTimo on twitter - I added you)

goertzenator commented 2 years ago

This is happening with the Arma Reforger dedicated server under NixOS. It fails with the error...

$ steam-run ./ArmaReforgerServer -listScenarios
./ArmaReforgerServer: /steamrt/amd64/usr/lib/x86_64-linux-gnu/libcurl.so.4: version `CURL_OPENSSL_4' not found (required by ./ArmaReforgerServer)

The command steam-run sets up the Steam runtime which is coming from https://repo.steampowered.com/steamrt-images-scout/snapshots/0.20211102.0/steam-runtime.tar.xz . I recognize this is not the newest one, but both this one and the newest one present libcurls with the symbol CURL_OPENSSL_3.

A comment above suggests that these problems are caused by not being compiled against the steam runtime. I suspect that is true here and is something the makers of ArmaReforgerServer ought to fix.

To reproduce this under Nix/NixOS:

mkdir reforger
cd reforger
nix-shell -p steamcmd steam-run
steamcmd +force_install_dir /home/yourhomedir/reforger +login anonymous anonymous +app_update 1874900 +quit
steam-run ./ArmaReforgerServer -listScenarios
nanonyme commented 2 years ago

@goertzenator note original problem was not about libcurl but libcurl-gnutls. Curl can be built against various crypto implementations and typically it is these days built against OpenSSL. This game expects a libcurl that is built against GnuTLS. If you're super-lucky, the curl's may be interchangeable but in general you should assume they're not.

smcv commented 2 years ago
./ArmaReforgerServer: /steamrt/amd64/usr/lib/x86_64-linux-gnu/libcurl.so.4: version `CURL_OPENSSL_4' not found (required by ./ArmaReforgerServer)

@goertzenator: As @nanonyme said, this is not the same problem as the one that was originally reported here. Please open a separate issue in https://github.com/ValveSoftware/steam-runtime for the ArmaReforgerServer issue, to avoid mixing it up with this one.

This is probably something that the Arma developers should be solving, but it's probably also possible to find a workaround.