steam-runtime icon indicating copy to clipboard operation
steam-runtime copied to clipboard

failed to dlopen engine_client.so error=/lib64/libcurl-gnutls.so.4: version `CURL_GNUTLS_3' not found

Open AngryPenguinPL opened this issue 3 years ago • 16 comments

Your system information

  • Steam Runtime Version: steam-runtime_0.20220802.0
  • Distribution (e.g. Ubuntu 18.04): OpenMandriva Cooker
  • Link to your full system information (Help -> System Information) in a Gist:
  • Have you checked for system updates?: [Yes]
  • What compatibility tool are you using?: [Steam Linux Runtime ]
  • If you are using Steam Linux Runtime for native Linux games: What versions are listed in SteamLinuxRuntime/VERSIONS.txt? steam-runtime_0.20220802.0

Please describe your issue in as much detail as possible:

I haven't played in a while so I don't know when this problem appeared. The problem is that when I try to run some native games like CS: GO or DyingLight, nothing happens. In the terminal, however, I see an error saying that

failed to dlopen engine_client.so error=/lib64/libcurl-gnutls.so.4: version `CURL_GNUTLS_3' not found (required by /media/x/580693EF0693CBFE/Steam/steamapps/common/Counter-Strike Global Offensive/bin/linux64/engine_client.so)
AppFramework : Unable to load module engine_client.so!
Unable to load interface VCvarQuery001 from engine_client.so, requested from EXE.

Here is a log from starting Dying Light (native):

Game process added : AppID 239140 "/home/x/.local/share/Steam/ubuntu12_32/reaper SteamLaunch AppId=239140 -- /home/x/.local/share/Steam/ubuntu12_32/steam-launch-wrapper -- '/media/x/ssd/Steam/steamapps/common/Dying Light/DyingLightGame'", ProcID 14311, IP 0.0.0.0:0
chdir /media/x/ssd/Steam/steamapps/common/Dying Light
ERROR: ld.so: object '/home/x/.steam/bin32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
GameAction [AppID 239140, ActionID 2] : LaunchApp changed task to WaitingGameWindow with ""
ERROR: ld.so: object '/home/x/.steam/bin32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/home/x/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
ERROR: ld.so: object '/home/x/.steam/bin32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
GameAction [AppID 239140, ActionID 2] : LaunchApp changed task to Completed with ""
ERROR: ld.so: object '/home/x/.steam/bin32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
/media/x/ssd/Steam/steamapps/common/Dying Light/DyingLightGame: /lib64/libcurl-gnutls.so.4: version `CURL_GNUTLS_3' not found (required by libengine.so)
Game process removed: AppID 239140 "/home/x/.local/share/Steam/ubuntu12_32/reaper SteamLaunch AppId=239140 -- /home/x/.local/share/Steam/ubuntu12_32/steam-launch-wrapper -- '/media/x/ssd/Steam/steamapps/common/Dying Light/DyingLightGame'", ProcID 14311 
ThreadGetProcessExitCode: no such process 14312

A few months ago these games worked fine for me. I do not know what happened

Trying also remove and install again Steam and error was same.

Also after remove steam linux runtime, steam client after next launch rebuild whole runtime again but issue is still here

Here is the log from rebuild runtime and an attempt to run CS:GO https://gist.github.com/AngryPenguinPL/7e684a1de26cf05e57aeab53d769bd3c

Steps for reproducing this issue:

  1. Run CSGO or Dying Light in native mode
  2. See error log

AngryPenguinPL avatar Sep 25 '22 16:09 AngryPenguinPL

The root cause of this is a historical incompatibility between libcurl in Debian/Ubuntu and libcurl everywhere else, which we have to work around. The Steam Runtime is based on Debian/Ubuntu.

From your log, it looks as though setup.sh is correctly setting up games to use the Steam Runtime's libcurl for the more commonly-used (OpenSSL) variant of libcurl:

steam.sh[5987]: STEAM_RUNTIME is enabled automatically ... setup.sh[6190]: Forced use of runtime version for 32-bit libcurl.so.4. Host: 4.8.0 Runtime: 4.2.0 setup.sh[6190]: Forced use of runtime version for 64-bit libcurl.so.4. Host: 4.8.0 Runtime: 4.2.0

but this particular game is using the GNUTLS variant of libcurl instead, which doesn't get this special handling:

failed to dlopen engine_client.so error=/lib64/libcurl-gnutls.so.4: version `CURL_GNUTLS_3' not found (required by /media/x/580693EF0693CBFE/Steam/steamapps/common/Counter-Strike Global Offensive/bin/linux64/engine_client.so)

@TTimo, do you know whether this is something that has changed in CS:GO recently? I thought most Steam games used OpenSSL libcurl (libcurl.so.*) rather than the much less widely-used GNUTLS libcurl (libcurl-gnutls.so.*)?

smcv avatar Sep 26 '22 13:09 smcv

From the system info report:

        "libcurl-gnutls.so.4" : {
          "soname" : "libcurl.so.4",
          "path" : "/lib64/libcurl-gnutls.so.4",
          "issues" : [
            "missing-symbols",
            "misversioned-symbols"
          ],
          "missing-symbols" : [
            "curl_jmpenv@CURL_GNUTLS_3"
          ],
          "misversioned-symbols" : [
            "curl_easy_cleanup@CURL_GNUTLS_3",
            (and many more)

This is the same incompatibility that I described in the previous comment.

smcv avatar Sep 26 '22 13:09 smcv

Workaround 1: if you go into the Properties for CS:GO and go to "Compatibility", "Force the use of a specific Steam Play compatibility tool", "Steam Linux Runtime", then that might work around this.

Workaround 2: if it is possible to remove the package that provides /lib64/libcurl-gnutls.so.4, then you could try doing that. Obviously don't do this if other system packages depend on it - I don't know whether OpenMandriva mostly uses libcurl.so.4 (the OpenSSL variant) or libcurl-gnutls.so.4 (the GNUTLS variant) for system libraries that want libcurl.

smcv avatar Sep 26 '22 13:09 smcv

What compatibility tool are you using?: [Steam Linux Runtime ]

I don't think this is true: from your log, I think you are using the older "Steam Runtime" LD_LIBRARY_PATH-based runtime for these games, not the newer "Steam Linux Runtime" container-based runtime.

(We really need less confusing names for these!)

smcv avatar Sep 26 '22 13:09 smcv

Run CSGO or Dying Light in native mode

@AngryPenguinPL, please describe in more detail what you mean by "native mode"? There are several things that different people mean when they say "native", and I want to check which one you mean.

smcv avatar Sep 26 '22 13:09 smcv

@AngryPenguinPL, please could you test a potential fix for this?

  • Completely exit from Steam
  • Replace ~/.steam/root/ubuntu12_32/steam-runtime/setup.sh with https://raw.githubusercontent.com/smcv/steam-runtime/384633b562dfebc6b6e0f0783da2dfdf7e6ff44f/templates/setup.sh (taken from my branch)
  • Make sure it is executable: chmod +x ~/.steam/root/ubuntu12_32/steam-runtime/setup.sh
  • Run: ~/.steam/root/ubuntu12_32/steam-runtime/setup.sh --force
    • You should see a message like this: Forced use of runtime version for 64-bit libcurl-gnutls.so.4. Host: 4.x.y Runtime: 4.2.0
  • Run Steam again
  • Try to run one of the affected games, without overriding the compatibility tool to "Steam Linux Runtime"

The game should hopefully launch successfully.

If this test is successful, we can include the updated setup.sh in a future Steam update.

If this test is not successful, you can return to the production version of the Steam Runtime like this:

  • Completely exit from Steam
  • Remove ~/.steam/root/ubuntu12_32/steam-runtime
  • Run Steam again

and then try one of the workarounds from https://github.com/ValveSoftware/steam-runtime/issues/535#issuecomment-1258072215.

smcv avatar Sep 27 '22 12:09 smcv

Hi. Thanks for reply.

I don't think this is true: from your log, I think you are using the older "Steam Runtime" LD_LIBRARY_PATH-based runtime for these games, not the newer "Steam Linux Runtime" container-based runtime. (We really need less confusing names for these!)

Yes, that's what I meant.

@AngryPenguinPL, please describe in more detail what you mean by "native mode"? There are several things that different people mean when they say "native", and I want to check which one you mean.

I mean "Native" that runs without any compatibility layers. Without a proton or Steam Linux Runtime container-based runtime.

Workaround 1 (force the use of a specific Steam Play compatibility tool", "Steam Linux Runtime) works for me. Workaround 2 require remove few packages but it is possible. CS:GO works after removing libcurl-gnutls.so.4.

Solution with setup.py


[x@openmandriva-cooker steam-runtime]$ ./setup.sh --force
Failed to create wl_display (No such file or directory)
qt.qpa.plugin: Could not load the Qt platform plugin "wayland" in "" even though it was found.
setup.sh[29807]: Forced use of runtime version for 32-bit libdbus-1.so.3. Host: 3.32.0 Runtime: 3.5.8
setup.sh[29807]: Found newer runtime version for 32-bit libGLU.so.1. Host: 1.3.1 Runtime: 1.3.8004
setup.sh[29807]: Forced use of runtime version for 32-bit libcurl.so.4. Host: 4.8.0 Runtime: 4.2.0
setup.sh[29807]: Found newer runtime version for 64-bit libGLU.so.1. Host: 1.3.1 Runtime: 1.3.8004
setup.sh[29807]: Forced use of runtime version for 64-bit libcurl.so.4. Host: 4.8.0 Runtime: 4.2.0
setup.sh[29807]: Found newer runtime version for 64-bit libdbusmenu-glib.so.4. Host: 4.0.12 Runtime: 4.0.13
[x@openmandriva-cooker steam-runtime]$ 

What is strange I dont see anything related to libcurl-gnutls.so.4, so looks like smth is wrongbut after that i tried to run csgo and dying light but both games failed with same error.

This is log from running Steam (after apply setup.py) and trying launch CS:GO and after that also Dying Light https://gist.github.com/AngryPenguinPL/519f85cd50677f20e1153a831f694bc7

AngryPenguinPL avatar Sep 27 '22 13:09 AngryPenguinPL

What is strange I dont see anything related to libcurl-gnutls.so.4, so looks like smth is wrong

Yes, this seems wrong. Are you sure you were using the version of setup.sh that I linked? It should include this change.

This is not included in current versions of Steam, so you will have to download it yourself.

smcv avatar Sep 27 '22 13:09 smcv

If the modified setup.sh is not working, please try running it as

STEAM_RUNTIME_VERBOSE=1 ~/.steam/root/ubuntu12_32/steam-runtime/setup.sh --force > issue535.log 2>&1

and then attach issue535.log or send it as a Gist.

smcv avatar Sep 27 '22 13:09 smcv

Yes I downloaded the file from the link, copied it to the correct dir and gave it execute rights.

Proof:

Screenshot_20220927_163648

Here is issue535.log issue535.log

AngryPenguinPL avatar Sep 27 '22 14:09 AngryPenguinPL

If the package that provides libcurl-gnutls is this one https://openmandriva.pkgs.org/4.3/openmandriva-main-release-x86_64/lib64curl-gnutls4-7.81.0-1-omv4050.x86_64.rpm.html, then its content is:

❯ ls -la usr/lib64
lrwxrwxrwx 1 ryuzaki ryuzaki     16 Sep 27 16:58 libcurl-gnutls.so.4 -> libcurl.so.4.7.0
-rwxr-xr-x 1 ryuzaki ryuzaki 593736 Jan  6  2022 libcurl-gnutls.so.4.7.0

And libcurl-gnutls.so.4.7.0 has a DT_SONAME of libcurl.so.4.

That should explain why setup.sh doesn't have any reference to libcurl-gnutls.so.4 in the host_libraries_64 array. This makes the setup to continue to the next library before being able to force the runtime's libcurl-gnutls.so.4.

RyuzakiKK avatar Sep 27 '22 15:09 RyuzakiKK

Yes, I was also coming to that conclusion. That doesn't seem right: the SONAME that's written into the library should probably be libcurl-gnutls.so.4. If the SONAMEs of both the OpenSSL variant of libcurl and the GNUTLS variant of libcurl are set to libcurl.so.4, then programs will use one or the other, arbitrarily (ldconfig will not reliably choose the same one!), which is likely to cause compatibility issues.

We can work around this in setup.sh by unconditionally pinning these libraries, whether we think the host system has them or not. I'm working on an updated setup.sh with that change.

smcv avatar Sep 27 '22 15:09 smcv

@AngryPenguinPL, please retry with this setup.sh: https://raw.githubusercontent.com/smcv/steam-runtime/1f523501bc50579307d1e178cbabe1855e3b361a/templates/setup.sh

As before, you'll need to run it as .../setup.sh --force for this change to take effect.

smcv avatar Sep 27 '22 16:09 smcv

I'm the maintainer of the OpenMandriva curl package -- thanks for spotting the issue of ldconfig overwriting the libcurl-gnutls.so.4 symlink. I've fixed this in the 7.85.0-1 package. I don't have either of the games mentioned, so can't verify that fixes it, but it looks right now.

[bero@c64 ~]$ ls -l /usr/lib64/libcurl-gnutls.so*
lrwxrwxrwx 1 root root     23 Sep 28 00:49 /usr/lib64/libcurl-gnutls.so.4 -> libcurl-gnutls.so.4.8.0
-rwxr-xr-x 1 root root 802328 Sep 28 00:49 /usr/lib64/libcurl-gnutls.so.4.8.0
[bero@c64 ~]$ readelf -d /usr/lib64/libcurl-gnutls.so.4 |grep soname
 0x000000000000000e (SONAME)             Library soname: [libcurl-gnutls.so.4]

berolinux avatar Sep 27 '22 23:09 berolinux

@AngryPenguinPL, please retry with this setup.sh: https://raw.githubusercontent.com/smcv/steam-runtime/1f523501bc50579307d1e178cbabe1855e3b361a/templates/setup.sh

As before, you'll need to run it as .../setup.sh --force for this change to take effect.

Yes, I can confirm that this works.


[x@openmandriva-cooker ~]$ ~/.steam/root/ubuntu12_32/steam-runtime/setup.sh --force
Failed to create wl_display (No such file or directory)
qt.qpa.plugin: Could not load the Qt platform plugin "wayland" in "" even though it was found.
setup.sh[4987]: Forced use of runtime version for 32-bit libdbus-1.so.3
setup.sh[4987]: Found newer runtime version for 32-bit libGLU.so.1. Host: 1.3.1 Runtime: 1.3.8004
setup.sh[4987]: Forced use of runtime version for 32-bit libcurl-gnutls.so.4
setup.sh[4987]: Forced use of runtime version for 32-bit libcurl.so.4
setup.sh[4987]: Forced use of runtime version for 32-bit libdbusmenu-glib.so.4
setup.sh[4987]: Forced use of runtime version for 32-bit libdbusmenu-gtk.so.4
setup.sh[4987]: Forced use of runtime version for 32-bit libgtk-x11-2.0.so.0
setup.sh[4987]: Found newer runtime version for 64-bit libGLU.so.1. Host: 1.3.1 Runtime: 1.3.8004
setup.sh[4987]: Forced use of runtime version for 64-bit libcurl-gnutls.so.4
setup.sh[4987]: Forced use of runtime version for 64-bit libcurl.so.4
setup.sh[4987]: Found newer runtime version for 64-bit libdbusmenu-glib.so.4. Host: 4.0.12 Runtime: 4.0.13
[x@openmandriva-cooker ~]$ 

and both CS:GO and DyingLight works.

Thanks

AngryPenguinPL avatar Sep 28 '22 13:09 AngryPenguinPL

Yes, I can confirm that this works.

Thanks! This change should go out in a future Steam beta.

For anyone else experiencing this issue, the least intrusive workaround until then is likely to be: open Steam's Properties window for the affected games and go to "Compatibility", "Force the use of a specific Steam Play compatibility tool", and choose "Steam Linux Runtime".

smcv avatar Sep 28 '22 14:09 smcv

This change should go out in a future Steam beta.

It was included in the Steam client beta branch on 2022-10-21 or earlier, and should be included in the next big update for users of the general-availability branch (I don't know when that will happen).

smcv avatar Oct 24 '22 11:10 smcv