-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can not load gdalwarp_bindings-amd64.dll #127
Comments
🤔 hmm, what gdal-warp-bindings version is used? for the 3.8.0 release we used The error is related to the Have you tried to load the GDAL dll from the warp archive manually via System.load? It usually gives a more detailed error. I also noticed a lot of Whats the purpose of org.gdal.ogr.ogr & org.gdal.gdal.gdal imports? Does the regular gdal bindings lib (not this repo but the official gdal bindings) work on your system? |
@pomadchin Thanks for your reply :) I do using gdal-warp-bindings version==3.8.0 I have checked the dynamic libraries that the project depends on and tried to align the dependency versions as much as possible according to the Docker build environment control in the gdalwarp_bindings project. However, when my local project attempts to load I have also copied a duplicate of import geotrellis.raster.gdal._
object gdalwarpbindings_test extends App {
System.load("C:\\Users\\syj\\Desktop\\gdalwarp_bindings-amd64.dll")
val url = "D:\\Code\\IDEA\\sg_demo\\data\\LC80140322014139LGN00.tif"
val ds: GDALDataset = GDALDataset(url)
val meta = ds.getMetadataDomainList(1)
System.out.println(meta)
}
Process finished with exit code -1073741819 (0xC0000005) Importing
|
@syjjj0826 are you able to read tiffs via GDAL using official GDAL bindings without the use of geotrellis gdal-warp-bindings? i.e. doing smth like val ds = org.gdal.gdal.gdal.Open(filePath, org.gdal.gdalconst.gdalconstConstants.GA_ReadOnly)
val transform = ds.GetGeoTransform
val width = ds.GetRasterXSize
val height = ds.GetRasterYSize |
The reason I ask -- want to check if that's an issue of our lib or not. + |
@pomadchin object test extends App{
org.gdal.ogr.ogr.RegisterAll()
val filePath = "D:\\Code\\IDEA\\sg_demo\\data\\LC80140322014139LGN00.tif"
val ds = org.gdal.gdal.gdal.Open(filePath, org.gdal.gdalconst.gdalconstConstants.GA_ReadOnly)
val transform = ds.GetGeoTransform
val width = ds.GetRasterXSize
val height = ds.GetRasterYSize
System.out.println("ok")
} And I also attempted to remove the relevant gdal bindings lib from the project, only using gdal_warp_bindings. However, the result is still the same: after copying the gdalwarp_bindings-amd64.dll from gdal_warp_bindings:3.8.0.jar to a temporary file, it fails to proceed with the next loading step. // cz.adamh.utils NativeUtils.java
...
NativeLibrary lib = new NativeLibrary(fromClass, name, isBuiltin);
nativeLibraryContext.push(lib);
try {
lib.load(name, isBuiltin);
}
... Did I overlook adding any other dependencies?If it's convenient, could you provide a list of the basic development environment for me to check? |
@syjjj0826 thanks for confirming that that's our bindings issue. Ouf sadly we don't have any docs around building dlls for windows; crossbuild is used to build windows binaries. There is indeed a solid chance it works under some specific circumstances only, Windows env is not really tested well. However, that's the Makefile to build and test bindings. In the proper Windows env with slightly adjusted env variables its possible to test just using the Makefile commands. An alternative can be to rebuild crossbuild docker image and try it on your local machine to see if its failing (i.e. could be a sepcific built and currently used in CI docker image failure). Sorry for these sad news, will really appreciate if you're able to help with investigating the reasons of this failure. I'll try to find some time to spin it up on my Win machine as well. |
@pomadchin |
Hey there: |
Hi @syjjj0826, great news! Will be happy to see a PR against this repo to address build issues 👍 |
Describe the bug
I want to use the geotrellis-gdal module in my project, and already import the relevant libraries.
when I run this code, throw an Exception:
When I debug step by step, I found the issue arises at these codes in file D:\Java\jdk1.8.0_202\src.zip!\java\lang\ClassLoader.java
When it reaches A during execution, the program exits abnormally.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Environment
The text was updated successfully, but these errors were encountered: