[daip] large file support on solaris2.6
Vincent McIntyre
Vince.McIntyre at atnf.CSIRO.AU
Mon Jul 23 21:32:15 EDT 2001
Hi
I have a user who is trying to make files larger than 2Gb with uvcopy,
on a solaris 2.6 machine with 1Gb of core and 1.7Gb of swap. We run 31dec99.
He is getting a 'file too large' error that is coming from the OS level, ie
ATTILA> UVCOP2: ZERROR: ON FILE DA03:UVD001001.0JH;
ATTILA> UVCOP2: ZERROR: IN ZEXPN2 ERRNO = 27 (File too large)
ATTILA> UVCOP2: COPYUV: ERROR 2 EXPANDING OUTPUT VIS FILE
attila% grep 27 /usr/include/sys/errno.h
#define EFBIG 27 /* File too large */
I looked at the large file support for solaris and it seems you have to change
calls to seek() and so on, according to lfcompile(5):
Set the compile-time flag _FILE_OFFSET_BITS to 64
before including any headers. Applications may combine
objects produced in the large file compilation
environment with objects produced in the transitional
compilation environment, but must be careful with
respect to interoperability between those objects.
and
Access to Additional Large File Interfaces
The fseek() and ftell() functions do not map to functions
named fseek64() and ftell64(); rather, the large file addi-
tions fseeko() and ftello(), have functionality identical to
fseek() and ftell() and do map to the 64-bit functions
fseeko64() and ftello64(). Applications wishing to access
large files should use fseeko() and ftello() in place of
fseek() and ftell().
Can you tell me if there are standard compilation flags to turn on
largefile support in AIPS? It seems not, from a grep through the source tree.
I couldn't see any mention of this on www.cv.nrao.edu either.
There is a POSIX standard, so it should be fairly portable:
Applications wishing to access fseeko() and ftello() as
well as the POSIX and X/Open specification-conforming inter-
faces should define the macro _LARGEFILE_SOURCE to be 1 and
set whichever feature test macros are appropriate to obtain
the desired environment (see standards(5)).
Any advice appreciated
Vincent McIntyre vmcintyr at atnf.csiro.au
Australia Telescope National Facility, CSIRO voice:+61-2-9372-4643
PO Box 76, Epping, NSW 1710, AUSTRALIA fax:+61-2-9372-4442
More information about the Daip
mailing list