Hi all Apologies if this is a FAQ, a quick Google only turned up "Linux binary build includes Python 2.1.3 with Large File Support enabled compiled against glibc-2.1.3" from http://lists.zope.org/pipermail/zope-announce/2002-September/000884.html What I'd like to know is: what was done to compile that Python with LFS? And how do you check if it's in? After looking at http://www.python.org/doc/2.2p1/lib/posix-large-files.html I tried this:: jean@blommie Products $ getconf LFS_CFLAGS -D_FILE_OFFSET_BITS=64 which makes it look as if the environment is OK for compiling in LFS. But doing 'import types; dir(types)' doesn't show a 'LongLongType', only a 'LongType'. So it looks like this Python doesn't handle large files after all. Is there a recipe somewhere? -- Jean Jordaan http://www.upfrontsystems.co.za
On Fri, Nov 08, 2002 at 12:50:35PM +0200, Jean Jordaan wrote:
What I'd like to know is: what was done to compile that Python with LFS?
I was reading this doc a couple of days back, and you might find the first few paragraphs useful: http://www.zope.org/Members/beacon/install_instructions Specifically, it says you can check whether your python has LFS like this: $ cd /somewhere_with_at_least_2.2G_of_space $ dd if=/dev/zero of=big_file_test bs=1024 count=2200000 $ python
open("big_file_test")
If there's no "File too large" exception I think you're in the clear. HTH, Felix.
I was reading this doc a couple of days back, and you might find the first few paragraphs useful:
http://www.zope.org/Members/beacon/install_instructions
Specifically, it says you can check whether your python has LFS like this:
Just run test_largefile.py that comes with python. -- /Magnus
Thanks for the help :)
Just run test_largefile.py that comes with python.
Well, that solves that: test_support.TestSkipped: platform does not have largefile support I'll #define LARGEFILE_SOURCE 1 and try again .. -- Jean Jordaan http://www.upfrontsystems.co.za
On Fri, Nov 08, 2002 at 11:32:40AM +0000, Felix Ulrich-Oltean wrote:
Specifically, it says you can check whether your python has LFS like this:
$ cd /somewhere_with_at_least_2.2G_of_space $ dd if=/dev/zero of=big_file_test bs=1024 count=2200000 $ python
open("big_file_test")
If there's no "File too large" exception I think you're in the clear.
NOOO.... not a good test! I built a python with (I thought) largefile support, and it passed that "test", but it turns out that I had apparently not compiled everything needed. Enough to open, but not enough to do some other important things, like truncate... Result was that when my ZODB passed 2 GB, zope went boom. THen I found test_largefile.py and discovered that my python failed that test. Did "make clean", rebuilt python, and the test passed. Restarted zope and it was happy with huge ZODB. -- Paul Winkler http://www.slinkp.com "Welcome to Muppet Labs, where the future is made - today!"
participants (4)
-
Felix Ulrich-Oltean -
Jean Jordaan -
Magnus Heino -
Paul Winkler