Moonscraper-Chart-Editor icon indicating copy to clipboard operation
Moonscraper-Chart-Editor copied to clipboard

"SDL2 Linux runtime dependency not found" when SDL2 is installed

Open RomanPro100 opened this issue 1 year ago • 7 comments

When I run the binary, a popup appears saying "SDL2 Linux runtime dependency not found" even though I have all dependencies installed. image The executable path is ~/Moonscraper Chart Editor v1.5.4 Linux (Universal)/Moonscraper Chart Editor.x86_64

My system: image

RomanPro100 avatar Jan 20 '24 23:01 RomanPro100

@bmwalters A common solution to this is to install libsdl2-dev instead. Is there a solution to not have to install the dev version on systems that encounter this issue?

FireFox2000000 avatar Jan 21 '24 06:01 FireFox2000000

That helped, thx

RomanPro100 avatar Jan 21 '24 17:01 RomanPro100

Keeping open for visibility as dev version is a workaround.

FireFox2000000 avatar Jan 22 '24 10:01 FireFox2000000

I think there’s a few possibilities:

  • user might have sdl 1 or old sdl2 version which is updated when installing dev package.
  • we might be depending on one of the sdl2 sub-packages (e.g. sdl2-mixer) by default

I suggest adding a string representation of the DllNotFoundException to the error window for further troubleshooting and so we know which library name is not found

bmwalters avatar Jan 23 '24 14:01 bmwalters

Looking at previous issues I see we used to have the exception string which indicates at least one user had issues with the main SDL2 library, making the second point less likely https://github.com/FireFox2000000/Moonscraper-Chart-Editor/issues/62

Looking at this issue I see the user had version 2.0.10 whereas 2.28.1 was available at the time they opened the issue, making the first point more likely https://github.com/FireFox2000000/Moonscraper-Chart-Editor/issues/110

bmwalters avatar Jan 23 '24 15:01 bmwalters

Apparently this can also happen if dynamic linking dependencies of SDL fails due to other dependency issues on the system. Running the binary with the env var LD_DEBUG=libs may help debug. https://github.com/ppy/osu/issues/18628

bmwalters avatar Jan 23 '24 15:01 bmwalters