gdal.netcore icon indicating copy to clipboard operation
gdal.netcore copied to clipboard

Better way to write native files

Open Gigas002 opened this issue 6 years ago • 1 comments

Hello. I'm using this package along with others projects on Linux. After building the project with MaxRev.Gdal.LinuxRuntime.Minimal package, it writes Linux dependencies in "runtimes/linux-x64/native" directory. However, another library writes its dependencies the same way and Gdal's dependencies overrides some files there. Because of that, NetVips in my application doesn't work, throwing the exception:

Message [string]:"Unable to load shared library 'libvips.so.42' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibvips.so.42: cannot open shared object file: No such file or directory"

Probably the native binaries should be written the other way to avoid these conflicts?

Gigas002 avatar Jan 01 '20 20:01 Gigas002

We can try to move gdal libraries to separated folder. This will affect:

  • Linker (linkall and csharp_modules targets in GNUMakefile).
  • Output folder ($output in GNUMakefile).
  • GdalBase.Configure method (drivers path for Linux runtime).

The same thing is for Windows if you are using projects with different VC++ versions or other libraries those leads to dependencies collision. Is it worth it? I mean, you can try to create a wrapper project with a separated workdir.

MaxRev-Dev avatar Jan 01 '20 21:01 MaxRev-Dev