Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stardew Valley v1.5.6.1988831614 (53040) GOG version Segmentation fault #531

Closed
ricoazzurro opened this issue Feb 27, 2023 · 6 comments
Closed

Comments

@ricoazzurro
Copy link

Description

Stardew Valley v1.5.6.1988831614 (53040) GOG version not working.

  • Old version such as 1.5.4 GOG which contains Stardew Valley.exe can use the mono trick and ln -s libopenal.so libsoft_oal.so and working
  • The latest version as 1.5.6 doesn't have .exe file, so I can not use the mono trick.
  • Already tested using debian x86_64 libs for missing libs with LD trick

Tested on

RADXA Rock 5B (rk3588) 16GB
LFS, BSP kernel 5.10.110+, Gnome 43.4, box64 (steam_chrome branch) git cc3237a
1080p, default game setting

Reproduce

# working dir is $HOME
# prepare the game file with gogextract.py
# https://github.com/Yepoleb/gogextract.git
# https://framagit.org/IroAlexis/gogextract.git

cd ~
wget https://raw.githubusercontent.com/Yepoleb/gogextract/master/gogextract.py
sudo install -vDm755 gogextract.py /usr/bin/gogextract.py

gogextract.py stardew_valley_1_5_6_1988831614_53040.sh stardew_valley
cd stardew_valley
unzip data.zip
cd data/noarch
./start.sh

# then I got the stardew-1.log, reminding me missing libs, 
# liblttng-ust.so libnuma.so libicuuc.so libFAudio.so libssl.so liburcu.so
# so I go to https://packages.debian.org/stable/libs/ to fetch them

cd ~
mkdir -pv stardew_libs
cd stardew_libs

wget http://ftp.us.debian.org/debian/pool/main/u/ust/liblttng-ust0_2.12.1-1_amd64.deb
wget http://ftp.us.debian.org/debian/pool/main/n/numactl/libnuma1_2.0.12-1+b1_amd64.deb
wget http://ftp.us.debian.org/debian/pool/main/i/icu/libicu67_67.1-7_amd64.deb
wget http://ftp.us.debian.org/debian/pool/main/f/faudio/libfaudio0_21.02-1_amd64.deb
wget http://ftp.us.debian.org/debian/pool/main/o/openssl/libssl1.1_1.1.1n-0+deb11u3_amd64.deb
wget http://ftp.us.debian.org/debian/pool/main/libu/liburcu/liburcu6_0.12.2-1_amd64.deb

# extract the deb, and put in $HOME/stardew_libs/x86_64-linux-gnu
for LIB in libfaudio0_21.02-1_amd64.deb liblttng-ust0_2.12.1-1_amd64.deb libssl1.1_1.1.1n-0+deb11u3_amd64.deb libicu67_67.1-7_amd64.deb libnuma1_2.0.12-1+b1_amd64.deb liburcu6_0.12.2-1_amd64.deb; do
    ar -x $LIB
    tar -xf data.tar.xz
done

mv usr/lib/x86_64-linux-gnu .

# run the game again with LD trick, and got stardew-2.log which I don't know how to fix.

cd ~/stardew_valley/data/noarch
LD_LIBRARY_PATH=$HOME/stardew_libs/x86_64-linux-gnu ./start.sh

Logs

stardew-1.log
stardew-2.log

Status

Previous behavior:

Old version with .exe file can use mono trick to play the game.

Current behavior:

Segmentation fault

Screenshots

OpenGL

Additional Information

Box64 (steam_chrome branch), compiled with

cmake -DCMAKE_INSTALL_PREFIX=/usr       \
      -DCMAKE_BUILD_TYPE=RelWithDebInfo \
      -DRK3588=1                        \
      ..

libcoreclrtraceptprovider.so looks like .net, I'll furthur test it by replacing with older or newer debian x64 libs.

Thanks again for the awesome project. Since Stardew Valley is an interesting game to play and good to have latest version with full features, I wrote the above niebie stuff, hope it won't bother you too much and issue post here may benifit more gamers. Have a lovely day :)

@ptitSeb
Copy link
Owner

ptitSeb commented Feb 27, 2023

I would use a simplified version of the setup:
With a box64 installed from sources in the default folder, installing startdevalley is just:

BOX64_BASH=~/box64/tests/bash box64 ./stardew_valley_1_5_6_1988831614_53040.sh

And it will launch the gog setup.

As for installed libs, only use wget http://ftp.us.debian.org/debian/pool/main/i/icu/libicu67_67.1-7_amd64.deb don't get the other.
You might have to sudo apt install libfaudio0 libssl1.1 to have native version.

@ricoazzurro
Copy link
Author

ricoazzurro commented Feb 27, 2023

It Works! Box64 Awesome!
Thanks a lot ptitSeb for basicly hand by hand guilding me through.

I'll write down the process, see if helps others.

  1. BOX64_BASH=~/box64/tests/bash box64 ./stardew_valley_1_5_6_1988831614_53040.sh to launch the gog gui installer works.
  • make sure box64 git source is in ~
  • chmod +x stardew_valley_1_5_6_1988831614_53040.sh if it's not executable
  • gogextract method also works
  1. as told by Seb, on my system, libicu libfaudio libssl1 are needed.
  • libicu, I need x64 lib
  • libfaudio, need aarch64 lib, I compiled and installed it systemwide.
    can also solve it by apt install or extract the deb then sideload it with LD_LIBRARY_PATH trick
  • libssl1, need aarch64 lib, since I try to avoid OpenSSL 1 and already have OpenSSL 3 in my system,
    I choose to sideload it. And tips from Seb, libss1 is needed by a lot of games.
  1. only the above 3 libs are essential for box64 stardew valley.
  • LD_LIBRARY_PATH=/path/you/put/yourextralibs ./start.sh
  1. more tips from Seb
  • there is no way to know which libs are essential before hand
  • It's ok to have a missing lib, the game still works
  • but can tell which lib needed as native (aarch64), so one can test and save some time.

eg. in this case,

last dlerror is libssl.so.1.1: cannot open shared object file: No such file or directory,
you see the cannot open shared object file is the sign that box try to use the native one
so it's wrapped

Finally got it work.
Two screenshots to celebrate. Cheers.

stardew-1
stardew-2

@josch
Copy link
Sponsor Contributor

josch commented Aug 26, 2023

@ricoazzurro do you have some authoritative source about the "mono trick" no longer working? I'm not doubting that it's true but maybe you know somebody who wrote about why it doesn't work anymore after Stardew switched from XNA to MonoGame?

@ricoazzurro
Copy link
Author

@josch

I don't have authoritative source, only my newbie source :)

fyi.

There's no Stardew Valley.exe in latest version. The "mono trick" requires window exe binery.
And newer versions is not XNA/FNA/MonoGame, its engine switched to .Net.
I did not test if it could be launched via copy the exe binery from win version to linux version.

Ref 1. mono trick
https://magazine.odroid.com/article/playing-modern-fna-games-on-the-odroid-platform/

Ref 2. stardew moved to .NET Framework in 1.5.5 iirc. and dev removed the exe binery.
https://stardewvalleywiki.com/Version_History

@josch
Copy link
Sponsor Contributor

josch commented Sep 3, 2023

Thank you for coming back on this issue! As the result of my investigation, the ./play.it author made some changes to the Stardew Valley setup and now one can just do:

play.it stardew_valley_1_5_6_1988831614_53040.sh
sudo apt install ./stardew-valley_1.5.6-gog53040+20230827.2_amd64.deb ./stardew-valley-data_1.5.6-gog53040+20230827.2_all.deb
box64 "/usr/share/games/stardew-valley/Stardew Valley"

Then the game will work "out of the box" because play.it also takes care of obtaining old versions of libssl1 and liblttng-ust0. I've already packaged latest box64 for Debian (which includes some fixes to make recent Stardew Valley work) and have sponsored a new version of play.it which currently wating in NEW. The play.it author is also interested in making it easier to use box64 with play.it directly: https://forge.dotslashplay.it/play.it/scripts/-/issues/453

@ondravondra
Copy link

Segfault still happens at Raspberry PI 5 with bookworm. I managed to fix it by using emulated libnuma.

Download and extract these amd64 debs using the script in the original post:

liblttng-ust0_2.12.1-1_amd64.deb
libnuma1_2.0.12-1+b1_amd64.deb
libicu67_67.1-7_amd64.deb
liburcu6_0.12.2-1_amd64.deb

Now run the game like this:

BOX64_LD_LIBRARY_PATH=/mnt/libs/usr/lib/x86_64-linux-gnu BOX64_PREFER_EMULATED=1 ./start.sh

Without BOX64_PREFER_EMULATED it uses native libnuma but crashes because:

Error: Symbol get_mempolicy not found, cannot apply R_X86_64_JUMP_SLOT @0x7fff060733c0 (0xf126) in /mnt/libs/usr/lib/x86_64-linux-gnu/liblttng-ust.so.0

This symbol is commeted out in box64 code:

//GOW(get_mempolicy,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants