ptitSeb / box86

Box86 - Linux Userspace x86 Emulator with a twist, targeted at ARM Linux devices
https://box86.org
MIT License
3.18k stars 220 forks source link

SteamCMD Via Box86 On Termux Not Loading Steam API #973

Open RyuRaiko opened 6 days ago

RyuRaiko commented 6 days ago

I managed to get SteamCMD working under Box86 a few weeks ago under Termux, however it recently had a update which broke it, I have been trying everything under the sun (including trying to run Steam under Termux which also seems to have issues related to dlopen but for steamui.so instead) to know avail. If anyone could shed some light on what the errors in the log could mean or have ideas I could try please let me know.

steam@localhost:~/Steam/linux32$ LD_LIBRARY_PATH="~/Steam/linux32/:$LD_LIBRARY_PATH" box64 ~/Steam/linux32/steamcmd
Dynarec for ARM64, with extension: ASIMD AES CRC32 PMULL ATOMICS SHA1 SHA2 PageSize:4096 Running on Cortex-A55 Cortex-A78 with 8 Cores
Will use Hardware counter measured at 13.0 MHz emulating 3.3 GHz
Params database has 75 entries
Box64 with Dynarec v0.2.9 1ee4d5aa built on Jun 30 2024 23:24:26
BOX64: Didn't detect 48bits of address space, considering it's 39bits
Counted 29 Env var
BOX64 LIB PATH: ~/Steam/linux32/:./: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/
Looking for /home/steam/Steam/linux32/steamcmd
This is a 32bits ELF! box64 can only run 64bits ELF (/home/steam/Steam/linux32/steamcmd)!
Error: Reading elf header of /home/steam/Steam/linux32/steamcmd, Try to launch using box86 instead
Debug level is 1                                                  Dynarec for ARMv8, with extension: HALF FAST_MULT EDSP NEON VFPv4 IDIVA AES PMULL PageSize:4096 Running on Cortex-A55 Cortex-A78 with 8 Cores
Params database has 31 entries
Box86 with Dynarec v0.3.7 fc0b51f3 built on Jun 30 2024 23:16:50
Using default BOX86_LD_LIBRARY_PATH: ./:lib/:lib32/:x86/:i686/
Using default BOX86_PATH: ./:bin/
Counted 29 Env var
Looking for /home/steam/Steam/linux32/steamcmd
steam detected
Rename process to "steamcmd"
Using native(wrapped) libdl.so.2
Using native(wrapped) libc.so.6
Using native(wrapped) ld-linux.so.2
Using native(wrapped) libpthread.so.0
Using native(wrapped) librt.so.1
Using native(wrapped) libbsd.so.0
Using native(wrapped) libm.so.6
Using native(wrapped) crashhandler.so
Redirecting stderr to '/home/steam/.local/share/Steam/logs/stderr.txt'
Logging directory: '/home/steam/.local/share/Steam/logs'
[  0%] Checking for available updates...
[----] Verifying installation...
UpdateUI: skip show logoError loading needed lib steamconsole.so
Warning: Cannot dlopen("steamconsole.so"/0x63f1bf00, 2)
dlmopen steamconsole.so failed: Cannot dlopen("steamconsole.so"/0x63f1bf00, 2)

[----] !!! Fatal Error: Failed to load steamconsole.so
shiumano commented 6 days ago

Failure of dlopen cannot be reproduced. (There is another problem occurring, but let's put it behind us for now.)

shiumano@XQ-DQ44:~/files/steamcmd$ LD_LIBRARY_PATH=linux32 box64 linux32/steamcmd
↑ 12:15:54 
Dynarec for ARM64, with extension: ASIMD AES CRC32 PMULL ATOMICS SHA1 SHA2 USCAT FLAGM FLAGM2 FRINT PageSize:4096 Running on Unknown CPU with 8 Cores
Will use Hardware counter measured at 19.2 MHz emulating 2.4 GHz
Params database has 75 entries
Using bash "/home/shiumano/.local/lib/box86_64/bash_x64"
Box64 with Dynarec v0.2.9 1ee4d5aa built on Jul  1 2024 06:31:23
BOX64: Didn't detect 48bits of address space, considering it's 39bits
Counted 49 Env var
BOX64 LIB PATH: linux32/:./:lib/:lib64/:x86_64/:bin64/:libs64/:/lib/x86_64-linux-gnu/:/usr/lib/x86_64-linux-gnu/:/data/data/com.termux/files/usr/glibc/lib/x86_64-linux-gnu/
BOX64 BIN PATH: ./:bin/:/home/shiumano/.local/bin/:/usr/local/sbin/:/usr/local/bin/:/usr/sbin/:/usr/bin/:/sbin/:/bin/:/usr/games/:/snap/bin/
Looking for linux32/steamcmd
This is a 32bits ELF! box64 can only run 64bits ELF (/home/shiumano/files/steamcmd/linux32/steamcmd)!
Error: Reading elf header of /home/shiumano/files/steamcmd/linux32/steamcmd, Try to launch using box86 instead
Debug level is 1
Dynarec for ARMv8, with extension: HALF FAST_MULT EDSP NEON VFPv4 IDIVA AES PMULL PageSize:4096 Running on Unknown CPU with 8 Cores
Params database has 31 entries
Using bash "/home/shiumano/.local/lib/box86_64/bash_x86"
Box86 with Dynarec v0.3.7 fc0b51f3 built on Jun 20 2024 06:17:11
Using default BOX86_LD_LIBRARY_PATH: ./:lib/:lib32/:x86/:i686/
Using default BOX86_PATH: ./:bin/
Counted 48 Env var
Looking for /home/shiumano/files/steamcmd/linux32/steamcmd
steam detected
Rename process to "steamcmd"
Using native(wrapped) libdl.so.2
Using native(wrapped) libc.so.6
Using native(wrapped) ld-linux.so.2
Using native(wrapped) libpthread.so.0
Using native(wrapped) librt.so.1
Using native(wrapped) libbsd.so.0
Using native(wrapped) libm.so.6
Using native(wrapped) crashhandler.so
Redirecting stderr to '/home/shiumano/Steam/logs/stderr.txt'
Logging directory: '/home/shiumano/Steam/logs'
Looks like steam didn't shutdown cleanly, scheduling immediate update check
[  0%] Checking for available updates...
[----] Verifying installation...
UpdateUI: skip show logoUsing emulated linux32/steamconsole.so
Using emulated linux32/libtier0_s.so
Using emulated linux32/libvstdlib_s.so
Warning: Weak Symbol _ZGTtnaj not found, cannot apply R_386_JMP_SLOT 0x60254dd0 (0xd536)
Warning: Weak Symbol _ZGTtnaj not found, cannot apply R_386_JMP_SLOT 0x604a9aa4 (0xb1c6)
Warning: Weak Symbol _ZGTtnaj not found, cannot apply R_386_JMP_SLOT 0x600cc95c (0x9246)
Steam Console Client (c) Valve Corporation - version 1718904263
-- type 'quit' to exit --
Loading Steam API...Using emulated linux32/steamclient.so
Warning: Weak Symbol _ZGTtnaj not found, cannot apply R_386_JMP_SLOT 0x66a924b4 (0x129fb6)
Fatal error: futex robust_list not initialized by pthreads
1533|SIGSEGV @0xe328a018 (???(0xe328a018)) (x86pc=0x654deab6/linux32/steamclient.so:"linux32/steamclient.so + 0x1002ab6", esp=0xe41fe86c, stack=0xe40ff000:0xe41ff000 own=0xe40ff000 fp=0xe41fe834), for accessing 0x1 (code=1/prot=0), db=0xe3eb6d98(0xe328a014:0xe328a100/0x654deab6:0x654deaf6/linux32/steamclient.so + 0x1002ab6:clean, hash:4b0e4615/4b0e4615)
EAX:0x00000001 ECX:0x000005fd EDX:0x66b1c080 EBX:0x66a920cc 
ESP:0xe41fe86c EBP:0x66ad5254 ESI:0x661056d0 EDI:0x00000000 
ESP-0x10:0x00000000 ESP-0x0c:0x00000000 ESP-0x08:0x91db0003 ESP-0x04:0x654deab6
ESP+0x00:0x6610572a ESP+0x04:0x661056d0 ESP+0x08:0xe41fe8a4 ESP+0x0c:0xe41fe8a8
1533|Double SIGSEGV (code=1, pc=0xe328a018, addr=0x1)!
src/tier0/threadtools.cpp (2771) : Failed to set thread local value
Emit Signal 5 at IP=0x658d4cba / addr=0x658d4cba, code=128
BOX86: Warning, calling Signal function handler SIG_DFL with 3 args 
src/common/framefunction.cpp (238) : Assertion Failed: CFrameFunctionMgr::~CFrameFunctionMgr: non static FrameFunction[CHTTPClient::BFrameFuncHandleCompletedWorkItems] still registered
Emit Signal 5 at IP=0x300db5b5 / addr=0x300db5b5, code=128
BOX86: Warning, calling Signal function handler SIG_DFL with 3 args 
Exit status: 255
shiumano@XQ-DQ44:~/files/steamcmd$ ls *
↑ 12:15:59 
run.sh  steamcmd.sh  update_hosts_cached.vdf

linux32:
crashhandler.so  libvstdlib_s.so  steamcmd         steamerrorreporter
libtier0_s.so    steamclient.so   steamconsole.so

linux64:
steamclient.so

package:
steam_cmd_linux.installed
steam_cmd_linux.manifest
steam_cmd_metrics.bin
steamcmd_bins_linux.zip.vz.cd9bf21d22d6160511d82968457035219bf93c7e_19695537
steamcmd_linux.zip.vz.0b88706512024206cce7868f3bb96707ef4b8f3e_2376078
steamcmd_public_all.zip.ea67e6dc83b60ab8bfb54756920e9ea394f81a90
steamcmd_siteserverui_linux.zip.vz.76f04df2355bf6e00f373294a50b4ae6822deb91_38195951

public:
steambootstrapper_brazilian.txt   steambootstrapper_koreana.txt
steambootstrapper_bulgarian.txt   steambootstrapper_latam.txt
steambootstrapper_czech.txt       steambootstrapper_norwegian.txt
steambootstrapper_danish.txt      steambootstrapper_polish.txt
steambootstrapper_dutch.txt       steambootstrapper_portuguese.txt
steambootstrapper_english.txt     steambootstrapper_romanian.txt
steambootstrapper_finnish.txt     steambootstrapper_russian.txt
steambootstrapper_french.txt      steambootstrapper_schinese.txt
steambootstrapper_german.txt      steambootstrapper_spanish.txt
steambootstrapper_greek.txt       steambootstrapper_swedish.txt
steambootstrapper_hungarian.txt   steambootstrapper_tchinese.txt
steambootstrapper_indonesian.txt  steambootstrapper_thai.txt
steambootstrapper_italian.txt     steambootstrapper_turkish.txt
steambootstrapper_japanese.txt    steambootstrapper_ukrainian.txt
steambootstrapper_korean.txt      steambootstrapper_vietnamese.txt

siteserverui:
linux64
shiumano@XQ-DQ44:~/files/steamcmd$ md5sum linux32/steamconsole.so 
↑ 12:17:39 
ee611ee106b1b15b4753d5446dafc9fa  linux32/steamconsole.so
shiumano@XQ-DQ44:~/files/steamcmd$ 
RyuRaiko commented 5 days ago

The error Fatal error: futex robust_list not initialized by pthreads can be reproduced however, I wonder if this means that its currently broken across all devices, might need to wait for something to update perhaps.