ptitSeb / box64

Box64 - Linux Userspace x86_64 Emulator with a twist, targeted at ARM64 Linux devices
https://box86.org
MIT License
3.48k stars 247 forks source link

termux and steam fails with "Cannot dlopen("steamui.so"/0xe7a1e010, 2)" and symbols not found #1119

Open ShapeShifter499 opened 7 months ago

ShapeShifter499 commented 7 months ago

I'm using termux and the set up from https://github.com/phoenixbyrd/Termux_XFCE on a Samsung Fold 4 that is currently running Android 13 and OneUI 5.1.1

When running from the debian proot setup. I installed steam via the install_steam.sh script in the box86 repository, cloned both box64 and box86 to my home directory and ran the following command. Below that is the part of the log that seems most relavant, seems like there are missing symbols.

BOX64_BASH=~/box64/tests/bash box64 steam
steam.sh[27582]: Restarting Steam by request...
Dynarec for ARM64, with extension: ASIMD AES CRC32 PMULL SHA1 SHA2 PageSize:4096 Running on Cortex-A510 Cortex-A710 - with 8 Cores
Params database has 38 entries
Box64 with Dynarec v0.2.5 1dce5ef3 built on Dec  6 2023 06:27:59
BOX64: Didn't detect 48bits of address space, considering it's 39bits
Counted 38 Env var
BOX64 LIB PATH: ./:lib/:lib64/:x86_64/:bin64/:libs64/:./:lib/:lib64/:x86_64/:bin64/:libs64/:/lib/x86_64-linux-gnu/:/usr/lib/x86_64-linux-gnu/
BOX64 BIN PATH: ./:bin/:/usr/local/sbin/:/usr/local/bin/:/usr/sbin/:/usr/bin/:/sbin/:/bin/:/usr/local/games/:/usr/games/:/data/data/com.termux/files/usr/bin/:/system/bin/:/system/xbin/:/home/ransu/:/home/ransu/.local/share/Steam/:/home/ransu/.local/share/Steam/ubuntu12_32/
Looking for /home/ransu/box64/tests/bash
bash detected, disabling banner
Apply RC params for bash
steam.sh[27582]: Running Steam on debian 12 64-bit
steam.sh[27582]: STEAM_RUNTIME has been set by the user to: /home/ransu/.local/share/Steam/ubuntu12_32/steam-runtime
WARNING: linker: Warning: unable to normalize "lib" (ignoring)
WARNING: linker: Warning: unable to normalize "lib64" (ignoring)
WARNING: linker: Warning: unable to normalize "x86_64" (ignoring)
WARNING: linker: Warning: unable to normalize "bin64" (ignoring)
WARNING: linker: Warning: unable to normalize "libs64" (ignoring)
Dynarec for ARM64, with extension: ASIMD AES CRC32 PMULL SHA1 SHA2 PageSize:4096 Running on Cortex-A510 Cortex-A710 - with 8 Cores
Params database has 38 entries
Box64 with Dynarec v0.2.5 1dce5ef3 built on Dec  6 2023 06:27:59
BOX64: Didn't detect 48bits of address space, considering it's 39bits
Counted 39 Env var
BOX64 LIB PATH: ./:lib/:lib64/:x86_64/:bin64/:libs64/:./:lib/:lib64/:x86_64/:bin64/:libs64/:/lib/x86_64-linux-gnu/:/usr/lib/x86_64-linux-gnu/
BOX64 BIN PATH: ./:bin/:/usr/local/sbin/:/usr/local/bin/:/usr/sbin/:/usr/bin/:/sbin/:/bin/:/usr/local/games/:/usr/games/:/data/data/com.termux/files/usr/bin/:/system/bin/:/system/xbin/:/home/ransu/:/home/ransu/.local/share/Steam/:/home/ransu/.local/share/Steam/ubuntu12_32/
Looking for /home/ransu/box64/tests/bash
bash detected, disabling banner
Apply RC params for bash
WARNING: linker: Warning: unable to normalize "lib" (ignoring)
WARNING: linker: Warning: unable to normalize "lib64" (ignoring)
WARNING: linker: Warning: unable to normalize "x86_64" (ignoring)
WARNING: linker: Warning: unable to normalize "bin64" (ignoring)
WARNING: linker: Warning: unable to normalize "libs64" (ignoring)
/home/ransu/.local/share/Steam/ubuntu12_32/steam-runtime/setup.sh: line 58:  9821 Illegal instruction     "$libcurl_compat_setup" --runtime-optional "$steam_runtime_path"
setup.sh[9765]: Forced use of runtime version for 32-bit libcurl-gnutls.so.4
setup.sh[9765]: Forced use of runtime version for 32-bit libcurl.so.4
setup.sh[9765]: Forced use of runtime version for 32-bit libdbusmenu-glib.so.4
setup.sh[9765]: Forced use of runtime version for 32-bit libdbusmenu-gtk.so.4
setup.sh[9765]: Forced use of runtime version for 32-bit libgtk-x11-2.0.so.0
setup.sh[9765]: Forced use of runtime version for 64-bit libcurl-gnutls.so.4
setup.sh[9765]: Forced use of runtime version for 64-bit libcurl.so.4
steam.sh[27582]: Steam client's requirements are satisfied
Box86 with Dynarec v0.3.3 8a715754 built on Dec  6 2023 06:19:26
[2023-12-06 04:27:53] Startup - updater built Nov 29 2023 19:58:56
[2023-12-06 04:27:53] Startup - Steam Client launched with: '/home/ransu/.local/share/Steam/ubuntu12_32/steam'
[2023-12-06 04:27:54] Loading cached metrics from disk (/home/ransu/.local/share/Steam/package/steam_client_metrics.bin)
[2023-12-06 04:27:54] Failed to load cached hosts file (File 'update_hosts_cached.vdf' not found), using defaults
[2023-12-06 04:27:54] Using the following download hosts for Public, Realm steamglobal
[2023-12-06 04:27:54] 1. https://cdn.steamstatic.com, /client/, Realm 'steamglobal', weight was 1, source = 'baked in'
[2023-12-06 04:27:54] Verifying installation...
[2023-12-06 04:27:59] Verification complete
Error initializing native libpng12.so.0 (last dlerror is libpng12.so.0: wrong ELF class: ELFCLASS64)
Error: Symbol _dl_find_object not found, cannot apply R_386_JMP_SLOT 0x6800107c (0x3226) in /lib/i386-linux-gnu/libgcc_s.so.1
Error: relocating Plt symbols in elf libgcc_s.so.1
Error: Symbol strfromf128 not found, cannot apply R_386_JMP_SLOT 0x67fd78ec (0x7c3e6) in /lib/i386-linux-gnu/libstdc++.so.6
Error: Symbol strtof128 not found, cannot apply R_386_JMP_SLOT 0x67fd7ccc (0x7d366) in /lib/i386-linux-gnu/libstdc++.so.6
Error: relocating Plt symbols in elf libstdc++.so.6
dlmopen steamui.so failed: Cannot dlopen("steamui.so"/0xe7a1e010, 2)

Failed to load steamui.so - dlerror(): Cannot dlopen("steamui.so"/0xe7a1e010, 2)

[2023-12-06 04:28:06] Shutdown

 ransu  proot  ~  
ptitSeb commented 7 months ago

Where did you found those /lib/i386-linux-gnu/libgcc_s.so.1 and /lib/i386-linux-gnu/libstdc++.so.6 libs?

ShapeShifter499 commented 7 months ago

Where did you found those /lib/i386-linux-gnu/libgcc_s.so.1 and /lib/i386-linux-gnu/libstdc++.so.6 libs?

They seem to come from the box64-android build here https://github.com/ryanfortner/box64-debs

ptitSeb commented 7 months ago

Mmmm, ok, I need to recheck some stuffs there.

ShapeShifter499 commented 7 months ago

Mmmm, ok, I need to recheck some stuffs there.

Hang on, it seems "libgcc-s1:i386" got pulled incorrectly from the multiarch repo. After removing that it boils down to this error. According to my system libstdc++.so.6 comes from the box64-android build.

Error initializing native libpng12.so.0 (last dlerror is libpng12.so.0: wrong ELF class: ELFCLASS64)
Error: Symbol strfromf128 not found, cannot apply R_386_JMP_SLOT 0x680ca8ec (0x7c3e6) in /lib/i386-linux-gnu/libstdc++.so.6
Error: Symbol __divmoddi4 not found, cannot apply R_386_JMP_SLOT 0x680ca924 (0x7c4c6) in /lib/i386-linux-gnu/libstdc++.so.6
Error: Symbol strtof128 not found, cannot apply R_386_JMP_SLOT 0x680caccc (0x7d366) in /lib/i386-linux-gnu/libstdc++.so.6
Error: relocating Plt symbols in elf libstdc++.so.6
dlmopen steamui.so failed: Cannot dlopen("steamui.so"/0x63865c18, 2)

Failed to load steamui.so - dlerror(): Cannot dlopen("steamui.so"/0x63865c18, 2)
ShapeShifter499 commented 7 months ago

@ptitSeb After updating box86-android I now get the following messages attempting to run steam linux

[2023-12-15 15:46:29] Verification complete
Error initializing native libpcre.so.3 (last dlerror is libpcre.so.3: wrong ELF class: ELFCLASS64)
Error initializing native libpng12.so.0 (last dlerror is libpng12.so.0: wrong ELF class: ELFCLASS64)

Steam logging initialized: directory: /home/ransu/.local/share/Steam/logs

XRRGetOutputInfo Workaround: initialized with override: 0 real: 0x401a0080
XRRGetCrtcInfo Workaround: initialized with override: 0 real: 0x401a0090
WARNING: linker: Warning: unable to normalize "lib" (ignoring)
WARNING: linker: Warning: unable to normalize "lib64" (ignoring)
WARNING: linker: Warning: unable to normalize "x86_64" (ignoring)
WARNING: linker: Warning: unable to normalize "bin64" (ignoring)
WARNING: linker: Warning: unable to normalize "libs64" (ignoring)
lspci: /sys/bus/pci/devices/: Permission denied
WARNING: linker: Warning: unable to normalize "lib" (ignoring)
WARNING: linker: Warning: unable to normalize "lib64" (ignoring)
WARNING: linker: Warning: unable to normalize "x86_64" (ignoring)
WARNING: linker: Warning: unable to normalize "bin64" (ignoring)
WARNING: linker: Warning: unable to normalize "libs64" (ignoring)
lspci: /sys/bus/pci/devices/: Permission denied
steamwebhelper.sh[2006]: Runtime for steamwebhelper: defaulting to /home/ransu/.local/share/Steam/ubuntu12_64/steam-runtime-heavy

 ransu  proot  ~  steamwebhelper.sh[2006]: glibc >= 2.34, partially disabling sandbox until CEF supports clone3()