xref: /minix3/external/bsd/bzip2/dist/README.COMPILATION.PROBLEMS (revision 4a711bea63dc53acce03198b5fbfaa103fe328d6)
1*4a711beaSLionel Sambuc------------------------------------------------------------------
2*4a711beaSLionel SambucThis file is part of bzip2/libbzip2, a program and library for
3*4a711beaSLionel Sambuclossless, block-sorting data compression.
4*4a711beaSLionel Sambuc
5*4a711beaSLionel Sambucbzip2/libbzip2 version 1.0.6 of 6 September 2010
6*4a711beaSLionel SambucCopyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
7*4a711beaSLionel Sambuc
8*4a711beaSLionel SambucPlease read the WARNING, DISCLAIMER and PATENTS sections in the
9*4a711beaSLionel SambucREADME file.
10*4a711beaSLionel Sambuc
11*4a711beaSLionel SambucThis program is released under the terms of the license contained
12*4a711beaSLionel Sambucin the file LICENSE.
13*4a711beaSLionel Sambuc------------------------------------------------------------------
14*4a711beaSLionel Sambuc
15*4a711beaSLionel Sambucbzip2-1.0.6 should compile without problems on the vast majority of
16*4a711beaSLionel Sambucplatforms.  Using the supplied Makefile, I've built and tested it
17*4a711beaSLionel Sambucmyself for x86-linux and amd64-linux.  With makefile.msc, Visual C++
18*4a711beaSLionel Sambuc6.0 and nmake, you can build a native Win32 version too.  Large file
19*4a711beaSLionel Sambucsupport seems to work correctly on at least on amd64-linux.
20*4a711beaSLionel Sambuc
21*4a711beaSLionel SambucWhen I say "large file" I mean a file of size 2,147,483,648 (2^31)
22*4a711beaSLionel Sambucbytes or above.  Many older OSs can't handle files above this size,
23*4a711beaSLionel Sambucbut many newer ones can.  Large files are pretty huge -- most files
24*4a711beaSLionel Sambucyou'll encounter are not Large Files.
25*4a711beaSLionel Sambuc
26*4a711beaSLionel SambucEarly versions of bzip2 (0.1, 0.9.0, 0.9.5) compiled on a wide variety
27*4a711beaSLionel Sambucof platforms without difficulty, and I hope this version will continue
28*4a711beaSLionel Sambucin that tradition.  However, in order to support large files, I've had
29*4a711beaSLionel Sambucto include the define -D_FILE_OFFSET_BITS=64 in the Makefile.  This
30*4a711beaSLionel Sambuccan cause problems.
31*4a711beaSLionel Sambuc
32*4a711beaSLionel SambucThe technique of adding -D_FILE_OFFSET_BITS=64 to get large file
33*4a711beaSLionel Sambucsupport is, as far as I know, the Recommended Way to get correct large
34*4a711beaSLionel Sambucfile support.  For more details, see the Large File Support
35*4a711beaSLionel SambucSpecification, published by the Large File Summit, at
36*4a711beaSLionel Sambuc
37*4a711beaSLionel Sambuc   http://ftp.sas.com/standards/large.file
38*4a711beaSLionel Sambuc
39*4a711beaSLionel SambucAs a general comment, if you get compilation errors which you think
40*4a711beaSLionel Sambucare related to large file support, try removing the above define from
41*4a711beaSLionel Sambucthe Makefile, ie, delete the line
42*4a711beaSLionel Sambuc
43*4a711beaSLionel Sambuc   BIGFILES=-D_FILE_OFFSET_BITS=64
44*4a711beaSLionel Sambuc
45*4a711beaSLionel Sambucfrom the Makefile, and do 'make clean ; make'.  This will give you a
46*4a711beaSLionel Sambucversion of bzip2 without large file support, which, for most
47*4a711beaSLionel Sambucapplications, is probably not a problem.
48*4a711beaSLionel Sambuc
49*4a711beaSLionel SambucAlternatively, try some of the platform-specific hints listed below.
50*4a711beaSLionel Sambuc
51*4a711beaSLionel SambucYou can use the spewG.c program to generate huge files to test bzip2's
52*4a711beaSLionel Sambuclarge file support, if you are feeling paranoid.  Be aware though that
53*4a711beaSLionel Sambucany compilation problems which affect bzip2 will also affect spewG.c,
54*4a711beaSLionel Sambucalas.
55*4a711beaSLionel Sambuc
56*4a711beaSLionel SambucAIX: I have reports that for large file support, you need to specify
57*4a711beaSLionel Sambuc-D_LARGE_FILES rather than -D_FILE_OFFSET_BITS=64.  I have not tested
58*4a711beaSLionel Sambucthis myself.
59