Opened 16 years ago

Closed 16 years ago

#2437 closed defect (fixed)

Large file support on Ubuntu 8.04 IA32

Reported by: tbowden Owned by: warmerdam
Priority: high Milestone: 1.5.3
Component: GDAL_Raster Version: 1.5.2
Severity: normal Keywords: largefile
Cc:

Description

gdalinfo bombs out trying to read files >2gb on ubuntu 8.04 on 32bit systems. Earlier versions of ubuntu not effected.

file gcore/gdalopeninfo.cpp line 101 "errno == 79" needs to be changed to "errno == 75" Info provided by FrankW on irc

Change History (1)

comment:1 by warmerdam, 16 years ago

Component: defaultGDAL_Raster
Keywords: largefile added; gdal removed
Milestone: 1.5.3
Priority: normalhigh
Resolution: fixed
Status: newclosed

I have (I believe) corrected this in trunk (r14752), 1.5 branch (r14753) and 1.4 branch (r14754).

It turns out the EOVERFLOW has different values on different platforms and that 79 is right for solaris, but not linux. Even linux has many values:

crschmidt@bia:~/linux-2.6-2.6.18.dfsg.1/include$ grep -rn "EOVERFLOW" * | grep define
asm-alpha/errno.h:92:#define    EOVERFLOW       112     /* Value too large for defined data type */
asm-generic/errno.h:48:#define  EOVERFLOW       75      /* Value too large for defined data type */
asm-mips/errno.h:53:#define     EOVERFLOW       79      /* Value too large for defined data type */
asm-parisc/errno.h:42:#define   EOVERFLOW       72      /* Value too large for defined data type */
asm-sparc/errno.h:68:#define    EOVERFLOW       92      /* Value too large for defined data type */
asm-sparc/solerrno.h:83:#define SOL_EOVERFLOW      79    /* Data type too small for datum    */
asm-sparc64/errno.h:68:#define  EOVERFLOW       92      /* Value too large for defined data type */
asm-sparc64/solerrno.h:83:#define       SOL_EOVERFLOW      79    /* Data type too small for datum    */
linux/kernelcapi.h:110:#define CAPI_RECEIVEOVERFLOW               0x1105

The reason things broke on Ubuntu 8.04 is a change in the kernel.

<crschmidt> it was updated in 2.6.24
<crschmidt> http://www.linuxhq.com/kernel/v2.6/24/fs/open.c
<crschmidt> -      return -EFBIG;
<crschmidt> +      return -EOVERFLOW;

The new code should support any EOVERFLOW based on the #define in errno.h if available. Note that EFBIG is still a hardcoded value, but I think this is a "stable value" as part of POSIX or something.

I have *not* actually tested my change other than to build it.

Note: See TracTickets for help on using tickets.