RobustToolbox icon indicating copy to clipboard operation
RobustToolbox copied to clipboard

Linux platforms no longer detect fluidsynth if the game is running with steam.

Open VasilisThePikachu opened this issue 1 year ago • 17 comments
trafficstars

image (ignore the low vram artifacts i did this in a vm)

Reported in #help too by another user https://discord.com/channels/310555209753690112/790656972801572905/1303720864080068689

[ERRO] midi: Failed to initialize fluidsynth due to exception, disabling MIDI support:
System.DllNotFoundException: Unable to load shared library 'fluidsynth' or one of its dependencies. In order to help diagnose loading problems, consider using a tool like strace. If you're using glibc, consider setting the LD_DEBUG environment variable: 
/home/myra/.steam/debian-installation/steamapps/common/Space Station 14/bin/loader/fluidsynth.so: cannot open shared object file: No such file or directory
/home/myra/.steam/debian-installation/steamapps/common/Space Station 14/dotnet/shared/Microsoft.NETCore.App/8.0.0/fluidsynth.so: cannot open shared object file: No such file or directory
/home/myra/.steam/debian-installation/steamapps/common/Space Station 14/bin/loader/libfluidsynth.so: cannot open shared object file: No such file or directory
/home/myra/.steam/debian-installation/steamapps/common/Space Station 14/dotnet/shared/Microsoft.NETCore.App/8.0.0/libfluidsynth.so: cannot open shared object file: No such file or directory
/home/myra/.steam/debian-installation/steamapps/common/Space Station 14/bin/loader/fluidsynth: cannot open shared object file: No such file or directory
/home/myra/.steam/debian-installation/steamapps/common/Space Station 14/dotnet/shared/Microsoft.NETCore.App/8.0.0/fluidsynth: cannot open shared object file: No such file or directory
/home/myra/.steam/debian-installation/steamapps/common/Space Station 14/bin/loader/libfluidsynth: cannot open shared object file: No such file or directory
/home/myra/.steam/debian-installation/steamapps/common/Space Station 14/dotnet/shared/Microsoft.NETCore.App/8.0.0/libfluidsynth: cannot open shared object file: No such file or directory

   at NFluidsynth.Native.LibFluidsynth.fluid_set_log_function(Int32 severity, LoggerDelegate func, IntPtr data)
   at NFluidsynth.Logger.SetLoggerMethod(LoggerDelegate method)
   at Robust.Client.Audio.Midi.MidiManager.InitializeFluidsynth() in /home/runner/work/RobustToolbox/RobustToolbox/Robust.Client/Audio/Midi/MidiManager.cs:line 176
[INFO] game: Shutting down! Reason: Main window closed

Repro: Linux mint, Arch (well all linux distros that update steam will be effected. As steam native runtimes are now default.)

Needs #4997

Fix for now is to use standalone launcher. Or flatpak

VasilisThePikachu avatar Nov 06 '24 16:11 VasilisThePikachu

Oh i bricked my mint vm trying to install vmbox to copy the error

VasilisThePikachu avatar Nov 06 '24 16:11 VasilisThePikachu

image image Can confirm it's not being detected, linux mint 22, ss14 version 0.29.1.0

ItzzCode avatar Nov 08 '24 01:11 ItzzCode

For everyone experiencing this, I have tried every solution in here with me having fluidsynth V. 2.3.7, on Arch Linux kernel 6.11.6-arch1-1. The trick that worked for me is putting LD_PRELOAD=/lib/libfluidsynth.so (or whatever it is called in your system) in the launch options from the executable (so for me LD_PRELOAD=/lib/libfluidsynth.so ~/.local/share/Steam/steamapps/common/Space Station 14 Playtest/SS14.Launcher). I haven't been able to find a way to put it in the Steam commandbox however, since it gives out an error saying ERROR: ld.so: object '/lib/fluidsynth.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored., with ~/.local/share/Steam/steamapps/common/SteamLinuxRuntime_soldier/pressure-vessel/bin/steam-runtime-launcher-interface-0: error while loading shared libraries: libportaudio.so.2: cannot open shared object file: No such file or directory being the thing that terminates the process in spite of libportaudio.so.2 existing in /lib.

For some reason, only GLIBC_TUNABLES=glibc.rtld.dynamic_sort=1 LD_PRELOAD=/lib/fluidsynth.so,libportaudio.so.2 %command% as Steam launch parameters is able to fix that and get the game running, but MIDI still isn't detected, in spite of the LD_PRELOAD.

NicoSGF64 avatar Nov 16 '24 20:11 NicoSGF64

@NicoSGF64 If you look at the logs again you will probably see another error similar to error while loading shared libraries: libportaudio.so.2. It took me six tries to get a full LD_PRELOAD command that works, my end result was LD_PRELOAD="/usr/lib/libportaudio.so /usr/lib/libfluidsynth.so /usr/lib/libinstpatch-1.0.so.2 /usr/lib/libreadline.so.8 /usr/lib/libglib-2.0.so.0 /usr/lib/libpcre2-8.so.0" %command%

I'm on an arch derivative so it'll probably work if you're on arch, this reportedly doesn't work for people on other distros

waylon531 avatar Nov 16 '24 22:11 waylon531

image I am also seeing this on Ubuntu 24.04.1 with fluidsynth and libfluidsynth3 version 2.3.4 installed. I am launch this through Steam. I put a symlink from Space S

inside Space Station 14 Playtest/bin/loader I put the following symlink with no luck. lrwxrwxrwx 1 andrew andrew 44 Dec 3 21:59 libfluidsynth.so -> /usr/lib/x86_64-linux-gnu/libfluidsynth.so.3

andrewth16 avatar Dec 06 '24 03:12 andrewth16

I've confirmed that adding LD_PRELOAD="/usr/lib/x86_64-linux-gnu/libfluidsynth.so /usr/lib/x86_64-linux-gnu/libinstpatch-1.0.so.2 /usr/lib/x86_64-linux-gnu/libreadline.so.8 /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 /usr/lib/x86_64-linux-gnu/libpcre2-8.so.0" %command% (notice there's no libportaudio.so and the addition of the x86_64-linux-gnu directory to the paths) solves this issue on Linux Mint 22 when running from Steam. (I installed Fluidsynth using the package manager and libfluidsynth-dev with apt-get.)

I've not yet tested to see if any of those libraries are superfluous, but I suspect some of them might be.

frobnic8 avatar Jan 13 '25 21:01 frobnic8

I've confirmed that adding LD_PRELOAD="/usr/lib/x86_64-linux-gnu/libfluidsynth.so /usr/lib/x86_64-linux-gnu/libinstpatch-1.0.so.2 /usr/lib/x86_64-linux-gnu/libreadline.so.8 /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 /usr/lib/x86_64-linux-gnu/libpcre2-8.so.0" %command% (notice there's no libportaudio.so and the addition of the x86_64-linux-gnu directory to the paths) solves this issue on Linux Mint 22 when running from Steam. (I installed Fluidsynth using the package manager and libfluidsynth-dev with apt-get.)

I've not yet tested to see if any of those libraries are superfluous, but I suspect some of them might be.

For me and a friend with a fresh install of Mint 22.1 and Mint 22 respectively, the following worked: LD_PRELOAD="/usr/lib/x86_64-linux-gnu/libfluidsynth.so.3 /usr/lib/x86_64-linux-gnu/libinstpatch-1.0.so.2 /usr/lib/x86_64-linux-gnu/libreadline.so.8 /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 /usr/lib/x86_64-linux-gnu/libpcre2-8.so.0" %command%

I thought I may have needed to include the shared sound font path, but it doesn't seem to be needed.

FlameSoulis avatar Feb 20 '25 02:02 FlameSoulis

had the same error, in short SS14 needs its paths updated to account for the new paths that linux systems are now using :)

jamilnielsen avatar Feb 24 '25 22:02 jamilnielsen

This problem is still existing. To verbatim quote my error message:

[ERRO] midi: Failed to initialize fluidsynth due to exception, disabling MIDI support:
System.DllNotFoundException: Unable to load shared library 'fluidsynth' or one of its dependencies.
/steamgamepath/bin/loader/fluidsynth.so
/steamgamepath/bin/loader/libfluidsynth.so

This problem doesn't resolve when the libfluidsynth.so is copied from the original fluidsynth installation to where the game requests it.

Also is it not easier to just ship fluidsynth within the game?

B1773rm4n avatar Mar 22 '25 09:03 B1773rm4n

Also is it not easier to just ship fluidsynth within the game?

https://github.com/space-wizards/RobustToolbox/issues/4997

This is why I explicitly put "needs https://github.com/space-wizards/RobustToolbox/issues/4997" on this issue

VasilisThePikachu avatar Mar 22 '25 13:03 VasilisThePikachu

Running the launcher using steam-play-none or directly also works

ghost avatar Mar 22 '25 21:03 ghost

Running the launcher using steam-play-none or directly also works

i love that the fix is to bypass the fact that ss14 devs enabled some sort of explicit tag on steam that forces proton. if only they would just turn the tag off.

jamilnielsen avatar Apr 30 '25 19:04 jamilnielsen

i love that the fix is to bypass the fact that ss14 devs enabled some sort of explicit tag on steam that forces proton. if only they would just turn the tag off.

This does not seem to be true? Runs natively by default

Image

Errant-4 avatar Apr 30 '25 20:04 Errant-4

steam-play-none also disables the steam linux runtime. Not just proton. So the launcher runs as if it was launched directly (just with steam tracking time and the steam overlay)

ghost avatar Apr 30 '25 21:04 ghost

And steam Linux runtime is what causes this issue, the update that added the screen recorder replay thing brought this as well.

We are not forcing proton, this game runs native I don't (think) it's possible to tell steam to not use a runtime on our side. I doubt that's a thing you can do.

VasilisThePikachu avatar Apr 30 '25 23:04 VasilisThePikachu

Someone with a Steamworks access might just be able to ask Valve to add it to the runtime to get around the issue - https://partner.steamgames.com/doc/store/application/platforms/linux#:~:text=Q%3A%20My%20Linux,Development%20Discussions%20board

minus1over12 avatar Jun 08 '25 00:06 minus1over12

Someone with a Steamworks access might just be able to ask Valve to add it to the runtime to get around the issue - https://partner.steamgames.com/doc/store/application/platforms/linux#:~:text=Q%3A%20My%20Linux,Development%20Discussions%20board

We aren't doing this. This is a terrible solution.

Locking this issue due to off-topic discussions. We know what we need to do.

PJB3005 avatar Jun 08 '25 19:06 PJB3005

Should be fixed by latest launcher.

PJB3005 avatar Sep 26 '25 18:09 PJB3005