You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running dotnet fsi someFile.fsx on ubuntu 20.04 with dotnet-sdk installed via snap, SDL2 is not found. Neither the shipped SDL2.so or a user-installed SDL2, through libsdl2-dev.
The problem seems to be related to ld not finding GLIBC. The system were the issue was discovered has glibc-2.35, confirmed by ldd --version.
An abbreviated output from LD_DEBUG=libs dotnet fis someFile.fsx is seen below:
> grep SDL2 lddebug\ \(1\).log
50390: find library=SDL2.so [0]; searching
50390: trying file=/snap/dotnet-sdk/177/shared/Microsoft.NETCore.App/6.0.8/../../../lib/x86_64-linux-gnu/SDL2.so
50390: trying file=/snap/dotnet-sdk/177/shared/Microsoft.NETCore.App/6.0.8/../../../usr/lib/x86_64-linux-gnu/SDL2.so
50390: trying file=/snap/dotnet-sdk/177/usr/lib/x86_64-linux-gnu/SDL2.so
50390: trying file=/snap/dotnet-sdk/177/lib/x86_64-linux-gnu/SDL2.so
50390: trying file=/lib/x86_64-linux-gnu/SDL2.so
50390: trying file=/usr/lib/x86_64-linux-gnu/SDL2.so
50390: trying file=/lib/SDL2.so
50390: trying file=/usr/lib/SDL2.so
50390: find library=libSDL2.so [0]; searching
50390: trying file=/snap/dotnet-sdk/177/shared/Microsoft.NETCore.App/6.0.8/../../../lib/x86_64-linux-gnu/libSDL2.so
50390: trying file=/snap/dotnet-sdk/177/shared/Microsoft.NETCore.App/6.0.8/../../../usr/lib/x86_64-linux-gnu/libSDL2.so
50390: trying file=/snap/dotnet-sdk/177/usr/lib/x86_64-linux-gnu/libSDL2.so
50390: trying file=/snap/dotnet-sdk/177/lib/x86_64-linux-gnu/libSDL2.so
50390: trying file=/lib/x86_64-linux-gnu/libSDL2.so
50390: /snap/dotnet-sdk/177/lib/x86_64-linux-gnu/libm.so.6: error: version lookup error: version `GLIBC_2.29' not found (required by /lib/x86_64-linux-gnu/libSDL2.so) (fatal)
50390: find library=SDL2 [0]; searching
50390: trying file=/snap/dotnet-sdk/177/shared/Microsoft.NETCore.App/6.0.8/../../../lib/x86_64-linux-gnu/SDL2
50390: trying file=/snap/dotnet-sdk/177/shared/Microsoft.NETCore.App/6.0.8/../../../usr/lib/x86_64-linux-gnu/SDL2
50390: trying file=/snap/dotnet-sdk/177/usr/lib/x86_64-linux-gnu/SDL2
50390: trying file=/snap/dotnet-sdk/177/lib/x86_64-linux-gnu/SDL2
50390: trying file=/lib/x86_64-linux-gnu/SDL2
50390: trying file=/usr/lib/x86_64-linux-gnu/SDL2
50390: trying file=/lib/SDL2
50390: trying file=/usr/lib/SDL2
50390: find library=libSDL2 [0]; searching
50390: trying file=/snap/dotnet-sdk/177/shared/Microsoft.NETCore.App/6.0.8/../../../lib/x86_64-linux-gnu/libSDL2
50390: trying file=/snap/dotnet-sdk/177/shared/Microsoft.NETCore.App/6.0.8/../../../usr/lib/x86_64-linux-gnu/libSDL2
50390: trying file=/snap/dotnet-sdk/177/usr/lib/x86_64-linux-gnu/libSDL2
50390: trying file=/snap/dotnet-sdk/177/lib/x86_64-linux-gnu/libSDL2
50390: trying file=/lib/x86_64-linux-gnu/libSDL2
50390: trying file=/usr/lib/x86_64-linux-gnu/libSDL2
50390: trying file=/lib/libSDL2
50390: trying file=/usr/lib/libSDL2
50390: /snap/dotnet-sdk/177/lib/x86_64-linux-gnu/libc.so.6: error: version lookup error: version `GLIBC_2.33' not found (required by /home/peter/.nuget/packages/diku.canvas/1.0.0/runtimes/linux-x64/native/libSDL2.so) (fatal)
System.DllNotFoundException: Unable to load shared library 'SDL2' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libSDL2: cannot open shared object file: No such file or directory
The text was updated successfully, but these errors were encountered:
Uninstalling the snap-distribution of dotnet-sdk and reinstalling with good ol' sudo apt install dotnet-sdk the issue vanishes.
My proposed "fix" for this is to lecture people on not to use snap, and not waste any time on fixing problems caused by projects that wants to change the way(s) software works.
My current hypothesis is that the above installation guide have not be followed to the dot. Maybe the DOTNET_ROOT environment variable isn't set, or maybe it is something like: dotnet/sdk#10403.
When running
dotnet fsi someFile.fsx
on ubuntu 20.04 with dotnet-sdk installed via snap, SDL2 is not found. Neither the shipped SDL2.so or a user-installed SDL2, throughlibsdl2-dev
.The problem seems to be related to
ld
not findingGLIBC
. The system were the issue was discovered has glibc-2.35, confirmed byldd --version
.An abbreviated output from
LD_DEBUG=libs dotnet fis someFile.fsx
is seen below:The text was updated successfully, but these errors were encountered: