steamtricks / steamtricks-data

steamtricks companion data repository
https://github.com/steamtricks/steamtricks/wiki
GNU General Public License v2.0
5 stars 1 forks source link

MadMax libssl and libcurl workaround #1

Open boombatower opened 8 years ago

boombatower commented 8 years ago

Issue:

~/.local/share/Steam/steamapps/common/Mad Max/bin/MadMax: relocation error: ~/.local/share/Steam/steamapps/common/Mad Max/bin/../lib/x86_64/libcurl.so.4: symbol ENGINE_load_builtin_engines, version OPENSSL_1.0.0 not defined in file libcrypto.so.1.0.0 with link time reference

As documented a workaround:

mv ~/.local/share/Steam/ubuntu12_32/steam-runtime/i386/lib/i386-linux-gnu/libcrypto.so.1.0.0 ~/.local/share/Steam/ubuntu12_32/steam-runtime/i386/lib/i386-linux-gnu/libcrypto.so.1.0.0_bak
mv ~/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/lib/x86_64-linux-gnu/libcrypto.so.1.0.0 ~/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/lib/x86_64-linux-gnu/libcrypto.so.1.0.0_bak
mv ~/.local/share/Steam/ubuntu12_32/steam-runtime/i386/lib/i386-linux-gnu/libssl.so.1.0.0 ~/.local/share/Steam/ubuntu12_32/steam-runtime/i386/lib/i386-linux-gnu/libssl.so.1.0.0_bak
mv ~/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/lib/x86_64-linux-gnu/libssl.so.1.0.0 ~/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/lib/x86_64-linux-gnu/libssl.so.1.0.0_bak

ldd output:

mfoxdogg@LINUX-4OBW:~/.steam/steam/steamapps/common/Mad Max> ldd bin/MadMax 
bin/MadMax: /lib64/libcrypto.so.1.0.0: no version information available (required by bin/MadMax)
bin/MadMax: /usr/lib64/libldap_r-2.4.so.2: no version information available (required by /home/mfoxdogg/.local/share/Steam/steamapps/common/Mad Max/bin/../lib/x86_64/libcurl.so.4)
bin/MadMax: /usr/lib64/liblber-2.4.so.2: no version information available (required by /home/mfoxdogg/.local/share/Steam/steamapps/common/Mad Max/bin/../lib/x86_64/libcurl.so.4)
bin/MadMax: /lib64/libssl.so.1.0.0: no version information available (required by /home/mfoxdogg/.local/share/Steam/steamapps/common/Mad Max/bin/../lib/x86_64/libcurl.so.4)
bin/MadMax: /lib64/libssl.so.1.0.0: no version information available (required by /home/mfoxdogg/.local/share/Steam/steamapps/common/Mad Max/bin/../lib/x86_64/libcurl.so.4)
bin/MadMax: /lib64/libcrypto.so.1.0.0: no version information available (required by /home/mfoxdogg/.local/share/Steam/steamapps/common/Mad Max/bin/../lib/x86_64/libcurl.so.4)
        linux-vdso.so.1 (0x00007ffd7f1e0000)
        libicui18n.so.51 => /home/mfoxdogg/.local/share/Steam/steamapps/common/Mad Max/bin/../lib/x86_64/libicui18n.so.51 (0x00007f482093a000)
        libicuuc.so.51 => /home/mfoxdogg/.local/share/Steam/steamapps/common/Mad Max/bin/../lib/x86_64/libicuuc.so.51 (0x00007f4820587000)
        libicudata.so.51 => /home/mfoxdogg/.local/share/Steam/steamapps/common/Mad Max/bin/../lib/x86_64/libicudata.so.51 (0x00007f481ee3d000)
        libCoreFoundation.so.476 => /home/mfoxdogg/.local/share/Steam/steamapps/common/Mad Max/bin/../lib/x86_64/libCoreFoundation.so.476 (0x00007f481ea96000)
        libcurl.so.4 => /home/mfoxdogg/.local/share/Steam/steamapps/common/Mad Max/bin/../lib/x86_64/libcurl.so.4 (0x00007f481e828000)
        libvorbis.so.0 => /usr/lib64/libvorbis.so.0 (0x00007f481e5b8000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f481e39b000)
        librt.so.1 => /lib64/librt.so.1 (0x00007f481e192000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007f481df8e000)
        libSDL2-2.0.so.0 => /usr/lib64/libSDL2-2.0.so.0 (0x00007f481dc91000)
        libSDL2_image-2.0.so.0 => /usr/lib64/libSDL2_image-2.0.so.0 (0x00007f481da6d000)
        libz.so.1 => /lib64/libz.so.1 (0x00007f481d857000)
        libcrypto.so.1.0.0 => /lib64/libcrypto.so.1.0.0 (0x00007f481d463000)
        libcef.so => /home/mfoxdogg/.local/share/Steam/steamapps/common/Mad Max/bin/../lib/x86_64/libcef.so (0x00007f48194a3000)
        libpdf.so => /home/mfoxdogg/.local/share/Steam/steamapps/common/Mad Max/bin/../lib/x86_64/libpdf.so (0x00007f48188bb000)
        libfreetype.so.6 => /usr/lib64/libfreetype.so.6 (0x00007f4818624000)
        libfontconfig.so.1 => /usr/lib64/libfontconfig.so.1 (0x00007f48183e6000)
        libm.so.6 => /lib64/libm.so.6 (0x00007f48180e5000)
        libgomp.so.1 => /usr/lib64/libgomp.so.1 (0x00007f4817ec2000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f4817b19000)
        /lib64/ld-linux-x86-64.so.2 (0x00005625e9357000)
        libuuid.so.1 => /usr/lib64/libuuid.so.1 (0x00007f4817914000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f48176fd000)
        libidn.so.11 => /usr/lib64/libidn.so.11 (0x00007f48174c8000)
        librtmp.so.0 => not found
        libssl.so.1.0.0 => /lib64/libssl.so.1.0.0 (0x00007f4817260000)
        libgssapi_krb5.so.2 => /usr/lib64/libgssapi_krb5.so.2 (0x00007f4817017000)
        libkrb5.so.3 => /usr/lib64/libkrb5.so.3 (0x00007f4816d46000)
        libk5crypto.so.3 => /usr/lib64/libk5crypto.so.3 (0x00007f4816b16000)
        libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00007f4816911000)
        liblber-2.4.so.2 => /usr/lib64/liblber-2.4.so.2 (0x00007f4816702000)
        libldap_r-2.4.so.2 => /usr/lib64/libldap_r-2.4.so.2 (0x00007f48164ac000)
        libogg.so.0 => /usr/lib64/libogg.so.0 (0x00007f48162a4000)
        libasound.so.2 => /usr/lib64/libasound.so.2 (0x00007f4815fb6000)
        libpng16.so.16 => /usr/lib64/libpng16.so.16 (0x00007f4815d79000)
        libjpeg.so.8 => /usr/lib64/libjpeg.so.8 (0x00007f4815b23000)
        libtiff.so.5 => /usr/lib64/libtiff.so.5 (0x00007f48158ad000)
        libwebp.so.5 => /usr/lib64/libwebp.so.5 (0x00007f481564e000)
        libgobject-2.0.so.0 => /usr/lib64/libgobject-2.0.so.0 (0x00007f48153fc000)
        libglib-2.0.so.0 => /usr/lib64/libglib-2.0.so.0 (0x00007f48150ed000)
        libpangocairo-1.0.so.0 => /usr/lib64/libpangocairo-1.0.so.0 (0x00007f4814ee0000)
        libcairo.so.2 => /usr/lib64/libcairo.so.2 (0x00007f4814bbd000)
        libpango-1.0.so.0 => /usr/lib64/libpango-1.0.so.0 (0x00007f4814972000)
        libX11.so.6 => /usr/lib64/libX11.so.6 (0x00007f4814634000)
        libXi.so.6 => /usr/lib64/libXi.so.6 (0x00007f4814423000)
        libnss3.so => /usr/lib64/libnss3.so (0x00007f4814100000)
        libnssutil3.so => /usr/lib64/libnssutil3.so (0x00007f4813ed2000)
        libsmime3.so => /usr/lib64/libsmime3.so (0x00007f4813caa000)
        libplc4.so => /usr/lib64/libplc4.so (0x00007f4813aa5000)
        libnspr4.so => /usr/lib64/libnspr4.so (0x00007f4813867000)
        libXcomposite.so.1 => /usr/lib64/libXcomposite.so.1 (0x00007f4813663000)
        libXext.so.6 => /usr/lib64/libXext.so.6 (0x00007f4813451000)
        libXdamage.so.1 => /usr/lib64/libXdamage.so.1 (0x00007f481324e000)
        libXfixes.so.3 => /usr/lib64/libXfixes.so.3 (0x00007f4813047000)
        libXtst.so.6 => /usr/lib64/libXtst.so.6 (0x00007f4812e41000)
        libgconf-2.so.4 => /usr/lib64/libgconf-2.so.4 (0x00007f4812c0f000)
        libXcursor.so.1 => /usr/lib64/libXcursor.so.1 (0x00007f4812a03000)
        libXrender.so.1 => /usr/lib64/libXrender.so.1 (0x00007f48127f9000)
        libXrandr.so.2 => /usr/lib64/libXrandr.so.2 (0x00007f48125ee000)
        libexpat.so.1 => /usr/lib64/libexpat.so.1 (0x00007f48123c3000)
        libdbus-1.so.3 => /lib64/libdbus-1.so.3 (0x00007f481217c000)
        libcups.so.2 => /usr/lib64/libcups.so.2 (0x00007f4811ef2000)
        libcap.so.2 => /lib64/libcap.so.2 (0x00007f4811cec000)
        libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007f4811968000)
        libbz2.so.1 => /usr/lib64/libbz2.so.1 (0x00007f4811758000)
        libkrb5support.so.0 => /usr/lib64/libkrb5support.so.0 (0x00007f481154b000)
        libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00007f4811346000)
        libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f481112f000)
        libsasl2.so.3 => /usr/lib64/libsasl2.so.3 (0x00007f4810f12000)
        liblzma.so.5 => /usr/lib64/liblzma.so.5 (0x00007f4810ceb000)
        libjbig.so.2 => /usr/lib64/libjbig.so.2 (0x00007f4810adf000)
        libffi.so.4 => /usr/lib64/libffi.so.4 (0x00007f48108d5000)
        libpcre.so.1 => /usr/lib64/libpcre.so.1 (0x00007f481066f000)
        libpangoft2-1.0.so.0 => /usr/lib64/libpangoft2-1.0.so.0 (0x00007f481045b000)
        libpixman-1.so.0 => /usr/lib64/libpixman-1.so.0 (0x00007f48101af000)
        libEGL.so.1 => /usr/lib64/libEGL.so.1 (0x00007f480ffab000)
        libxcb-shm.so.0 => /usr/lib64/libxcb-shm.so.0 (0x00007f480fda8000)
        libxcb-render.so.0 => /usr/lib64/libxcb-render.so.0 (0x00007f480fb9d000)
        libxcb.so.1 => /usr/lib64/libxcb.so.1 (0x00007f480f97d000)
        libGL.so.1 => /usr/lib64/libGL.so.1 (0x00007f480f6ee000)
        libgmodule-2.0.so.0 => /usr/lib64/libgmodule-2.0.so.0 (0x00007f480f4e9000)
        libplds4.so => /usr/lib64/libplds4.so (0x00007f480f2e5000)
        libdbus-glib-1.so.2 => /usr/lib64/libdbus-glib-1.so.2 (0x00007f480f0bc000)
        libavahi-common.so.3 => /usr/lib64/libavahi-common.so.3 (0x00007f480eeaf000)
        libavahi-client.so.3 => /usr/lib64/libavahi-client.so.3 (0x00007f480ec9d000)
        libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f480ea79000)
        libharfbuzz.so.0 => /usr/lib64/libharfbuzz.so.0 (0x00007f480e817000)
        libGLdispatch.so.0 => /usr/lib64/libGLdispatch.so.0 (0x00007f480e52e000)
        libXau.so.6 => /usr/lib64/libXau.so.6 (0x00007f480e329000)
        libGLX.so.0 => /usr/lib64/libGLX.so.0 (0x00007f480e0f8000)
        libgio-2.0.so.0 => /usr/lib64/libgio-2.0.so.0 (0x00007f480dd79000)
        libgraphite2.so.3 => /usr/lib64/libgraphite2.so.3 (0x00007f480db4f000)
mfoxdogg@LINUX-4OBW:~/.steam/steam/steamapps/common/Mad Max> 

It seems like the best potential workaround would be to remove the libcurl.so.4 shipped with MadMax as I tested my local libcurl.so.4 against steam-runtime libssl.so.1.0.0 and it worked fine.

My test script

#!/bin/bash
export LD_PRELOAD=~/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/lib/x86_64-linux-gnu/libssl.so.1.0.0
ldd /usr/lib64/libcurl.so.4
curl ifconfig.co

output

$ ./curl.sh 
        linux-vdso.so.1 (0x00007fff2e56a000)                                                                                               
        /home/boombatower/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/lib/x86_64-linux-gnu/libssl.so.1.0.0 (0x00007efc35f24000)     
        libnghttp2.so.14 => /usr/lib64/libnghttp2.so.14 (0x00007efc35cbf000)                                                               
        libidn.so.11 => /usr/lib64/libidn.so.11 (0x00007efc35a8b000)
        libssh2.so.1 => /usr/lib64/libssh2.so.1 (0x00007efc3585d000)
        libpsl.so.5 => /usr/lib64/libpsl.so.5 (0x00007efc35650000)
        libcrypto.so.1.0.0 => /lib64/libcrypto.so.1.0.0 (0x00007efc351b6000)
        libgssapi_krb5.so.2 => /usr/lib64/libgssapi_krb5.so.2 (0x00007efc34f6b000)
        liblber-2.4.so.2 => /usr/lib64/liblber-2.4.so.2 (0x00007efc34d5c000)
        libldap-2.4.so.2 => /usr/lib64/libldap-2.4.so.2 (0x00007efc34b0f000)
        libz.so.1 => /lib64/libz.so.1 (0x00007efc348f9000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007efc346dc000)
        libc.so.6 => /lib64/libc.so.6 (0x00007efc3433b000)
        libicuuc.so.57.1 => /usr/lib64/libicuuc.so.57.1 (0x00007efc33f8c000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007efc33d88000)
        libkrb5.so.3 => /usr/lib64/libkrb5.so.3 (0x00007efc33aae000)
        libk5crypto.so.3 => /usr/lib64/libk5crypto.so.3 (0x00007efc3387e000)
        libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00007efc3367a000)
        libkrb5support.so.0 => /usr/lib64/libkrb5support.so.0 (0x00007efc3346a000)
        libresolv.so.2 => /lib64/libresolv.so.2 (0x00007efc33253000)
        libsasl2.so.3 => /usr/lib64/libsasl2.so.3 (0x00007efc33036000)
        /lib64/ld-linux-x86-64.so.2 (0x000055e5d6757000)
        libicudata.so.57.1 => /usr/lib64/libicudata.so.57.1 (0x00007efc32e35000)
        libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007efc32aac000)
        libm.so.6 => /lib64/libm.so.6 (0x00007efc327a8000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007efc3258f000)
        libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00007efc3238b000)
        libselinux.so.1 => /lib64/libselinux.so.1 (0x00007efc32164000)
        libpcre.so.1 => /usr/lib64/libpcre.so.1 (0x00007efc31ef1000)
[redacted, but my IP as expected]

If so presumably, just remove lib/x86_64/libcurl.so.4 in 234140-Mad_Max/00-remove. I do not own the game, so I need others to test fix. Thanks to mfoxdogg for the help.

boombatower commented 8 years ago
ERROR: ld.so: object '/home/mfoxdogg/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
/home/mfoxdogg/.local/share/Steam/steamapps/common/Mad Max/bin/MadMax: /home/mfoxdogg/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/lib/x86_64-linux-gnu/libcrypto.so.1.0.0: no version information available (required by /home/mfoxdogg/.local/share/Steam/steamapps/common/Mad Max/bin/MadMax)
/home/mfoxdogg/.local/share/Steam/steamapps/common/Mad Max/bin/MadMax: /home/mfoxdogg/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/usr/lib/x86_64-linux-gnu/libcurl.so.4: version `CURL_OPENSSL_4' not found (required by /home/mfoxdogg/.local/share/Steam/steamapps/common/Mad Max/bin/MadMax)
/home/mfoxdogg/.local/share/Steam/steamapps/common/Mad Max/bin/MadMax: /home/mfoxdogg/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/lib/x86_64-linux-gnu/libssl.so.1.0.0: no version information available (required by /home/mfoxdogg/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/usr/lib/x86_64-linux-gnu/libcurl.so.4)
/home/mfoxdogg/.local/share/Steam/steamapps/common/Mad Max/bin/MadMax: /home/mfoxdogg/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/lib/x86_64-linux-gnu/libssl.so.1.0.0: no version information available (required by /home/mfoxdogg/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/usr/lib/x86_64-linux-gnu/libcurl.so.4)
/home/mfoxdogg/.local/share/Steam/steamapps/common/Mad Max/bin/MadMax: /home/mfoxdogg/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/lib/x86_64-linux-gnu/libcrypto.so.1.0.0: no version information available (required by /home/mfoxdogg/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/usr/lib/x86_64-linux-gnu/libcurl.so.4)

Since steam-runtime has libcurl.so.4 another approach will be needed. Without access to runt he game it's hard to see exactly why and from where the error is coming.

boombatower commented 8 years ago

If the gears guy is right and it works when running direct maybe better to alter the startup script to nuke LD_PRELOAD entirely so it uses all system libs except for any it forcefully include with rpath I am going to guess based on ldd output.

On that note, force to run without steam-runtime by removing preload.

diff --git a/madmax.sh b/madmax.sh
index d0d9213..5b1fc60 100644
--- a/madmax.sh
+++ b/madmax.sh
@@ -151,6 +151,8 @@ fi
 # Add our additionals and the old preload back
 LD_PRELOAD="${LD_PRELOAD_ADDITIONS}:${SYSTEM_LD_PRELOAD}"
 export LD_PRELOAD
+unset LD_PRELOAD
+unset LD_LIBRARY_PATH

 # ====================================================================
 # Run the game

Perhaps someone can test.

XenonPK commented 7 years ago

Here's my homemade change to the launch script. It allows for the steam overlay to work after nuking LD_PRELOAD. (In my case, I deleted the part of their script where they set it, but unset works too)

I used exec because I did not see any use in having a dangling bash process waiting for the game to terminate.

I've played through most of the game using this script, with no issues.

boombatower commented 7 years ago

It seems this is related to https://bugzilla.opensuse.org/show_bug.cgi?id=1032151.

I believe I fixed in e5815a904f1047e49017ca8a7bd9040553d52396 and 71f4ec661118b94137e77ed8d3b6a764158b3f18.

Perhaps someone could compile a list of all Feral games effected by this fix can be applied to all. The latest steamtricks and steamtricks-data packages are available with the fix from https://build.opensuse.org/project/show/home:boombatower:steamtricks.

boombatower commented 7 years ago

Tomb Raider contains:

If all such games have those that may be the way to go.

boombatower commented 7 years ago

Neither XCOM: Enemy Unknown nor Middle-earth: Shadow of Mordor seem to need this fix.

rombert commented 6 years ago

Company of Heroes 2 needs this fix to launch

rombert commented 6 years ago

Total War Warhammer also ships a local libcurl which needs to be deleted to allow the game to start

FERAL_GAME_NAME="TotalWarhammer"
FERAL_GAME_NAME_FULL="Total War Warhammer"
FERAL_GAME_STEAMID="364360"
FERAL_LIB_PATH="lib/x86_64"
FERAL_ARCH_SHORT="64"
FERAL_ARCH_FULL="x
moozaad commented 6 years ago

The upstream bug https://github.com/FeralInteractive/ferallinuxscripts/issues/2

They keep promising a fix but it's never published. It's like their released games are practically abandoned after release.