Received: from mailgate001.isp.belgacom.be (mailgate001.isp.belgacom.be [195.238.6.86])
	by maildelivery001.isp.belgacom.be (Postfix) with ESMTP id 814FE5A8005
	for <joris.at.lebbeke@skynet.be>; Fri,  3 Aug 2007 20:08:29 +0200 (CEST)
Received: from r153.dmsolutions.ca (HELO duke.maptools.org) ([209.217.116.153])
  by in.mx.skynet.be with ESMTP; 03 Aug 2007 20:08:29 +0200
Received: from duke.maptools.org (duke.maptools.org [127.0.0.1])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id l73HwnLp020792;
	Fri, 3 Aug 2007 13:59:02 -0400
Received: from sceptre.pobox.com (sceptre.pobox.com [207.106.133.20])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id l73Hwl4b020789
	for <tiff@lists.maptools.org>; Fri, 3 Aug 2007 13:58:47 -0400
Received: from sceptre (localhost.localdomain [127.0.0.1])
	by sceptre.pobox.com (Postfix) with ESMTP id C24B42EF;
	Fri,  3 Aug 2007 13:59:08 -0400 (EDT)
Received: from [192.168.2.3] (dpc674728121.direcpc.com [67.47.28.121])
	by sceptre.sasl.smtp.pobox.com (Postfix) with ESMTP id 9201A6ADD1;
	Fri,  3 Aug 2007 13:59:01 -0400 (EDT)
Message-ID: <46B37E3A.6040709@pobox.com>
Date: Fri, 03 Aug 2007 15:12:58 -0400
From: Frank Warmerdam <warmerdam@pobox.com>
User-Agent: Thunderbird 1.5.0.9 (X11/20070104)
MIME-Version: 1.0
To: jcupitt@gmail.com
Subject: Re: [Tiff] bug? copying tiled tiffs over 2GB seems to break
References: <522c6460708031030g4555041ye85cfffe34ebed44@mail.gmail.com>
In-Reply-To: <522c6460708031030g4555041ye85cfffe34ebed44@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Cc: tiff@lists.maptools.org
X-BeenThere: tiff@lists.maptools.org
X-Mailman-Version: 2.1.4
Precedence: list
List-Id: TIFF and libtiff discussion <tiff.lists.maptools.org>
List-Unsubscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=unsubscribe>
List-Archive: <http://lists.maptools.org/mailman/private/tiff>
List-Post: <mailto:tiff@lists.maptools.org>
List-Help: <mailto:tiff-request@lists.maptools.org?subject=help>
List-Subscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=subscribe>
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org
X-UIDL: 000000000023ceae.000026cf
X-MSP-STORE: Fri, 03 Aug 2007 20:08:29 +0200
Status:   

jcupitt@gmail.com wrote:
> Hi,
> 
> I have a problem with a pyramid builder I wrote. It seems to break for
> pyramids larger than 2GB with tiff 3.8.2. I think (I hope this is
> right) it's supposed to work for files up to 4GB.
> 
> Here's a small test program:
> 
>   http://www.vips.ecs.soton.ac.uk/vips-7.11/gather.c
> 
> Run it with:
> 
>   gather output.tiff in1.tiff in2.tiff ...
> 
> The input files need to be tiled TIFF. It just copies each one into
> the output file. If output.tiff is under 2GB, all is well. If
> output.tif goes just over 2GB, it becomes unreadable.
> 
>   john@mm-jcupitt2:~/pics$ tiffinfo output.tiff
>   output.tiff: Error fetching data for field "BitsPerSample".
> 
> Is this a bug? Or am I doing something horribly wrong? Thanks!

John,

Typically problems with file sizes between 2 and 4 GB relate to your
libtiff having gotten built with a "32bit" file io API.  On windows I
believe you need to ensure that tif_win32.c is used instead of tif_unix.c
(which works but is always 32bit with vc++ - I think).  On unix it is
important that the configure script identify special things required for
large file support.

When I run configure on my ubuntu 64 system I see:

checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no

but large file stuff still works.  But I gather on some systems
some special macros may need to get defined.

OK, I've only got a weak grasp on how this magic works, but I
guess my point is that at least you need to tell us what your
build environment (operating system, compiler) is, and if on
unix you need to review your configure output for clues.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org

_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
