Blame README.COMPILATION.PROBLEMS

Packit 71fd91
------------------------------------------------------------------
Packit 71fd91
This file is part of bzip2/libbzip2, a program and library for
Packit 71fd91
lossless, block-sorting data compression.
Packit 71fd91
Packit 71fd91
bzip2/libbzip2 version 1.0.6 of 6 September 2010
Packit 71fd91
Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
Packit 71fd91
Packit 71fd91
Please read the WARNING, DISCLAIMER and PATENTS sections in the 
Packit 71fd91
README file.
Packit 71fd91
Packit 71fd91
This program is released under the terms of the license contained
Packit 71fd91
in the file LICENSE.
Packit 71fd91
------------------------------------------------------------------
Packit 71fd91
Packit 71fd91
bzip2-1.0.6 should compile without problems on the vast majority of
Packit 71fd91
platforms.  Using the supplied Makefile, I've built and tested it
Packit 71fd91
myself for x86-linux and amd64-linux.  With makefile.msc, Visual C++
Packit 71fd91
6.0 and nmake, you can build a native Win32 version too.  Large file
Packit 71fd91
support seems to work correctly on at least on amd64-linux.
Packit 71fd91
Packit 71fd91
When I say "large file" I mean a file of size 2,147,483,648 (2^31)
Packit 71fd91
bytes or above.  Many older OSs can't handle files above this size,
Packit 71fd91
but many newer ones can.  Large files are pretty huge -- most files
Packit 71fd91
you'll encounter are not Large Files.
Packit 71fd91
Packit 71fd91
Early versions of bzip2 (0.1, 0.9.0, 0.9.5) compiled on a wide variety
Packit 71fd91
of platforms without difficulty, and I hope this version will continue
Packit 71fd91
in that tradition.  However, in order to support large files, I've had
Packit 71fd91
to include the define -D_FILE_OFFSET_BITS=64 in the Makefile.  This
Packit 71fd91
can cause problems.
Packit 71fd91
Packit 71fd91
The technique of adding -D_FILE_OFFSET_BITS=64 to get large file
Packit 71fd91
support is, as far as I know, the Recommended Way to get correct large
Packit 71fd91
file support.  For more details, see the Large File Support
Packit 71fd91
Specification, published by the Large File Summit, at
Packit 71fd91
Packit 71fd91
   http://ftp.sas.com/standards/large.file
Packit 71fd91
Packit 71fd91
As a general comment, if you get compilation errors which you think
Packit 71fd91
are related to large file support, try removing the above define from
Packit 71fd91
the Makefile, ie, delete the line
Packit 71fd91
Packit 71fd91
   BIGFILES=-D_FILE_OFFSET_BITS=64 
Packit 71fd91
Packit 71fd91
from the Makefile, and do 'make clean ; make'.  This will give you a
Packit 71fd91
version of bzip2 without large file support, which, for most
Packit 71fd91
applications, is probably not a problem.  
Packit 71fd91
Packit 71fd91
Alternatively, try some of the platform-specific hints listed below.
Packit 71fd91
Packit 71fd91
You can use the spewG.c program to generate huge files to test bzip2's
Packit 71fd91
large file support, if you are feeling paranoid.  Be aware though that
Packit 71fd91
any compilation problems which affect bzip2 will also affect spewG.c,
Packit 71fd91
alas.
Packit 71fd91
Packit 71fd91
AIX: I have reports that for large file support, you need to specify
Packit 71fd91
-D_LARGE_FILES rather than -D_FILE_OFFSET_BITS=64.  I have not tested
Packit 71fd91
this myself.