box64 icon indicating copy to clipboard operation
box64 copied to clipboard

Error loading needed lib libgcc_s.so.1

Open gimzmoe opened this issue 4 years ago • 7 comments

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

gimzmoe avatar Dec 17 '21 03:12 gimzmoe

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.

ptitSeb avatar Dec 17 '21 06:12 ptitSeb

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

gimzmoe avatar Dec 17 '21 16:12 gimzmoe

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

rajdakin avatar Jul 08 '24 14:07 rajdakin

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

gongchunye avatar Aug 01 '24 08:08 gongchunye

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?

ptitSeb avatar Aug 01 '24 12:08 ptitSeb

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.

gongchunye avatar Aug 01 '24 16:08 gongchunye

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.

SoftwareGuy avatar Aug 07 '24 04:08 SoftwareGuy

You can configure libraries one of a other different ways, too:

  • Use the BOX64_LD_LIBRARY_PATH environment variable.
    • https://github.com/ptitSeb/box64/blob/v0.3.6/docs/USAGE.md#box64_ld_library_path
  • Place the library files globally in /usr/lib/box64-x86_64-linux-gnu/

This specific library that was originally reported, libgcc_s.so.1, is now installed by default when installing Box64 from the git source code.

https://github.com/ptitSeb/box64/blob/v0.3.6/x64lib/libgcc_s.so.1

Let us know if you still have any issues with that.

LukeShortCloud avatar Jul 19 '25 16:07 LukeShortCloud