box64 icon indicating copy to clipboard operation
box64 copied to clipboard

Is there a way to run Valheim dedicated server on Raspberry Pi 4 + steamui.so error

Open ultrapoci opened this issue 4 years ago • 7 comments

I've been trying for hours to make a Valheim server work on my Raspberry Pi 4 but couldn't. I've installed the 64bit version of the Raspberry OS, and I've installed both box86 and box64. I've encountered several problems. I cannot run Steam: I get a steamui.so fatal error. And I cannot install Steamcmd, because it's required to install lib32gcc1, but if I understand correctly I cannot install this library on a 64bit system. I was able to install Steamcmd through wget using a link I've found online, and I was able to install the dedicated server of Valheim with it. But when I try to launch the start_server.sh file, I get a bunch of errors and warnings (a lot of them mentioning dlopen). And the server eventually fails.

Is there a way to do this? I've found an issue (#105) mentioning a bug but apart from that they where able to run the Valheim server. I would post more info and logs, but they got lost because I've tried to force 32bit libraries into the system and blew everything up. It was a fresh install anyway. And there is so much wrong is so many places I don't even know what to post. I guess that the problem is the lack of libraries, but I couldn't find any info online on what to install, apart from lib32gcc1 which cannot be installed, as far as I'm aware. The box64 and box86 installations should be correct, I've even restarted the service and the system several time.

Sorry from the vague post, but I really don't where to go from here.

ultrapoci avatar Sep 21 '21 15:09 ultrapoci

Hello,

Yes, it's possible, but notice: it's absolute experimental and not stable. I tried to run and in my case, some times the server starts, and in other cases not.

For run the steam client I used the box86 system, it runs like a charm and download the Valheim server. Zero issues in this case. For running Valheim you need box64, I compiled it directly from the source code, but it seems that some times runs correctly, and other does not start or stop randomly with this error:

TYPE: 31
* Assertion at mini-amd64.c:209, condition `amd64_is_imm32 (disp)' not met

I did this weekend a small dockerfile that can build an image to run and test it. You can find in this repository.

Regards, Tranko.

tranko1 avatar Sep 21 '21 19:09 tranko1

Hello,

Yes, it's possible, but notice: it's absolute experimental and not stable. I tried to run and in my case, some times the server starts, and in other cases not.

For run the steam client I used the box86 system, it runs like a charm and download the Valheim server. Zero issues in this case. For running Valheim you need box64, I compiled it directly from the source code, but it seems that some times runs correctly, and other does not start or stop randomly with this error:

TYPE: 31
* Assertion at mini-amd64.c:209, condition `amd64_is_imm32 (disp)' not met

I did this weekend a small dockerfile that can build an image to run and test it. You can find in this repository.

Regards, Tranko.

Thank you for the response and the repository.

Is there some extra steps needed to install steam and run in correctly, other than building box86 and sudo apt install steam? I find it weird that it didn't work on my Raspberry. Then again, I may have polluted the system in some way while trying various solutions.

I'll try again from scratch and see if it works. I remember seeing the error you mentioned (among the others), so it could simply be that once I get my Steam installation correctly set up, and install Valheim with it, I may be able to run the server without problems (except the one you mentioned).

ultrapoci avatar Sep 21 '21 20:09 ultrapoci

No problem, we are here for help ourselves.

If you read my repository, I was able to run the Valheim server only in a RaspianOS de 64 bits upgraded to Bullseye (Debian 11). If you try to install steamcd with "apt install steamcmd" it will return that there is no package, due Steam does not provide a package for ARM machines (armhf or aarch64).

For this reason, you need to download the client first and emulate first x86_32 with box32 to execute the steamcmd client. Once you got the Valheim server data, you can run the valheim_server.x86_64 with the box64 emulator. The Dockerfile do everything for you:

  • Download box86 & compile it
  • Download steamcmd, run it and download the Valheim server
  • Download the box64 and compile it. At that point you can execute the server with box64. If you want to do outside, read the dockerfile.

One point for my Dockerfile, I tested it only in Raspian64 upgraded to Bullseye (Debian 11), not Debian 10 and I use Podman v3.3.1 to run the container (also, I need to do this manually downloading the code and compiling from the official repository). I didn't test it in Docker.

I am testing it, because some times runs and other fails, I didn't have the #105 issue running it, but I have the same issue in the start-up, I will try to get a logfile to send in the issue and maybe the maintainer can help us.

Regards, Tranko.

tranko1 avatar Sep 21 '21 21:09 tranko1

Following the instructions in the docker file I was able to make it work! I didn't use podman since most of the step in the docker file were familiar enough that I decided to simply follow them manually. I did install everything in the root folder tho: is this necessary? Also, I've encoutered the startup bug once, but the second time it worked perfectly.

Anyway, thank you very much!

ultrapoci avatar Sep 22 '21 19:09 ultrapoci

I'm happy to hear that you run it successfully!

Before I did the dockerfile I ran all the commands in a RaspianOS without root user. In the dockerfile I run it in root due it's a container and I did not create a new user. But in RaspianOS I was able to run it with the user Pi (with sudo in some cases).

For something that it's very experimental, I recommend to use a dockerfile/container, you can upgrade it easy every time rebuilding the image, and it will compile the new version of everything (box86/box64).

Regards, Tranko.

tranko1 avatar Sep 23 '21 08:09 tranko1

Hello, I have valheim working and running on a pi 4 but I have this error: https://pastebin.com/zzTGSW6A Error loading needed lib libpulse-mainloop-glib.so.0 Error loading one of needed lib Error initializing needed lib libparty.so Error loading needed lib libparty Warning: Cannot dlopen("libparty"/0xc2996ef0, 101) The libparty.so file is shiped with the valheim install: https://your.hostways.cloud/s/FbpTtFdpQQpZTnP

QuintenQVD0 avatar Oct 08 '22 13:10 QuintenQVD0

The libpulse-mainloop-glib.so.0 library is not wrapped in box64.

I checked the lib, and while there is very few symbols, there seems to be a ton of callbacks, so it might take a while to wrap. In the mean time, I suggest you take an x86_64 build of this lib and put it in the Valheim server folder so box64 find it and use it.

ptitSeb avatar Oct 08 '22 14:10 ptitSeb

I ran into same libparty.so issue where it is trying to load x86_64 version of libpulse-mainloop-glib.so.0 on an arm64 VM.

https://github.com/husjon/husjon/issues/2

bitdo1 avatar Aug 02 '23 14:08 bitdo1

I probably need to wrap this libpulse-mainloop-glib.so.0 ...

ptitSeb avatar Aug 02 '23 14:08 ptitSeb

I tried what you suggested. I got an x86_64 copy of libpulse-mainloop-glib.so.0, put it in a path it was searching and the libparty.so worked, playfab was able to connect and crossplay from xbox worked. Other than connecting, I didn't test if it was stable.

There are still a variety of error message but it past the errors and kept running.

bitdo1 avatar Aug 03 '23 17:08 bitdo1

@ptitSeb can you look at the SIGSEGV back trace on https://github.com/husjon/husjon/issues/3 and provide advice?

bitdo1 avatar Aug 21 '23 16:08 bitdo1

Is this fixed now? (Note that libpulse-mainloop-glib.so.0 seems to be wrapped now, so you'll need the native version. Also, @husjon: box64 doesn't interfere with calls staying in the x64 world or the native world; it only interferes with calls going across. To do so, it uses the functions in the wrapper.c file you see in your backtrace.)

rajdakin avatar Jul 08 '24 13:07 rajdakin