Large File Support
Art Haas
arthur.haas at westgeo.com
Fri Jul 20 09:58:14 EDT 2001
"Rod MacNeil" <rmacneil at interactdirect.com> writes:
> Hello NG,
>
> I need to build Python to include large file support on Redhat Linux 7.1.
>
> I tried the following instructions from section 8.1.1 in the Python docs but
> it doesn't work:
>
> On large-file-capable Linux systems, this might work:
>
>
> CC="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64"
> export CC
> ./configure
>
>
> I think this fails because the variable CC is expected to have the compiler
> name (gcc).
>
> Does anyone have any alternative instructions?
>
Don't set `CC', set `CFLAGS' ...
$ CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
$ export CFLAGS
$ ./configure
...
You'll probably have to go in and edit the Makefile, to set these same
flags for the `OPT' variable as well. Or, when you run `configure',
you could ...
$ ./configure OPT="-O2 ${CFLAGS}"
... and things should work. If you want to have debug info in the
compiled program, add a `-g' to the OPT variable. Check the makefile
when configure finishes to ensure that the largefile flags are in the
OPT variable.
--
###############################
# Art Haas
# (713) 689-2417
###############################
More information about the Python-list
mailing list