After upgrading .net core from 3.1 to 5 I'm getting error in loading dll: GLIBC_2.29 not found
I have a native application written in c++ and complied into the .so library through docker which I'm using in the .net core 3 projects and importing .so library as DLL using DllImport InterOpServices. I'm utilizing azure DevOps to host and deploy the application where my shared library .so works well with .net core 3 and aspnet:3.1-focal/sdk:3-1-focal docker images but as part of upgrading the framework from .net core 3 to .net core 5, I'm getting a runtime error while utilizing the shared library (.so library). Below is the error.
Error during using xxx library, Inner ExceptionSystem.DllNotFoundException: Unable to load shared library 'xxxx/libwoundmeasurementinterface_be.so' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: /lib/x86_64-linux-gnu/libm.so.6: version GLIBC_2.29' not found (required by xxxx/libwoundmeasurementinterface_be.so)
I checked GLIBC_2.29 is not supported anymore in Ubuntu versions, I'm suspecting it might be something with docker images of aspnet:5-0/sdk:5.0 versions.
The way I'm loading shared library in .net project
[DllImport("xxxx/libwoundmeasurementinterface_be.so", EntryPoint = "NameOfTheMethod", CallingConvention = CallingConvention.StdCall, SetLastError = true)]
In my c++ native code nowhere we have nowhere hardcoded the version of GLIBC_2.29.
How to check what libraries are installed in docker images? Is upgrading the docker images to 5.x version is causing issue ?
What could be a possible solution here?