[Gdal-dev] libtiff on solaris - must still patch or simply install new release?

Knut Behrends knb at gfz-potsdam.de
Thu Aug 3 03:43:13 EDT 2006


We have a mapserver +  GDAL, released 2005/03/13 running on
solaris. On the solaris box I cannot use gdal_translate to create tiff
files - gdal_translate complains about unknown file format tif, and
although there is a tif file created it is corrupt cannot be opened.

I have researched a bit... and found this thread on this list , see
below, or read it online at

It seems to me that the gdal source code must be patched to run properly
on solaris. Is this still true,  or is the below-mentioned patch now
(back) in the official code trunk? So can we just upgrade gdal instead,
 without patching the source code? The previous thread does not answer
this question.

Best regards,

Knut Behrends

2005.09.12 13:47 "Re: [Gdal-dev] Problem of creation with Gtiff driver
on Solaris", by Frank Warmerdam

On 9/12/05, Frédéric Trastour wrote:
> > Try the patch (adding TIFFSeekFile(tif,0,SEEK_SET) before the
> > WriteOK call and see if that helps.
> Thanks a lot, this solves the problem.
> It's really strange anyway and It's not very reassuring to see that
simple file
> access may be broken on Solaris. There are probably tons of similar code
> in other drivers...


Ed Grissom informed me that:

> Not sure if this has *any* bearing at all, but the doc for "fopen" for
> STD_C_LIBs says that if you open a file for modify ("+"), then you must
> fseek (or fflush?)  between any freads and fwrites.  I believe that
for some
> systems, this is not strictly necessary, but for others it is.

Thus, it may be that the Solaris stdio isn't broken, it just chooses to make
things difficult while staying within the specification.  I don't know
how many
other parts of the library may be affected but this is the one that has
us in the past.

I think the seek was removed in the past because it made it difficult for
someone to implement stream oriented access to TIFF files though I am not
very sure about that aspect.  In any event, I think I had better
the seek in the core code till we work out more details.

Best regards,	

More information about the Gdal-dev mailing list