[Gdal-dev] GDAL and fseeko
Jonathan Greenberg
usenet at estarcion.net
Mon Jan 24 14:46:02 EST 2005
Hi there, I was wondering if you might consider switching fseek references
to fseeko? I'm having problems dealing with large (>> 4gb files) on a G5
mac, and I suspect that might be what's going on. When I compile with the
--with-unix-stdio-64=yes flag I get the following errors:
make
GNUmakefile:43: warning: overriding commands for target `libgdal.la'
GNUmakefile:39: warning: ignoring old commands for target `libgdal.la'
(cd port; make)
/bin/sh ../libtool --mode=compile g++ -Wall -Os -I/sw/include
-D_FILE_OFFSET_BITS=64 -D_FILE_OFFSET_BITS=64 -I/sw/include -I/sw/include
-I../port -c -o cpl_conv.o cpl_conv.cpp
mkdir .libs
g++ -Wall -Os -I/sw/include -D_FILE_OFFSET_BITS=64 -D_FILE_OFFSET_BITS=64
-I/sw/include -I/sw/include -I../port -c cpl_conv.cpp -fno-common -DPIC -o
.libs/cpl_conv.o
cpl_conv.cpp: In function `void* CPLScanPointer(const char*, int)':
cpl_conv.cpp:733: warning: cast to pointer from integer of different size
g++ -Wall -Os -I/sw/include -D_FILE_OFFSET_BITS=64 -D_FILE_OFFSET_BITS=64
-I/sw/include -I/sw/include -I../port -c cpl_conv.cpp -o cpl_conv.o
>/dev/null 2>&1
/bin/sh ../libtool --mode=compile g++ -Wall -Os -I/sw/include
-D_FILE_OFFSET_BITS=64 -D_FILE_OFFSET_BITS=64 -I/sw/include -I/sw/include
-I../port -c -o cpl_error.o cpl_error.cpp
g++ -Wall -Os -I/sw/include -D_FILE_OFFSET_BITS=64 -D_FILE_OFFSET_BITS=64
-I/sw/include -I/sw/include -I../port -c cpl_error.cpp -fno-common -DPIC -o
.libs/cpl_error.o
g++ -Wall -Os -I/sw/include -D_FILE_OFFSET_BITS=64 -D_FILE_OFFSET_BITS=64
-I/sw/include -I/sw/include -I../port -c cpl_error.cpp -o cpl_error.o
>/dev/null 2>&1
/bin/sh ../libtool --mode=compile g++ -Wall -Os -I/sw/include
-D_FILE_OFFSET_BITS=64 -D_FILE_OFFSET_BITS=64 -I/sw/include -I/sw/include
-I../port -c -o cpl_string.o cpl_string.cpp
g++ -Wall -Os -I/sw/include -D_FILE_OFFSET_BITS=64 -D_FILE_OFFSET_BITS=64
-I/sw/include -I/sw/include -I../port -c cpl_string.cpp -fno-common -DPIC
-o .libs/cpl_string.o
g++ -Wall -Os -I/sw/include -D_FILE_OFFSET_BITS=64 -D_FILE_OFFSET_BITS=64
-I/sw/include -I/sw/include -I../port -c cpl_string.cpp -o cpl_string.o
>/dev/null 2>&1
/bin/sh ../libtool --mode=compile g++ -Wall -Os -I/sw/include
-D_FILE_OFFSET_BITS=64 -D_FILE_OFFSET_BITS=64 -I/sw/include -I/sw/include
-I../port -c -o cpl_vsisimple.o cpl_vsisimple.cpp
g++ -Wall -Os -I/sw/include -D_FILE_OFFSET_BITS=64 -D_FILE_OFFSET_BITS=64
-I/sw/include -I/sw/include -I../port -c cpl_vsisimple.cpp -fno-common
-DPIC -o .libs/cpl_vsisimple.o
g++ -Wall -Os -I/sw/include -D_FILE_OFFSET_BITS=64 -D_FILE_OFFSET_BITS=64
-I/sw/include -I/sw/include -I../port -c cpl_vsisimple.cpp -o
cpl_vsisimple.o >/dev/null 2>&1
/bin/sh ../libtool --mode=compile g++ -Wall -Os -I/sw/include
-D_FILE_OFFSET_BITS=64 -D_FILE_OFFSET_BITS=64 -I/sw/include -I/sw/include
-I../port -c -o cplgetsymbol.o cplgetsymbol.cpp
g++ -Wall -Os -I/sw/include -D_FILE_OFFSET_BITS=64 -D_FILE_OFFSET_BITS=64
-I/sw/include -I/sw/include -I../port -c cplgetsymbol.cpp -fno-common -DPIC
-o .libs/cplgetsymbol.o
g++ -Wall -Os -I/sw/include -D_FILE_OFFSET_BITS=64 -D_FILE_OFFSET_BITS=64
-I/sw/include -I/sw/include -I../port -c cplgetsymbol.cpp -o cplgetsymbol.o
>/dev/null 2>&1
/bin/sh ../libtool --mode=compile g++ -Wall -Os -I/sw/include
-D_FILE_OFFSET_BITS=64 -D_FILE_OFFSET_BITS=64 -I/sw/include -I/sw/include
-I../port -c -o cpl_dir.o cpl_dir.cpp
g++ -Wall -Os -I/sw/include -D_FILE_OFFSET_BITS=64 -D_FILE_OFFSET_BITS=64
-I/sw/include -I/sw/include -I../port -c cpl_dir.cpp -fno-common -DPIC -o
.libs/cpl_dir.o
g++ -Wall -Os -I/sw/include -D_FILE_OFFSET_BITS=64 -D_FILE_OFFSET_BITS=64
-I/sw/include -I/sw/include -I../port -c cpl_dir.cpp -o cpl_dir.o >/dev/null
2>&1
/bin/sh ../libtool --mode=compile g++ -Wall -Os -I/sw/include
-D_FILE_OFFSET_BITS=64 -D_FILE_OFFSET_BITS=64 -I/sw/include -I/sw/include
-I../port -c -o cpl_path.o cpl_path.cpp
g++ -Wall -Os -I/sw/include -D_FILE_OFFSET_BITS=64 -D_FILE_OFFSET_BITS=64
-I/sw/include -I/sw/include -I../port -c cpl_path.cpp -fno-common -DPIC -o
.libs/cpl_path.o
g++ -Wall -Os -I/sw/include -D_FILE_OFFSET_BITS=64 -D_FILE_OFFSET_BITS=64
-I/sw/include -I/sw/include -I../port -c cpl_path.cpp -o cpl_path.o
>/dev/null 2>&1
/bin/sh ../libtool --mode=compile g++ -Wall -Os -I/sw/include
-D_FILE_OFFSET_BITS=64 -D_FILE_OFFSET_BITS=64 -I/sw/include -I/sw/include
-I../port -c -o cpl_csv.o cpl_csv.cpp
g++ -Wall -Os -I/sw/include -D_FILE_OFFSET_BITS=64 -D_FILE_OFFSET_BITS=64
-I/sw/include -I/sw/include -I../port -c cpl_csv.cpp -fno-common -DPIC -o
.libs/cpl_csv.o
g++ -Wall -Os -I/sw/include -D_FILE_OFFSET_BITS=64 -D_FILE_OFFSET_BITS=64
-I/sw/include -I/sw/include -I../port -c cpl_csv.cpp -o cpl_csv.o >/dev/null
2>&1
/bin/sh ../libtool --mode=compile g++ -Wall -Os -I/sw/include
-D_FILE_OFFSET_BITS=64 -D_FILE_OFFSET_BITS=64 -I/sw/include -I/sw/include
-I../port -c -o cpl_findfile.o cpl_findfile.cpp
g++ -Wall -Os -I/sw/include -D_FILE_OFFSET_BITS=64 -D_FILE_OFFSET_BITS=64
-I/sw/include -I/sw/include -I../port -c cpl_findfile.cpp -fno-common -DPIC
-o .libs/cpl_findfile.o
g++ -Wall -Os -I/sw/include -D_FILE_OFFSET_BITS=64 -D_FILE_OFFSET_BITS=64
-I/sw/include -I/sw/include -I../port -c cpl_findfile.cpp -o cpl_findfile.o
>/dev/null 2>&1
/bin/sh ../libtool --mode=compile g++ -Wall -Os -I/sw/include
-D_FILE_OFFSET_BITS=64 -D_FILE_OFFSET_BITS=64 -I/sw/include -I/sw/include
-I../port -c -o cpl_vsil_unix_stdio_64.o cpl_vsil_unix_stdio_64.cpp
g++ -Wall -Os -I/sw/include -D_FILE_OFFSET_BITS=64 -D_FILE_OFFSET_BITS=64
-I/sw/include -I/sw/include -I../port -c cpl_vsil_unix_stdio_64.cpp
-fno-common -DPIC -o .libs/cpl_vsil_unix_stdio_64.o
cpl_vsil_unix_stdio_64.cpp: In function `FILE* VSIFOpenL(const char*, const
char*)':
cpl_vsil_unix_stdio_64.cpp:73: error: `fopen64' undeclared (first use this
function)
cpl_vsil_unix_stdio_64.cpp:73: error: (Each undeclared identifier is
reported
only once for each function it appears in.)
cpl_vsil_unix_stdio_64.cpp: In function `int VSIFSeekL(FILE*, long long
unsigned int, int)':
cpl_vsil_unix_stdio_64.cpp:93: error: `fseek64' undeclared (first use this
function)
cpl_vsil_unix_stdio_64.cpp: In function `vsi_l_offset VSIFTellL(FILE*)':
cpl_vsil_unix_stdio_64.cpp:103: error: `ftell64' undeclared (first use this
function)
cpl_vsil_unix_stdio_64.cpp: In function `int VSIStatL(const char*,
VSIStatBufL*)':
cpl_vsil_unix_stdio_64.cpp:163: error: invalid use of undefined type `struct
stat64'
cpl_vsi.h:189: error: forward declaration of `struct stat64'
make[1]: *** [cpl_vsil_unix_stdio_64.o] Error 1
make: *** [port-target] Error 2
### execution of make failed, exit code 2
Failed: compiling gdal-1.2.5-2 failed
Any ideas? You'll notice I set the D_FILE_OFFSET_BITS flags also, although
turning these on and off doesn't seem to make a difference...
--j
More information about the Gdal-dev
mailing list