This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Largefile detection in configure fails
Type: behavior Stage:
Components: Build Versions: Python 2.7
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: David.Austin, pitrou
Priority: normal Keywords:

Created on 2010-08-13 12:15 by David.Austin, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (2)
msg113757 - (view) Author: David Austin (David.Austin) Date: 2010-08-13 12:15
On a Linux Xeon server (x86_64) largefile support is (incorrectly)
not included.

configure determines:
checking size of int... 4
checking size of long... 8
checking size of void *... 8
checking size of short... 2
checking size of float... 4
checking size of double... 8
.
.
.
checking size of off_t... 8

but gets it wrong:

checking whether to enable large file support... no

To me it seems that the logic sizeof_off_t > sizeof_long
is wrong.

(I changed to comparison off_t > int and it built
with largefile support and works fine.)

$ uname -a
Linux cpu3 2.6.31-14-server #48-Ubuntu SMP Fri Oct 16 15:07:34 UTC 2009 x86_64 GNU/Linux

Ubuntu Lucid
msg113788 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2010-08-13 15:43
The expression "largefile support" is a bit misleading. What it simply does is that it uses "long long" instead of "long" in order to store and compute file offsets. But, since a long is wide enough on your system to hold a off_t (both are 64 bits), it wouldn't make a difference. Your Python is already able to address files larger than 4GB, since it uses lseek() in all cases.

(so-called "largefile support" would be enabled if you compiled a 32-bit Python)

By the way, you can run:

$ ./python -m test.regrtest -v test_largefile

to check that the "large file" tests (> 2 GB) pass.
History
Date User Action Args
2022-04-11 14:57:05adminsetgithub: 53794
2010-08-13 15:43:11pitrousetstatus: open -> closed

nosy: + pitrou
messages: + msg113788

resolution: not a bug
2010-08-13 12:15:09David.Austincreate