box86 icon indicating copy to clipboard operation
box86 copied to clipboard

Steam and KSP

Open Pythonic456 opened this issue 5 years ago • 94 comments

Is there a way to run KSP in Steam (with box86) as 32 bit? I know it's not much of an issue with box86, but was wondering if you could, I remember reading a thread on a forum a while ago about someone doing that on a mac...

Thanks in advance!

Pythonic456 avatar Dec 17 '20 20:12 Pythonic456

I haven't tried myself, but I have seen it may start. It seems very slow to load, so not sure it's completly playable yet.

ptitSeb avatar Dec 17 '20 20:12 ptitSeb

So it can run as 32-bit? How do I make it do that?

Pythonic456 avatar Dec 19 '20 11:12 Pythonic456

You need an old version that still support 32bits I guess.

ptitSeb avatar Dec 19 '20 12:12 ptitSeb

1.4.5 is the oldest version that supports 32bit

Itai-Nelken avatar Dec 19 '20 15:12 Itai-Nelken

Can you get that on Steam? Or how else?

Pythonic456 avatar Dec 19 '20 19:12 Pythonic456

Ah okay, you just use 1.4.3. This happens when running the executable:

Box86 with Dynarec v0.1.9 a3b0149a built on Dec 19 2020 19:34:02
Set current directory to /home/pi/.local/share/Steam/steamapps/common/Kerbal Space Program
Found path: /home/pi/.local/share/Steam/steamapps/common/Kerbal Space Program/KSP.x86
Error: Global Symbol data_start not found, cannot apply R_386_GLOB_DAT @0xadcd9b68 ((nil)) in /home/pi/.local/share/Steam/steamapps/common/Kerbal Space Program/KSP_Data/Mono/x86/libmono.so
Error: Global Symbol __data_start not found, cannot apply R_386_GLOB_DAT @0xadcd9d44 ((nil)) in /home/pi/.local/share/Steam/steamapps/common/Kerbal Space Program/KSP_Data/Mono/x86/libmono.so
Mono path[0] = '/home/pi/.local/share/Steam/steamapps/common/Kerbal Space Program/KSP_Data/Managed'
Mono config path = '/home/pi/.local/share/Steam/steamapps/common/Kerbal Space Program/KSP_Data/Mono/etc'
Preloaded 'ScreenSelector.so'
Preloaded 'libCSteamworks.so'
Preloaded 'libkeyboard.so'
Preloaded 'liblingoona.grammar.kerbal.so'
Preloaded 'libsteam_api.so'
Preloaded 'ScreenSelector.so'
Preloaded 'libCSteamworks.so'
Preloaded 'libkeyboard.so'
Preloaded 'liblingoona.grammar.kerbal.so'
Preloaded 'libsteam_api.so'
Player data archive not found at `/home/pi/.local/share/Steam/steamapps/common/Kerbal Space Program/KSP_Data/data.unity3d`, using local filesystem
PlayerPrefs - Creating folder: /home/pi/.config/unity3d/Squad/Kerbal Space Program
Logging to /home/pi/.config/unity3d/Squad/Kerbal Space Program/Player.log
Segmentation fault

Running the Launcher.x86 just aborts

Pythonic456 avatar Dec 19 '20 20:12 Pythonic456

more or less same with me, a black window opens but closes after about 30 seconds with no errors.

Itai-Nelken avatar Dec 19 '20 21:12 Itai-Nelken

@ptitSeb You said you've seen it running, can you remember where you saw it doing that please?

Thanks :)

Pythonic456 avatar Dec 19 '20 22:12 Pythonic456

I think it was phoenixbrd user on the discord channel. I don't remember well. I'll check later that game, but I'm some other bug for now.

ptitSeb avatar Dec 19 '20 22:12 ptitSeb

@Pythonic456 I fixed KSP not starting for me by downgrading to mesa 20.2. here are the commands if you need:

git clone https://gitlab.freedesktop.org/mesa/mesa
cd mesa
git checkout 20.2
mkdir build
meson --prefix /usr -Dplatforms=x11 -Dvulkan-drivers= -Ddri-drivers= -Dgallium-drivers=v3d,kmsro,vc4,virgl -Dbuildtype=release build
ninja -C build
sudo ninja -C build install 

Hope this helps!

Itai-Nelken avatar Dec 21 '20 18:12 Itai-Nelken

meson --prefix /usr -Dplatforms=x11 -Dvulkan-drivers= -Ddri-drivers= -Dgallium-drivers=v3d,kmsro,vc4,virgl -Dbuildtype=release build aborts with this error: meson.build:21:0: ERROR: Meson version is 0.49.2 but project requires >= 0.52.

Thanks for your help.

Pythonic456 avatar Dec 22 '20 20:12 Pythonic456

Don't use the meson from apt (so sudo apt remove meson probaly) but the one from python: pip3 install meson Check google for more details.

ptitSeb avatar Dec 22 '20 20:12 ptitSeb

Okay, now it does this:

The Meson build system
Version: 0.56.0
Source dir: /home/pi/mesa
Build dir: /home/pi/mesa/build
Build type: native build
Program python3 found: YES (/usr/bin/python3)
Project name: mesa
Project version: 20.2.6

...

Dependency expat from subproject subprojects/expat-2.2.5 found: YES 2.2.5
Library m found: YES
Run-time dependency libdrm found: NO 

meson.build:1423:0: ERROR: Pkg-config binary for machine MachineChoice.HOST not found. Giving up.

A full log can be found at /home/pi/mesa/build/meson-logs/meson-log.txt
root@raspberrypi44g:/home/pi/mesa#

Thanks for your help.

Pythonic456 avatar Dec 23 '20 13:12 Pythonic456

Did you try sudo apt install --reinstall pkg-config?

Heasterian avatar Dec 23 '20 14:12 Heasterian

Now it does this:

Run-time dependency libdrm found: NO (tried pkgconfig and cmake)

meson.build:1423:0: ERROR: Dependency "libdrm" not found, tried pkgconfig and cmake

A full log can be found at /home/pi/mesa/build/meson-logs/meson-log.txt
root@raspberrypi44g:/home/pi/mesa# 

Thanks for your help.

Pythonic456 avatar Dec 23 '20 14:12 Pythonic456

Now it does this:

Run-time dependency libdrm found: NO (tried pkgconfig and cmake)

meson.build:1423:0: ERROR: Dependency "libdrm" not found, tried pkgconfig and cmake

A full log can be found at /home/pi/mesa/build/meson-logs/meson-log.txt
root@raspberrypi44g:/home/pi/mesa# 

Thanks for your help.

@Pythonic456 try this:

sudo apt install libdrm

Itai-Nelken avatar Dec 23 '20 15:12 Itai-Nelken

Go for sudo apt build-dep mesa and sudo apt install libxcb-shm0-dev. It should install all dependencies.

Heasterian avatar Dec 23 '20 15:12 Heasterian

Thank you for your continuing help.

Now it does this when running the KSP.x86 executable:

Box86 with Dynarec v0.1.9 591bafe8 built on Dec 23 2020 13:44:14
No protocol specified
Set current directory to /home/pi/ksp/KerbalSpaceProgram
Found path: /home/pi/ksp/KerbalSpaceProgram/KSP.x86
Error: Global Symbol data_start not found, cannot apply R_386_GLOB_DAT @0xb2e49b68 ((nil)) in /home/pi/ksp/KerbalSpaceProgram/KSP_Data/Mono/x86/libmono.so
Error: Global Symbol __data_start not found, cannot apply R_386_GLOB_DAT @0xb2e49d44 ((nil)) in /home/pi/ksp/KerbalSpaceProgram/KSP_Data/Mono/x86/libmono.so
Mono path[0] = '/home/pi/ksp/KerbalSpaceProgram/KSP_Data/Managed'
Mono config path = '/home/pi/ksp/KerbalSpaceProgram/KSP_Data/Mono/etc'
Preloaded 'ScreenSelector.so'
Preloaded 'libCSteamworks.so'
Preloaded 'libkeyboard.so'
Preloaded 'liblingoona.grammar.kerbal.so'
Preloaded 'libsteam_api.so'
Preloaded 'ScreenSelector.so'
Preloaded 'libCSteamworks.so'
Preloaded 'libkeyboard.so'
Preloaded 'liblingoona.grammar.kerbal.so'
Preloaded 'libsteam_api.so'
Player data archive not found at `/home/pi/ksp/KerbalSpaceProgram/KSP_Data/data.unity3d`, using local filesystem
Logging to /root/.config/unity3d/Squad/Kerbal Space Program/Player.log
No protocol specified
Stacktrace:


Native stacktrace:

	/usr/local/bin/box86() [0x628b25d0]
	/usr/local/bin/box86() [0x628a03d0]
	/usr/local/bin/box86() [0x6286c29c]
	/usr/local/bin/box86() [0x62868de4]
	/usr/local/bin/box86() [0x628a75f0]
	/usr/local/bin/box86() [0x628a7d14]
	/usr/local/bin/box86() [0x628a836c]
	/lib/arm-linux-gnueabihf/libc.so.6(__default_rt_sa_restorer+0) [0xb6d2d130]

Debug info from gdb:


=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================

Aborted
root@raspberrypi44g:/home/pi/ksp/KerbalSpaceProgram# 

Some info on this setup:

I'm doing this in a chroot, on a RPi 4B, (I'm just using the chroot to contain it), and here's the command I used to create this chroot: sudo debootstrap --variant=minbase buster rpios http://raspbian.raspberrypi.org/raspbian/ I was just thinking that the --variant=minbase might have not installed some libs and things, so I was wondering if this is the cause of the errors?

When running the Launcher.x86, this happens:

Box86 with Dynarec v0.1.9 591bafe8 built on Dec 23 2020 13:44:14
No protocol specified
7527|SIGSEGV @0xb5aaba7c (???(/lib/arm-linux-gnueabihf/libX11.so.6/0xb5aaba7c)) (x86pc=0x635d537b/???:"???", esp=0xb636a11c), for accessing 0x84 (code=1/prot=0), db=(nil)((nil):(nil)/(nil):(nil)/???)
Segmentation fault
root@raspberrypi44g:/home/pi/ksp/KerbalSpaceProgram# 

Pythonic456 avatar Dec 24 '20 18:12 Pythonic456

What do I need to do next?

Thanks :)

Pythonic456 avatar Dec 26 '20 12:12 Pythonic456

@Itai-Nelken Can you describe exactly how you got it to work?

Thanks!

Pythonic456 avatar Jan 01 '21 11:01 Pythonic456

@Pythonic456 it never really worked for me, the farthest I got is the 'new game' menu after downgrading to mesa 20.2, than it crashed. now it opening it a black window appears for a few seconds and disappears without any errors. when it did work, it took over a hour to load, but rpinews says it should take a few minutes to load, so I have no idea what is happening and why it isn't loading properly.

Itai-Nelken avatar Jan 01 '21 11:01 Itai-Nelken

Do you think it is possible for it to work though?

Thanks :)

Pythonic456 avatar Jan 01 '21 11:01 Pythonic456

Do you think it is possible for it to work though?

@Pythonic456 rpinews and phoenixbyrd say it runs.

for me it aborts here:

Importing game controller configs
Aborted

Itai-Nelken avatar Jan 01 '21 11:01 Itai-Nelken

Same for me.

Thanks anyway.

Pythonic456 avatar Jan 01 '21 11:01 Pythonic456

Yeah, I also have the Abort message on my side. I'll see if I can debug it, but no promesses, unity games are still difficult to debug.

ptitSeb avatar Jan 01 '21 12:01 ptitSeb

Thanks :+1:

Pythonic456 avatar Jan 01 '21 13:01 Pythonic456

Thanks!

Itai-Nelken avatar Jan 01 '21 13:01 Itai-Nelken

image I got the old Linux 32bits version to works. Here in a 800x600 Windows on Pi4/TwisterOS. (It does segfault at exit, but game itself seems to run). I haven't tried the Steam/Windows version yet.

ptitSeb avatar Jan 01 '21 17:01 ptitSeb

So you have to use TwisterOS?

Thanks :)

Pythonic456 avatar Jan 01 '21 17:01 Pythonic456

So you have to use TwisterOS?

I don't know, I don't test on twenty thousand OS.... I just tested on TwisterOS. I assume it can work elsewhere, as long as you have box86 and a good build of mesa.

ptitSeb avatar Jan 01 '21 17:01 ptitSeb