ptitSeb / box64

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

Error loading needed lib libzstd.so.1 #1793

Closed ricoazzurro closed 3 weeks ago

ricoazzurro commented 3 weeks ago

Greetings :)

I can't launch the game Kandria, v1.1.14 https://shinmera.itch.io/kandria https://store.steampowered.com/app/1261430/Kandria/

Error log,

rico [ /opt/games/kandria ]$ ./kandria-linux.run 
Dynarec for ARM64, with extension: ASIMD AES CRC32 PMULL ATOMICS SHA1 SHA2 PageSize:4096 Running on - - - - - - - - - - - - - - - - with 8 Cores
Will use Hardware counter measured at 24.0 MHz emulating 3.0 GHz
Params database has 89 entries
Box64 with Dynarec v0.3.1 9eaaaaa built on Sep  4 2024 06:35:23
BOX64: Detected 48bits at least of address space
Counted 62 Env var
BOX64 LIB PATH: BOX64 BIN PATH: ./:bin/:/opt/rustc/bin/:/usr/local/bin/:/usr/bin/:/opt/ant/bin/:/opt/jdk/bin/:/opt/bin/
Looking for ./kandria-linux.run
Rename process to "kandria-linux.run"
Using native(wrapped) libdl.so.2
Using native(wrapped) libpthread.so.0
Error loading needed lib libzstd.so.1
Using native(wrapped) libm.so.6
Using native(wrapped) libc.so.6
Using native(wrapped) ld-linux-x86-64.so.2
Using native(wrapped) libutil.so.1
Using native(wrapped) librt.so.1
Using native(wrapped) libbsd.so.0
Error loading one of needed lib
Error: Loading needed libs in elf /opt/games/kandria/././kandria-linux.run

I have tired, but in vain.


And this is the 2nd time I've encountered suspicious 'libzstd' issue.

Another one is the game, Noreya The Gold Project. https://www.gog.com/en/game/noreya_the_gold_project https://store.steampowered.com/app/1760330/Noreya_The_Gold_Project/

Lines as Warning: Weak Symbol ZSTD_trace_decompress look a bit strange?

Error log,

rico [ /opt/games/noreya/squashfs-root ]$ ./'Noreya The Gold Project'
Dynarec for ARM64, with extension: ASIMD AES CRC32 PMULL ATOMICS SHA1 SHA2 PageSize:4096 Running on - - - - - - - - - - - - - - - - with 8 Cores
Will use Hardware counter measured at 24.0 MHz emulating 3.0 GHz
Params database has 89 entries
Box64 with Dynarec v0.3.1 9eaaaaa built on Sep  4 2024 06:35:23
BOX64: Detected 48bits at least of address space
Counted 63 Env var
BOX64 LIB PATH: BOX64 BIN PATH: ./:bin/:/opt/rustc/bin/:/usr/local/bin/:/usr/bin/:/opt/ant/bin/:/opt/jdk/bin/:/opt/bin/
Looking for ./Noreya The Gold Project
Rename process to "Noreya The Gold Project"
Redirecting overridden malloc from symtab function for /opt/games/noreya/squashfs-root/Noreya The Gold Project
Using emulated libffmpeg.so
Using native(wrapped) libdl.so.2
Using native(wrapped) libpthread.so.0
Using native(wrapped) libgobject-2.0.so.0
Using native(wrapped) libglib-2.0.so.0
Using native(wrapped) libgio-2.0.so.0
Using native(wrapped) libgmodule-2.0.so.0
Using native(wrapped) libnss3.so
Using native(wrapped) libnssutil3.so
Using native(wrapped) libsmime3.so
Using native(wrapped) libnspr4.so
Using native(wrapped) libdbus-1.so.3
Using native(wrapped) libatk-1.0.so.0
Using native(wrapped) libatk-bridge-2.0.so.0
Using native(wrapped) libSM.so.6
Using native(wrapped) libICE.so.6
Using native(wrapped) libXau.so.6
Using native(wrapped) libxcb.so.1
Using native(wrapped) libXdmcp.so.6
Using native(wrapped) libcups.so.2
Using native(wrapped) libdrm.so.2
Using native(wrapped) libgtk-3.so.0
Using native(wrapped) libgdk-3.so.0
Using native(wrapped) libgdk_pixbuf-2.0.so.0
Using native(wrapped) libpangocairo-1.0.so.0
Using native(wrapped) libpango-1.0.so.0
Using native(wrapped) libcairo.so.2
Using native(wrapped) libX11.so.6
Using native(wrapped) libXcomposite.so.1
Using native(wrapped) libXdamage.so.1
Using native(wrapped) libXext.so.6
Using native(wrapped) libXfixes.so.3
Using native(wrapped) libXrandr.so.2
Using native(wrapped) libXrender.so.1
Using native(wrapped) libgbm.so.1
Using native(wrapped) libexpat.so.1
Using native(wrapped) libxkbcommon.so.0
Using native(wrapped) libasound.so.2
Using native(wrapped) libatspi.so.0
Using native(wrapped) libm.so.6
Using emulated /lib/x86_64-linux-gnu/libgcc_s.so.1
Using native(wrapped) libc.so.6
Using native(wrapped) ld-linux-x86-64.so.2
Using native(wrapped) libutil.so.1
Using native(wrapped) librt.so.1
Using native(wrapped) libbsd.so.0
Warning: Weak Symbol ZSTD_trace_decompress_begin not found, cannot apply R_X86_64_JUMP_SLOT @0x10a649bc8 (0xa0d8b96)
Warning: Weak Symbol ZSTD_trace_decompress_end not found, cannot apply R_X86_64_JUMP_SLOT @0x10a649bd0 (0xa0d8ba6)
Warning: Weak Symbol _ZTHN2v88internal12trap_handler21g_thread_in_wasm_codeE not found, cannot apply R_X86_64_JUMP_SLOT @0x10a64a2d8 (0xa0d99b6)
Warning: Weak Symbol _ZTHN2v88internal19RwxMemoryWriteScope31code_space_write_nesting_level_E not found, cannot apply R_X86_64_JUMP_SLOT @0x10a64a2e0 (0xa0d99c6)
Warning: Weak Symbol OPENSSL_memory_alloc not found, cannot apply R_X86_64_JUMP_SLOT @0x10a64a528 (0xa0d9e56)
Warning: Weak Symbol OPENSSL_memory_free not found, cannot apply R_X86_64_JUMP_SLOT @0x10a64a530 (0xa0d9e66)
Warning: Weak Symbol sdallocx not found, cannot apply R_X86_64_JUMP_SLOT @0x10a64a538 (0xa0d9e76)
Warning: Weak Symbol OPENSSL_memory_get_size not found, cannot apply R_X86_64_JUMP_SLOT @0x10a64a540 (0xa0d9e86)
munmap_chunk(): invalid pointer
NativeBT: ./Noreya The Gold Project() [0x34a6c788]
NativeBT: linux-vdso.so.1(__kernel_rt_sigreturn+0) [0xffffad08079c]
NativeBT: /usr/lib/libc.so.6(+0x848b8) [0xffffacf048b8]
NativeBT: /usr/lib/libc.so.6(gsignal+0x1c) [0xffffaceb5c7c]
NativeBT: /usr/lib/libc.so.6(abort+0xf4) [0xffffacea1900]
NativeBT: /usr/lib/libc.so.6(+0x78124) [0xffffacef8124]
NativeBT: /usr/lib/libc.so.6(+0x8f428) [0xffffacf0f428]
NativeBT: /usr/lib/libc.so.6(+0x8f604) [0xffffacf0f604]
NativeBT: /usr/lib/libc.so.6(__libc_free+0x5c) [0xffffacf13b1c]
NativeBT: [0xffffa0919dc4]
EmulatedBT: box64(free+0) [0x100a0]
EmulatedBT: /opt/games/noreya/squashfs-root/Noreya The Gold Project+9ded4f0 [0x109ded4f0]
EmulatedBT: /opt/games/noreya/squashfs-root/Noreya The Gold Project(__libc_csu_init+45) [0x102465b65]
EmulatedBT: box64(ExitEmulation+0) [0x10080]
EmulatedBT: /opt/games/noreya/squashfs-root/Noreya The Gold Project(+2a) [0x1020d402a]
1603|SIGABRT @0xffffacf048b8 (???(/usr/lib/libc.so.6+0x848b8)) (x64pc=0x100a0/"???", rsp=0xffffac9592c8, stack=0xffffac15a000:0xffffac95a000 own=(nil) fp=0xffffac9593c0), for accessing 0x3e800000643 (code=-6/prot=0), db=(nil)((nil):(nil)/(nil):(nil)/???:clean, hash:0/0) handler=(nil)
RSP-0x20:0x0000000000000019 RSP-0x18:0x0000ffffac959360 RSP-0x10:0x000000010a7f9768 RSP-0x08:0x0000ffffac9593c0
RSP+0x00:0x0000000109ded073 RSP+0x08:0x0000000000000019 RSP+0x10:0x0000000000000000 RSP+0x18:0x0000000000000000
RAX:0x0000ffffac959341 RCX:0x0000000000000031 RDX:0x00003b4400210998 RBX:0x000000010a7f9600 
RSP:0x0000ffffac9592c8 RBP:0x0000ffffac9593c0 RSI:0x0000ffffacf1e4c0 RDI:0x00003b4400210990 
 R8:0x0000ffffac959320  R9:0x00003b4400210990 R10:0x0000000000000000 R11:0x0000000000000060 
R12:0x0000000000000019 R13:0x0000000000000000 R14:0x0000ffffac959360 R15:0x000000010a7f9768 
ES:0x002b CS:0x0033 SS:0x002b DS:0x002b FS:0x0043 GS:0x0053 
Aborted (core dumped)
ptitSeb commented 3 weeks ago

But libzstd.so is not wrapped! Only libz.so, liblzma and libbz2.so are wrapped, as far as compression libs are concerned. You need to use an x86_64 version of it for now.

ricoazzurro commented 3 weeks ago

Thank you <3 I'll test the two games later with x86_64 libzstd.

ricoazzurro commented 3 weeks ago

Tested.

With x86_64 libzstd,

Kandria did move forward, Noreya The Gold Project did not. Both games still could not be launched.

Since it's not box64 libzstd issue, I'll close the ticket for now and post the above games not booting issues.

And Kandria's log attached,

rico [ /opt/games/kandria ]$ ./box64-start.sh 
Dynarec for ARM64, with extension: ASIMD AES CRC32 PMULL ATOMICS SHA1 SHA2 PageSize:4096 Running on - - - - - - - - - - - - - - - - with 8 Cores
Will use Hardware counter measured at 24.0 MHz emulating 3.0 GHz
Params database has 89 entries
Box64 with Dynarec v0.3.1 9eaaaaa built on Sep  4 2024 06:35:23
BOX64: Detected 48bits at least of address space
Counted 65 Env var
BOX64 LIB PATH: BOX64 BIN PATH: ./:bin/:/opt/rustc/bin/:/usr/local/bin/:/usr/bin/:/opt/ant/bin/:/opt/jdk/bin/:/opt/bin/
Looking for ./kandria-linux.run
Rename process to "kandria-linux.run"
Using native(wrapped) libdl.so.2
Using native(wrapped) libpthread.so.0
Using emulated /opt/box-libs/x86_64/libzstd.so.1
Using native(wrapped) libm.so.6
Using native(wrapped) libc.so.6
Using native(wrapped) ld-linux-x86-64.so.2
Using native(wrapped) libutil.so.1
Using native(wrapped) librt.so.1
Using native(wrapped) libbsd.so.0
 ==> Performing warm boot.
   -> Runtime directory is /opt/games/kandria/
   -> Resource directory is /opt/games/kandria/
 ==> Running boot hooks.
 ==> Reloading foreign libraries.
   -> Loading foreign library #<LIBRARY LIBSSL>.
Using emulated /lib/x86_64-linux-gnu/libssl.so.1.1
Using emulated /lib/x86_64-linux-gnu/libcrypto.so.1.1
   -> Loading foreign library #<LIBRARY LIBCRYPTO>.
   -> Loading foreign library #<LIBRARY LIBMIXED>.
Using emulated lin-amd64-libmixed.so
   -> Loading foreign library #<LIBRARY OPENGL>.
Error loading needed lib libGL.so.4
Warning: Cannot dlopen("libGL.so.4"/0x1007b896f0, 102)
Error loading needed lib libGL.so.3
Warning: Cannot dlopen("libGL.so.3"/0x1007b89f40, 102)
Error loading needed lib libGL.so.2
Warning: Cannot dlopen("libGL.so.2"/0x1007b8a690, 102)
Using native(wrapped) libGL.so.1
 ==> Launching application.
2024-09-04 23:14:21 [INFO ] <TRIAL.SETTINGS>: Loading settings from /home/rico/.config/shirakumo/kandria/settings.lisp
2024-09-04 23:14:21 [INFO ] <TRIAL.SETTINGS>: Saving settings to /home/rico/.config/shirakumo/kandria/settings.lisp
WARNING: No server for :PORT: 4005
2024-09-04 23:14:21 [INFO ] <TRIAL>: Running on rocklfs, X86-64 Box64 on - - - - - - - - - - - - - -  @2.26 GHz, Linux 6.1.43
2024-09-04 23:14:21 [INFO ] <TRIAL.MAIN>: GENESIS
2024-09-04 23:14:21 [INFO ] <TRAIL.MAIN>: Launching version 1.1.14-4c551be (5FAE199C6449E0B29497CAF2E6D0F6737BB2B99CE40137DD082725DA)
Using emulated libglfw-lin-amd64.so
Using native(wrapped) libwayland-client.so.0
2024-09-04 23:14:21 [ERROR] <TRIAL>: Failed to create an OpenGL context:

  Failed to initialize GLFW.
   [Condition of type CONTEXT-CREATION-ERROR]

#<ENVIRONMENT {1008E60CA3}>
   [Environment of thread #<THREAD tid=1809 "main thread" RUNNING {1007310003}>]

Available restarts:
 0: [EXIT] Exit.

Backtrace:
 0: (LAUNCH-WITH-CONTEXT #<unavailable argument> #<unavailable &MORE argument>)
 1: ((FLET TRIAL::THUNK :IN TRIAL:LAUNCH))
 2: ((:METHOD TRIAL:LAUNCH (SYMBOL)) MAIN CONTEXT (WIDTH T HEIGHT T VSYNC T FULLSCREEN T TITLE Kandria VERSION (3 3) PROFILE CORE))
 3: (LAUNCH)
 4: (DEPLOY::CALL-ENTRY-PREPARED #<FUNCTION MAIN> #<SYSTEM "kandria"> #<DEPLOY-OP >)
 5: ((LAMBDA NIL :IN UIOP/IMAGE:RESTORE-IMAGE))
 6: (UIOP/IMAGE:CALL-WITH-FATAL-CONDITION-HANDLER #<FUNCTION (LAMBDA NIL :IN UIOP/IMAGE:RESTORE-IMAGE) {1007431DDB}>)
 7: ((FLET SB-UNIX::BODY :IN SB-IMPL::START-LISP))
 8: ((FLET "WITHOUT-INTERRUPTS-BODY-3" :IN SB-IMPL::START-LISP))
 9: (SB-IMPL::%START-LISP)
2024-09-04 23:14:21 [FATAL] <TRIAL>: Encountered unhandled error in #<THREAD tid=1809 "main thread" RUNNING {1007310003}>
fatal error encountered in SBCL pid 1809 tid 1809:
deferrable signals partially blocked: {{1,2,3,5,9,29,31}}

   0: fp=0x6022e2e8 pc=0x41fb30 Foreign function default_lossage_handler
   1: fp=0x6022e2f8 pc=0x41fb4a Foreign function call_lossage_handler
   2: fp=0x6022e3e8 pc=0x41fd08 Foreign function lose
   3: fp=0x6022e588 pc=0x4211a8 Foreign function deferrables_blocked_p
   4: fp=0x6022e678 pc=0x421609 Foreign function maybe_now_maybe_later
   5: fp=0x6022f138 pc=0x10080 Foreign function
   6: fp=0x6022f260 pc=0x53bbb6cf SB-IMPL::SUB-SERVE-EVENT
   7: fp=0x6022f388 pc=0x53bbb9e7 SB-SYS::SERVE-ALL-EVENTS
   8: fp=0x6022f3a8 pc=0x53d99bcd SB-EXT::PROCESS-WAIT
   9: fp=0x6022f3d8 pc=0x531152b8 UIOP/LAUNCH-PROGRAM::WAIT-PROCESS
  10: fp=0x6022f488 pc=0x54056636 (FLET "CLEANUP-FUN-407" :IN UIOP/RUN-PROGRAM::%USE-LAUNCH-PROGRAM)
  11: fp=0x6022f540 pc=0x540564ce (LAMBDA (UIOP/RUN-PROGRAM::REDUCED-INPUT UIOP/RUN-PROGRAM::INPUT-ACTIVITY) :IN UIOP/RUN-PROGRAM::%USE-LAUNCH-PROGRAM)
  12: fp=0x6022f620 pc=0x54055d23 UIOP/RUN-PROGRAM::%USE-LAUNCH-PROGRAM
  13: fp=0x6022f6f8 pc=0x535742a6 ORG.SHIRAKUMO.MESSAGEBOX::ZENITY
  14: fp=0x6022f790 pc=0x535747bf (LAMBDA (ORG.SHIRAKUMO.MESSAGEBOX::TEXT &KEY :TITLE :TYPE :MODAL &ALLOW-OTHER-KEYS) :IN "/home/linus/Projects/cl/messagebox/zenity.lisp")
  15: fp=0x6022f880 pc=0x531a159c ORG.SHIRAKUMO.MESSAGEBOX::SHOW
  16: fp=0x6022f8d8 pc=0x52d67195 TRIAL::EMESSAGE
  17: fp=0x6022f910 pc=0x5490ae03 TRIAL::STANDALONE-ERROR-HANDLER
  18: fp=0x6022f940 pc=0x53c13884 SB-KERNEL::%SIGNAL
  19: fp=0x6022f980 pc=0x52a0c7fc ERROR
  20: fp=0x6022fa20 pc=0x536c8ba5 TRIAL::LAUNCH-WITH-CONTEXT
  21: fp=0x6022faa0 pc=0x5366452f (FLET TRIAL::THUNK :IN TRIAL::LAUNCH)
  22: fp=0x6022fb48 pc=0x5366426b (SB-PCL::FAST-METHOD TRIAL::LAUNCH (SYMBOL))
  23: fp=0x6022fbd0 pc=0x53aab2cc KANDRIA::LAUNCH
  24: fp=0x6022fd18 pc=0x533b5370 DEPLOY::CALL-ENTRY-PREPARED
  25: fp=0x6022fda0 pc=0x5338b2dd (LAMBDA () :IN UIOP/IMAGE::RESTORE-IMAGE)
  26: fp=0x6022fdd8 pc=0x5338a99e UIOP/IMAGE::CALL-WITH-FATAL-CONDITION-HANDLER
  27: fp=0x6022fe70 pc=0x540040e4 (FLET SB-UNIX::BODY :IN SB-IMPL::START-LISP)
  28: fp=0x6022ff30 pc=0x54003eeb (FLET "WITHOUT-INTERRUPTS-BODY-3" :IN SB-IMPL::START-LISP)
  29: fp=0x6022ffc8 pc=0x54003d18 SB-IMPL::%START-LISP