ptitSeb / box64

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

Error loading needed lib libgcc_s.so.1 #194

Open gimzmoe opened 2 years ago

gimzmoe commented 2 years ago

Trying to run valheim server on rpi4, followed the instructions on (https://pimylifeup.com/raspberry-pi-valheim-server/) keep getting this missing lib that I can't google-fu ... or don't understand what I find, any hints?

./start_server.sh 
Starting server PRESS CTRL-C to exit
Dynarec for ARM64, with extension: ASIMD CRC32 PageSize:4096
Box64 with Dynarec v0.1.7 5d1298e built on Dec 17 2021 02:23:50
Using default BOX64_LD_LIBRARY_PATH: ./:lib/:lib64/:x86_64/:bin64/:libs64/
Using default BOX64_PATH: ./:bin/
Counted 41 Env var
Looking for ./valheim_server.x86_64
argv[1]="-name"
argv[2]="My server"
argv[3]="-port"
argv[4]="2456"
argv[5]="-world"
argv[6]="Dedicated"
argv[7]="-password"
argv[8]="secret"
Using emulated UnityPlayer.so
Using native(wrapped) libm.so.6
Error loading needed lib libgcc_s.so.1
Error loading one of needed lib
Error: loading needed libs in elf /home/pi/valheim/valheim_server.x86_64
ptitSeb commented 2 years ago

you are missing x86_64 version of libgcc_s.so.1 This version is supplied with box64 and should be installed in the system when box64 is installed, so make sure you have done sudo make install at the end of box64 installation if it still doesn't work, copy the version that is in box64/x64lib folder to the folder where valheim server is installed. You will probably need the other lib too.

gimzmoe commented 2 years ago

yes I had x64lib/libgcc_s.so.1 and copying helps but I have new errors to gonk :) thanks

rajdakin commented 2 months ago

Is this fixed now? Also, if you still have errors, please copy them here.

gongchunye commented 1 month ago

I meet the same problem:

xx124, Error loading needed lib libiomp5.so Trying to add "libgcc_s.so.1" to maplib xx124, Error loading needed lib libgcc_s.so.1

ptitSeb commented 1 month ago

I meet the same problem:

xx124, Error loading needed lib libiomp5.so Trying to add "libgcc_s.so.1" to maplib xx124, Error loading needed lib libgcc_s.so.1

Did you put the x86_64 version of those libs somewhere for box64 to use?

gongchunye commented 1 month ago

I meet the same problem: xx124, Error loading needed lib libiomp5.so Trying to add "libgcc_s.so.1" to maplib xx124, Error loading needed lib libgcc_s.so.1

Did you put the x86_64 version of those libs somewhere for box64 to use?

Thank you for your reply.

this is the x64lib/ libcrypto.so.1.0.0 libgcc_s.so.1 libmbedcrypto.so.7 libmbedx509.so.0 libssl.so.1.0.0 libstdc++.so.6 libcrypto.so.1.1 libiomp5.so libmbedtls.so.12 libmbedx509.so.1 libssl.so.1.1 libunwind.so.8 libdl.so.2 libmbedcrypto.so.3 libmbedtls.so.14 libpng12.so.0 libstdc++.so.5

I put libiomp5.so in the x64lib, but it is still wrong.

SoftwareGuy commented 1 month ago

I had similar issues. There's a hint when box64 starts up:

Box64 with Dynarec v0.3.1 e8fad111 built on Aug  7 2024 01:47:01
BOX64: Didn't detect 48bits of address space, considering it's 39bits
Counted 24 Env var
BOX64 LIB PATH: ./:lib/:lib64/:x86_64/:bin64/:libs64/

What could that possibly be? 🤔

Try renaming the x64lib folder/directory to "lib" and put that in your application's folder. So if your game was at /home/user/game, you'd have /home/user/game/lib. Then, invoke it with box64.

Alternatively, copy all the guts of the x64lib directory to the root of the game (in this example, /home/user/game). Then invoke box64. It should then pick up the DLLs and start. Any other missing libraries may have to be hunted down manually and copied into the respective folders.

Successfully got a headless Unity server instance of my own game running on a NanoPi R2S Plus, which is Rockchip powered with 1GB of RAM and runs Debian Bookworm.