[gdal-dev] MinGW build

Ari Jolma ari.jolma at gmail.com
Sat Oct 6 02:12:41 PDT 2012


5.10.2012 20:09, Ari Jolma kirjoitti:
> I got libgdal.dll compiled but the Perl bindings seem even harder (the 
> bindings dll does not load).

Working on the MinGW build I've progressed quite far but run into 
trouble with DLL loading. The problem seems to be related to OSR.

I've built the Perl bindings and another Perl interface to another C 
library, which uses GDAL and GTK+. It seems that something happens when 
the other Perl interface loads GDAL and GTK+ that makes it impossible to 
load OSR.

I'm using Dependency Walker, which shows which DLLs get loaded etc. In 
Perl the initialization is done by calling "use Module".

use Geo::OSR;
is ok as a program, GDAL (and GEOS) get loaded fine.

use Geo::Raster;
is ok as a program, GTK+ and GDAL get loaded fine (output 1).

use Geo::Raster;
use Geo::OSR;
is not ok, Access violation happens in NTDLL.DLL (in A_SHAFinal) (output 2).

Any ideas would be welcome. Is there something in the GDAL/OSR/OSR Swig 
bindings that would cause this? Am I right in thinking that the problem 
is related to OSR / GDAL? Maybe GTK+ screws up something? Any ideas how 
to see inside NTDLL.DLL?

Cheers,

Ari

output 1:
LoadLibraryExA("c:\geoinformatica\site\lib\auto\Geo\OSR\OSR.dll", 
0x00000000, LOAD_WITH_ALTERED_SEARCH_PATH) called from "PERL516.DLL" at 
address 0x713D3765.
Loaded "OSR.DLL" at address 0x68600000.  Successfully hooked module.
Loaded "LIBGDAL-1.DLL" at address 0x01A20000.  Successfully hooked module.
Loaded "LIBICONV-2.DLL" at address 0x66000000.  Successfully hooked module.
Loaded "LIBGEOS_C-1.DLL" at address 0x70040000.  Successfully hooked module.
Loaded "LIBGEOS-3-3-5.DLL" at address 0x6A500000.  Successfully hooked 
module.
DllMain(0x66000000, DLL_PROCESS_ATTACH, 0x00000000) in "LIBICONV-2.DLL" 
called.
GetProcAddress(0x6E940000 [LIBGCC_S_DW2-1.DLL], "__register_frame_info") 
called from "LIBICONV-2.DLL" at address 0x660011AB and returned 0x6E956744.
DllMain(0x66000000, DLL_PROCESS_ATTACH, 0x00000000) in "LIBICONV-2.DLL" 
returned 1 (0x1).
DllMain(0x6A500000, DLL_PROCESS_ATTACH, 0x00000000) in 
"LIBGEOS-3-3-5.DLL" called.
GetProcAddress(0x6E940000 [LIBGCC_S_DW2-1.DLL], "__register_frame_info") 
called from "LIBGEOS-3-3-5.DLL" at address 0x6A5011E7 and returned 
0x6E956744.
DllMain(0x6A500000, DLL_PROCESS_ATTACH, 0x00000000) in 
"LIBGEOS-3-3-5.DLL" returned 1 (0x1).
DllMain(0x70040000, DLL_PROCESS_ATTACH, 0x00000000) in "LIBGEOS_C-1.DLL" 
called.
GetProcAddress(0x6E940000 [LIBGCC_S_DW2-1.DLL], "__register_frame_info") 
called from "LIBGEOS_C-1.DLL" at address 0x700411E7 and returned 0x6E956744.
DllMain(0x70040000, DLL_PROCESS_ATTACH, 0x00000000) in "LIBGEOS_C-1.DLL" 
returned 1 (0x1).
DllMain(0x01A20000, DLL_PROCESS_ATTACH, 0x00000000) in "LIBGDAL-1.DLL" 
called.
GetProcAddress(0x6E940000 [LIBGCC_S_DW2-1.DLL], "__register_frame_info") 
called from "LIBGDAL-1.DLL" at address 0x01A211E7 and returned 0x6E956744.
DllMain(0x01A20000, DLL_PROCESS_ATTACH, 0x00000000) in "LIBGDAL-1.DLL" 
returned 1 (0x1).
DllMain(0x68600000, DLL_PROCESS_ATTACH, 0x00000000) in "OSR.DLL" called.
GetProcAddress(0x6E940000 [LIBGCC_S_DW2-1.DLL], "__register_frame_info") 
called from "OSR.DLL" at address 0x686011E7 and returned 0x6E956744.
DllMain(0x68600000, DLL_PROCESS_ATTACH, 0x00000000) in "OSR.DLL" 
returned 1 (0x1).
LoadLibraryExA("c:\geoinformatica\site\lib\auto\Geo\OSR\OSR.dll", 
0x00000000, LOAD_WITH_ALTERED_SEARCH_PATH) returned 0x68600000.
GetProcAddress(0x68600000 [OSR.DLL], "boot_Geo__OSR") called from 
"PERL516.DLL" at address 0x713D6512 and returned 0x68616D74.

output 2:
LoadLibraryExA("c:\geoinformatica\site\lib\auto\Geo\OSR\OSR.dll", 
0x00000000, LOAD_WITH_ALTERED_SEARCH_PATH) called from "PERL516.DLL" at 
address 0x713D3765.
Loaded "OSR.DLL" at address 0x00410000.  Successfully hooked module.
First chance exception 0xC0000005 (Access Violation) occurred in 
"NTDLL.DLL" at address 0x7702049E.
Unloaded "OSR.DLL" at address 0x00410000.
LoadLibraryExA("c:\geoinformatica\site\lib\auto\Geo\OSR\OSR.dll", 
0x00000000, LOAD_WITH_ALTERED_SEARCH_PATH) returned NULL. Error: Invalid 
access to memory location (998).




More information about the gdal-dev mailing list