"Exec Format Error" when trying to run Steam in a 32-bit container on Lenovo Duet (ARM Chromebook)
I have successfully set up an armhf Ubuntu 18.04 container on my Lenovo Duet Chromebook. I managed to compile box86 as well, however, when I try to launch steam, I get the following error:
Package xterm needs to be installed
Package zenity needs to be installed
Package libgl1-mesa-dri:i386 needs to be installed
Package libgl1:i386 needs to be installed
Package libc6:i386 needs to be installed
Running Steam on ubuntu 18.04 32-bit
STEAM_RUNTIME is enabled automatically
Pins potentially out-of-date, rebuilding...
/home/raghavmallick/.local/share/Steam/ubuntu12_32/steam-runtime/setup.sh: line 369: zenity: command not found
Error: You are missing the following 32-bit libraries, and Steam may not run:
libc.so.6
Error:
You are missing the following 32-bit libraries, and Steam may not run:
libc.so.6
Press enter to continue:
Can't find 'steam-runtime-check-requirements', continuing anyway
/home/raghavmallick/.local/share/Steam/ubuntu12_32/steam
/home/raghavmallick/.local/share/Steam/steam.sh: line 749: /home/raghavmallick/.local/share/Steam/ubuntu12_32/steam: cannot execute binary file: Exec format error
I tried launching another x86 32 bit app from gog but ran into the same Exec format error. Have I made a mistake during the compilation process? Thanks for the help in advance!
Reboot or at least use sudo systemctl restart systemd-binfmt after sudo make install.
Also, read the README, there is a paragraph on Steam.
Ignore the previous edit, I finally got Box86 to compile and install, thanks for the help! Now, when I try to launch box86, I get the following error:
box86: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.28' not found (required by box86)
Which probably means I need to update my libc version. Will give it a go and report back. Thank you!
Yes, there is a difference between the libc used to build box86 and the libc used to run it.
Finally made some progress! Got the steam window to pop up and begin updating, however, I am again stuck here:
box86 steam
Box86 with Dynarec v0.1.7 5192aacb built on Dec 2 2020 17:35:36
[2020-12-02 17:56:48] Startup - updater built Oct 24 2018 20:08:45
Looks like steam didn't shutdown cleanly, scheduling immediate update check
[2020-12-02 17:56:48] Checking for update on startup
[2020-12-02 17:56:48] Checking for available updates...
[2020-12-02 17:56:48] Downloading manifest: client-download.steampowered.com/client/steam_client_ubuntu12
[2020-12-02 17:56:50] Download skipped: /client/steam_client_ubuntu12 version 1603992987, installed version 1603992987
[2020-12-02 17:56:50] Nothing to do
[2020-12-02 17:56:50] Verifying installation...
[2020-12-02 17:56:50] Performing checksum verification of executable files
[2020-12-02 17:56:52] Verification complete
Failed to load steamui.so - dlerror(): Cannot dlopen("steamui.so"/0x6474bbc8, 2)
I'm not sure how to get past this, I can't seem to find anything here either. If it helps, I fixed the problems by downloading an i386 specific deb of steam, and then extracting it to open the binary.
use the steam shell script, not the steam binary directly (look for it in the steam intall folder) with STEAMOS=1 STEAM_RUNTIME=1 env. var. as written in the README.
No luck sadly, this is what I'm getting:
/usr/lib/games$ box86 env STEAMOS=1 STEAM_RUNTIME=1 ./steam.sh
Box86 with Dynarec v0.1.7 5192aacb built on Dec 2 2020 17:35:36
Error: reading elf header of /usr/bin/env, try to launch natively instead
Running Steam on ubuntu 20.10 32-bit
STEAM_RUNTIME is enabled by the user
Pins potentially out-of-date, rebuilding...
/home/raghavmallick/Games/usr/lib/games/ubuntu12_32/steam-runtime/setup.sh: line 369: zenity: command not found
./steam.sh: line 403: /home/raghavmallick/Games/usr/lib/games/ubuntu12_32/steam-runtime/i386/usr/bin/steam-runtime-check-requirements: cannot execute binary file: Exec format error
steam-runtime-check-requirements failed with an unexpected nonzero exit status. Trying to continue
/home/raghavmallick/Games/usr/lib/games/ubuntu12_32/steam
./steam.sh: line 749: /home/raghavmallick/Games/usr/lib/games/ubuntu12_32/steam: cannot execute binary file: Exec format error
I have a feeling I'm either using an incorrect version of the .deb to get my files or I've extracted steam incorrectly somehow
The ".deb" is just use one time, after that, steam autoupdate and you can forget about that .deb.
You are missing zenity it seems. Box86 is not correctly installed also (or reboot / restart of deamon is missing).
I started from scratch on a fresh 32 bit container and I've made identical progress on both. From what I'm seeing, only if I launch the binary with "box86" prefixed, am I able to launch steam (though as you mentioned, this is not the recommended way of doing so). I also installed zenity this time.
If I'm using the steam shell script, it works until it needs to execute another shell script or the actual client, which won't be prefixing "box86", and thus is coming up with the exec format error.
The issue is again confirmed when I'm trying to run the box86 provided tests. Simply running ./test01 in the terminal gives the exec format error, whereas prefixing box86 gives the desired result.
Ideally this should have been fixed with a reboot after sudo make install, but for some reason the error remains.
I'll try working from scratch once again and seeing if I'm able to solve the problem this time
So the binfmt redirection doesn't work on container? Did you sudo systemctl restart systemd-binfmt after the sudo make install?
Yes looks like the issue lies with the binfmt redirection:
sudo systemctl restart systemd-binfmt
Job for systemd-binfmt.service failed because the control process exited with error code.
See "systemctl status systemd-binfmt.service" and "journalctl -xe" for details.
And on inspecting:
systemctl status systemd-binfmt.service
● systemd-binfmt.service - Set Up Additional Binary Formats
Loaded: loaded (/lib/systemd/system/systemd-binfmt.service; static)
Active: failed (Result: exit-code) since Thu 2020-12-03 18:57:05 IST; 13s ago
Docs: man:systemd-binfmt.service(8)
man:binfmt.d(5)
https://www.kernel.org/doc/html/latest/admin-guide/binfmt-misc.html
https://www.freedesktop.org/wiki/Software/systemd/APIFileSystems
Process: 10791 ExecStart=/lib/systemd/systemd-binfmt (code=exited, status=1/FAILURE)
Main PID: 10791 (code=exited, status=1/FAILURE)
Seems to be a problem with my container
Without binfmt integration, it pretty complicated to launch steam, because you cannot use the shell script you cannot modify the shell script because it's part of steam and steam is update if the file is altered
so without binfmt you end up launching steam bianry with a huge BOX86_LD_LIBRARY_PATH pointing to steam-runtime libs folders...
Hey OP, you aren't first one to attempt box86 on a duet ;) I got it to work on my Linux distro made specifically for duet(very much work in progress), https://github.com/Maccraft123/Cadmium And then it would work like any other AArch64 Debian box
I just install the needed libs from this Github page (from the README.md) https://github.com/novaspirit/rpi_ubu64_desktop and these also: libx11-dev libgl-dev libvulkan-dev libtcmalloc-minimal4 libnm0 zenity libsdl2-dev and libgles-dev
then i do export BOX86_LD_LIBRARY_PATH= ~ /.local/share/Steam/ubuntu12_32/steam-runtime/usr/lib/i386-linux-gnu:~/.local/share/Steam/ubuntu12_32
and then do this cd ~/.local/share/Steam/ubuntu12_32 I recommended you put BOX86_LOG=1 at beginning of the command just in case for finding a missing lib that you haven't installed, like below, run that BOX86_LOG=1 box86 ./steam
As for binfmt, it sadly doesn't seem to be integrated into the container yet.
You can now use x86 bash to run bash files using box86, and use BOX86_BASH env. var. to setup were bash can be found (hint: in the tests folder of this repo).
Can you test that to see if this ticket can be closed?