Closed abspro closed 2 years ago
Sooner or later it had to happen. Debugging via LD_DEBUG revealed some missing symbols on Fedora's distro.
undefined symbol: _dl_make_stack_executable, version GLIBC_PRIVATE (./libpthread.so.0)
That happened because the runtime tried to load native dependencies from another distro (CentOS 7) which I included by default. In the next hotfix, libm, libc
and other system libraries will be removed from the Linux package.
Describe the bug On Fedora 35 when targeting a .NET 6 project an exception is thrown when
GdalBase.ConfigureAll()
is executed. I was following the steps in this article to read a FileGDB using the OpenFileGDB gdal driver.https://www.spatial-focus.net/blog/working-with-file-geodatabase-in-csharp-1
To Reproduce
try { GdalBase.ConfigureAll(); } catch(Exception ex) { Console.WriteLine(ex); }
System.TypeInitializationException: The type initializer for 'OSGeo.GDAL.GdalPINVOKE' threw an exception. ---> System.TypeInitializationException: The type initializer for 'SWIGExceptionHelper' threw an exception. ---> System.DllNotFoundException: Unable to load shared library 'gdal_wrap' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libgdal_wrap: cannot open shared object file: No such file or directory at OSGeo.GDAL.GdalPINVOKE.SWIGExceptionHelper.SWIGRegisterExceptionCallbacks_Gdal(ExceptionDelegate applicationDelegate, ExceptionDelegate arithmeticDelegate, ExceptionDelegate divideByZeroDelegate, ExceptionDelegate indexOutOfRangeDelegate, ExceptionDelegate invalidCastDelegate, ExceptionDelegate invalidOperationDelegate, ExceptionDelegate ioDelegate, ExceptionDelegate nullReferenceDelegate, ExceptionDelegate outOfMemoryDelegate, ExceptionDelegate overflowDelegate, ExceptionDelegate systemExceptionDelegate) at OSGeo.GDAL.GdalPINVOKE.SWIGExceptionHelper..cctor() --- End of inner exception stack trace --- at OSGeo.GDAL.GdalPINVOKE.SWIGExceptionHelper..ctor() at OSGeo.GDAL.GdalPINVOKE..cctor() --- End of inner exception stack trace --- at OSGeo.GDAL.GdalPINVOKE.AllRegister() at OSGeo.GDAL.Gdal.AllRegister() at MaxRev.Gdal.Core.GdalBase.ConfigureGdalDrivers() at MaxRev.Gdal.Core.GdalBase.ConfigureAll() at Program.$(String[] args) in /home/blahblahblah/src/test/Program.cs:line 6