Skip to content

Unable to load shared library 'gdal_wrap' #207

@KubaSzostak

Description

@KubaSzostak

Describe the bug

After upgrade from v3.12.0.397 to v3.12.0.423 we got DllNotFoundException:

Unable to load shared library 'gdal_wrap' or one of its dependencies

To Reproduce

Call the following code:

Gdal.Core.GdalBase.ConfigureAll();

Expected behavior

GDAL drivers are registered successfully.

Environment information:

  • OS (version): Debian 12 (bookworm)
  • Package version (core): v3.12.0.423
  • Package version (runtime): v3.12.0.423 (LinuxRuntime.Minimal)

Additional context

---> 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 using a tool like strace. If you're using glibc, consider setting the LD_DEBUG environment variable: 
/app/runtimes/linux-x64/native/gdal_wrap.so: cannot open shared object file: No such file or directory
/app/runtimes/any/native/gdal-data/gdal_wrap.so: cannot open shared object file: No such file or directory
/app/runtimes/linux-x64/native/maxrev.gdal.core.libshared/gdal_wrap.so: cannot open shared object file: No such file or directory
/usr/share/dotnet/shared/Microsoft.NETCore.App/9.0.11/gdal_wrap.so: cannot open shared object file: No such file or directory
/app/gdal_wrap.so: cannot open shared object file: No such file or directory
/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.32' not found (required by /app/runtimes/linux-x64/native/libgdal_wrap.so)
/app/runtimes/any/native/gdal-data/libgdal_wrap.so: cannot open shared object file: No such file or directory
/app/runtimes/linux-x64/native/maxrev.gdal.core.libshared/libgdal_wrap.so: cannot open shared object file: No such file or directory
/usr/share/dotnet/shared/Microsoft.NETCore.App/9.0.11/libgdal_wrap.so: cannot open shared object file: No such file or directory
/app/libgdal_wrap.so: cannot open shared object file: No such file or directory
/app/runtimes/linux-x64/native/gdal_wrap: cannot open shared object file: No such file or directory
/app/runtimes/any/native/gdal-data/gdal_wrap: cannot open shared object file: No such file or directory
/app/runtimes/linux-x64/native/maxrev.gdal.core.libshared/gdal_wrap: cannot open shared object file: No such file or directory
/usr/share/dotnet/shared/Microsoft.NETCore.App/9.0.11/gdal_wrap: cannot open shared object file: No such file or directory
/app/gdal_wrap: cannot open shared object file: No such file or directory
/app/runtimes/linux-x64/native/libgdal_wrap: cannot open shared object file: No such file or directory
/app/runtimes/any/native/gdal-data/libgdal_wrap: cannot open shared object file: No such file or directory
/app/runtimes/linux-x64/native/maxrev.gdal.core.libshared/libgdal_wrap: cannot open shared object file: No such file or directory
/usr/share/dotnet/shared/Microsoft.NETCore.App/9.0.11/libgdal_wrap: cannot open shared object file: No such file or directory
/app/libgdal_wrap: cannot open shared object file: No such file or directory
   at 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 .cctor()
   
--- End of inner exception stack trace ---
   at GDAL.GdalPINVOKE.AllRegister()
   at GDAL.GdalPINVOKE.AllRegister()
   at OSGeo.GDAL.Gdal.AllRegister()
   at Gdal.Core.GdalBase.ConfigureGdalDrivers(String gdalDataFolder)
   at Gdal.Core.GdalBase.ConfigureAll()
   

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions