[winGRASS] r.[in|out].gdal

Andreas Lange Andreas.Lange at Rhein-Main.de
Wed Mar 13 04:32:26 EST 2002


Hi Glynn,

Glynn Clements wrote:
> 
> The double underscore is a coincidence. The actual problem is that
> GDAL uses some "private" TIFF functions which aren't exported by
> Cygwin's TIFF DLL (/bin/cygtiff3.dll).
> 
> Basically, frmts/o/xtiff.o imports the following _TIFF* functions:
> 
>         _TIFFFieldWithTag
>         _TIFFMergeFieldInfo
>         _TIFFfree
>         _TIFFmalloc
>         _TIFFmemset
>         _TIFFprintAsciiTag
>         _TIFFsetDoubleArray
>         _TIFFsetShortArray
>         _TIFFsetString
> 
> The only _TIFF* functions which cygtiff3.dll exports are:
> 
>         _TIFFrealloc
>         _TIFFmemset
>         _TIFFmemcpy
>         _TIFFmemcmp
>         _TIFFmalloc
>         _TIFFfree
> 
> [Note: this is exactly the set of _TIFF* functions which are declared
> in tiffio.h]
> 
> This results in "undefined reference" errors for:
> 
>         _TIFFprintAsciiTag
>         _TIFFsetShortArray
>         _TIFFsetDoubleArray
>         _TIFFsetDoubleArray
>         _TIFFsetString
>         _TIFFFieldWithTag
>         _TIFFFieldWithTag
>         _TIFFMergeFieldInfo
> 
> This problem goes away if you use the TIFF library included with GDAL,
> but you also have to use GDAL's JPEG library, as GDAL's TIFF library
> won't work with Cygwin's JPEG library. IOW,
> 
>         ./configure --with-libtiff=internal --with-jpeg=internal
> 
> You still need to modify some configuration files, as the shared
> library won't work, and the static library doesn't have dependency
> information (so you have to add e.g. -lcpl -logr).
> 
> I eventually got r.in.gdal to compile and link without errors, and
> "r.in.gdal help" works, but it segfaults if I try to import data.

Some time ago i got this far too. I used the following configure line:
./configure --without-python --with-png=internal --with-libtiff=internal
--with-jpeg=internal

I noticed that one has to compile without the external libraries on
solaris too, otherwise the libraries are not found at runtime (and
r.in.gdal gives an misleading error message). 

Perhaps someone can include the modification of the configuration files
into the distribution, so that it compiles out of the box on cygwin.
Currently i have no time to work on winGRASS or GRASS.

Andreas
-- 
Andreas Lange, 65187 Wiesbaden, Germany, Tel. +49 611 807850
url: http://mitglied.lycos.de/AndreasLange
mail: Andreas.Lange_at_Rhein-Main.de - A.C.Lange_at_GMX.net



More information about the grass-windows mailing list