2009/08/13

Ubuntu and "large files" (files greater than 2 G)

Recently, for whatever reason, I decided that I should have Linux on a few machines. It might have been to be sure that my tools run on Linux.

It happened that Linux ended up on one of the key machines.
That was pure over-confidence and trust.

If FreeBSD hasn't any problem with "big files", that is, files greater that 2 gigabytes, something one could expect in 2009, one could expect the same from Linux.

Well, not quite so. The spider got stuck around 2 G of data.

The two magics options to add at compile time before banging your heads on the walls (it does hurt, trust my experience):

-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64

Why does one need to add these defines ? (which trigger an ugly cascade of other defines, it seems a lot of people decided this needs to be frightening)
I have no idea why.

Anyway, that's two flags one needs to add.