Simutrans

Simutrans

View Stats:
ferumu Nov 6, 2020 @ 5:04pm
Cannot start on Linux due to wrong library path
When starting the game I get:

/home/steam/.steam/debian-installation/steamapps/common/Simutrans/simpreloader: error while loading shared libraries: libsteam_api.so: cannot open shared object file: No such file or directory

Running ldd on the preloader shows:

ldd ./simpreloader | grep 'not found' libsteam_api.so => not found libSDL2_ttf-2.0.so.0 => not found

I think this happens because the LD_LIBRARY_PATH is not set in combination with this simpreloader having odd linkage. I think the easiest way to fix this is to use a wrapper shell script. Many Valve games to do this, here is a snippet from Left 4 Dead 2.

GAMEROOT=$(cd "${0%/*}" && echo $PWD) #determine platform UNAME=`uname` if [ "$UNAME" == "Darwin" ]; then # Workaround OS X El Capitan 10.11 System Integrity Protection (SIP) which does not allow # DYLD_INSERT_LIBRARIES to be set for system processes. if [ "$STEAM_DYLD_INSERT_LIBRARIES" != "" ] && [ "$DYLD_INSERT_LIBRARIES" == "" ]; then export DYLD_INSERT_LIBRARIES="$STEAM_DYLD_INSERT_LIBRARIES" fi # prepend our lib path to LD_LIBRARY_PATH export DYLD_LIBRARY_PATH="${GAMEROOT}"/bin:$DYLD_LIBRARY_PATH elif [ "$UNAME" == "Linux" ]; then # prepend our lib path to LD_LIBRARY_PATH export LD_LIBRARY_PATH="${GAMEROOT}"/bin:$LD_LIBRARY_PATH fi

For now I can make it start if I set these launch options in Steam:

LD_LIBRARY_PATH="/home/steam/.steam/debian-installation/steamapps/common/Simutrans:$LD_LIBRARY_PATH" %command%
< >
Showing 1-6 of 6 comments
Roboron  [developer] Nov 7, 2020 @ 4:22am 
You can't start the game from the Steam client?

If I run ldd i get the same results as you, but starting from the steam client open the preloader just fine. It seems that the steam client already do that for you.
Last edited by Roboron; Nov 7, 2020 @ 4:27am
ferumu Nov 7, 2020 @ 11:35am 
Yeah opening it from the Steam client (clean install, then I press play) gives this error in l~/.steam/debian-installation/error.log. I'm running the Steam beta client on Debian 10 amd64 architecture. Only the new Steam Soldier runtime is installed, the old runtime isn't.

Possibly the beta client or the new runtime causes this issue?
fmt Nov 9, 2020 @ 12:10pm 
I'm getting the same error.
Roboron  [developer] Nov 9, 2020 @ 2:22pm 
The new Steam Soldier runtime is the problem. I don't know if I should solve this, since the new runtime is not yet the default, and maybe this will be solved when that time comes.
Roboron  [developer] Dec 9, 2020 @ 4:05pm 
Today, the new Steam runtime apparently hit Steam stable. This caused this issue - and also required more extra libraries.

I've solved it the way it was proposed. However, in my testing Debian machine, this increased loading times considerably, due to sdl_mixer. I may need to compile a new build without music if users complain about large loading times.
ferumu Dec 9, 2020 @ 4:30pm 
Thanks for fixing!
< >
Showing 1-6 of 6 comments
Per page: 1530 50