aardvark.media
aardvark.media copied to clipboard
Failed to link to librt.so.1 on linux
Got this error at runtime:
2: ERROR
2: [Client] 1: rendering faulted with System.DllNotFoundException: Unable to load shared library 'librt' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibrt: cannot open shared object file: No such file or directory
2: at Aardvark.Service.SharedMemory.Posix.Linux.shmunlink(String name)
2: at Aardvark.Service.SharedMemory.Posix.Linux.create(String name, Int64 size)
2: at Aardvark.Service.MappedClientRenderTask.recreateMapping(Int64 desiredSize)
2: at Aardvark.Service.MappedClientRenderTask.ProcessImage(IFramebuffer target, IRenderbuffer color)
2: at Aardvark.Service.ClientRenderTask.Run(AdaptiveToken token, ClientInfo info, ClientState state)
2: at <StartupCode$Aardvark-Service>.$Server.arg10@1860-1(Client this, V2i size, C4b background, AdaptiveToken token) (stopping)
I have librt.so.1 installed at /lib
thanks for reporting. as a workaround you could use attribute "useMapping" "false" on the render control. clearly this is a not optimal since it should be robust to missing mapping support. is there a problem with new sharedmem builds @krauthaufen - any clue? for real diagnosis of the actual problem (wich is hard when not having your system) you could use LD_DEBUG=all dotnet yourapp.dll? maybe this gives a clue. otherwise nm or ldd could help to figure out what is missing.
I don't think there is a linux without shared-memory support, so i guess this is related to some version trouble with librt? Maybe we should manually try to load librt.so.1?
I use Fedora 36, and it does have librt. I noticed it attempted to load "liblibrt"
We have recently changed how we import those functions. Your error message looks like you're using an old version of media. Everything is working on my Ubuntu 22.04 system.