diff options
| author | Julian Seward <jseward@acm.org> | 2000-06-24 22:13:13 +0200 |
|---|---|---|
| committer | Julian Seward <jseward@acm.org> | 2000-06-24 22:13:13 +0200 |
| commit | 795b859eee96c700e8f3c3fe68e6a9a39d95797c (patch) | |
| tree | 48f8a731cd5ec2f5f15c6d99f2207ebf4a1f35f6 /README | |
| parent | f93cd82a9a7094ad90fd19bbc6ccf6f4627f8060 (diff) | |
| download | bzip2-1.0.1.tar.gz bzip2-1.0.1.tar.bz2 bzip2-1.0.1.zip | |
bzip2-1.0.1bzip2-1.0.1
Diffstat (limited to '')
| -rw-r--r-- | README | 43 | ||||
| -rw-r--r-- | README.COMPILATION.PROBLEMS | 130 |
2 files changed, 165 insertions, 8 deletions
| @@ -1,9 +1,9 @@ | |||
| 1 | 1 | ||
| 2 | This is the README for bzip2, a block-sorting file compressor, version | 2 | This is the README for bzip2, a block-sorting file compressor, version |
| 3 | 0.9.5d. This version is fully compatible with the previous public | 3 | 1.0. This version is fully compatible with the previous public |
| 4 | releases, bzip2-0.1pl2 and bzip2-0.9.0. | 4 | releases, bzip2-0.1pl2, bzip2-0.9.0 and bzip2-0.9.5. |
| 5 | 5 | ||
| 6 | bzip2-0.9.5 is distributed under a BSD-style license. For details, | 6 | bzip2-1.0 is distributed under a BSD-style license. For details, |
| 7 | see the file LICENSE. | 7 | see the file LICENSE. |
| 8 | 8 | ||
| 9 | Complete documentation is available in Postscript form (manual.ps) or | 9 | Complete documentation is available in Postscript form (manual.ps) or |
| @@ -30,15 +30,37 @@ The -n instructs make to show the commands it would execute, but | |||
| 30 | not actually execute them. | 30 | not actually execute them. |
| 31 | 31 | ||
| 32 | 32 | ||
| 33 | HOW TO BUILD -- UNIX, shared library libbz2.so. | ||
| 34 | |||
| 35 | Do 'make -f Makefile-libbz2_so'. This Makefile seems to work for | ||
| 36 | Linux-ELF (RedHat 5.2 on an x86 box), with gcc. I make no claims | ||
| 37 | that it works for any other platform, though I suspect it probably | ||
| 38 | will work for most platforms employing both ELF and gcc. | ||
| 39 | |||
| 40 | bzip2-shared, a client of the shared library, is also build, but | ||
| 41 | not self-tested. So I suggest you also build using the normal | ||
| 42 | Makefile, since that conducts a self-test. | ||
| 43 | |||
| 44 | Important note for people upgrading .so's from 0.9.0/0.9.5 to | ||
| 45 | version 1.0. All the functions in the library have been renamed, | ||
| 46 | from (eg) bzCompress to BZ2_bzCompress, to avoid namespace pollution. | ||
| 47 | Unfortunately this means that the libbz2.so created by | ||
| 48 | Makefile-libbz2_so will not work with any program which used an | ||
| 49 | older version of the library. Sorry. I do encourage library | ||
| 50 | clients to make the effort to upgrade to use version 1.0, since | ||
| 51 | it is both faster and more robust than previous versions. | ||
| 52 | |||
| 53 | |||
| 33 | HOW TO BUILD -- Windows 95, NT, DOS, Mac, etc. | 54 | HOW TO BUILD -- Windows 95, NT, DOS, Mac, etc. |
| 34 | 55 | ||
| 35 | It's difficult for me to support compilation on all these platforms. | 56 | It's difficult for me to support compilation on all these platforms. |
| 36 | My approach is to collect binaries for these platforms, and put them | 57 | My approach is to collect binaries for these platforms, and put them |
| 37 | on my web page (http://www.muraroa.demon.co.uk). Look there. However | 58 | on the master web page (http://sourceware.cygnus.com/bzip2). Look |
| 38 | (FWIW), bzip2-0.9.5 is very standard ANSI C and should compile | 59 | there. However (FWIW), bzip2-1.0 is very standard ANSI C and should |
| 39 | unmodified with MS Visual C. For Win32, there is one important | 60 | compile unmodified with MS Visual C. For Win32, there is one |
| 40 | caveat: in bzip2.c, you must set BZ_UNIX to 0 and BZ_LCCWIN32 to 1 | 61 | important caveat: in bzip2.c, you must set BZ_UNIX to 0 and |
| 41 | before building. | 62 | BZ_LCCWIN32 to 1 before building. If you have difficulties building, |
| 63 | you might want to read README.COMPILATION.PROBLEMS. | ||
| 42 | 64 | ||
| 43 | 65 | ||
| 44 | VALIDATION | 66 | VALIDATION |
| @@ -116,6 +138,10 @@ WHAT'S NEW IN 0.9.5 ? | |||
| 116 | * Many small improvements in file and flag handling. | 138 | * Many small improvements in file and flag handling. |
| 117 | * A Y2K statement. | 139 | * A Y2K statement. |
| 118 | 140 | ||
| 141 | WHAT'S NEW IN 1.0 | ||
| 142 | |||
| 143 | See the CHANGES file. | ||
| 144 | |||
| 119 | I hope you find bzip2 useful. Feel free to contact me at | 145 | I hope you find bzip2 useful. Feel free to contact me at |
| 120 | jseward@acm.org | 146 | jseward@acm.org |
| 121 | if you have any suggestions or queries. Many people mailed me with | 147 | if you have any suggestions or queries. Many people mailed me with |
| @@ -137,3 +163,4 @@ Cambridge, UK | |||
| 137 | 23 August 1998 (bzip2, version 0.9.0) | 163 | 23 August 1998 (bzip2, version 0.9.0) |
| 138 | 8 June 1999 (bzip2, version 0.9.5) | 164 | 8 June 1999 (bzip2, version 0.9.5) |
| 139 | 4 Sept 1999 (bzip2, version 0.9.5d) | 165 | 4 Sept 1999 (bzip2, version 0.9.5d) |
| 166 | 5 May 2000 (bzip2, version 1.0pre8) | ||
diff --git a/README.COMPILATION.PROBLEMS b/README.COMPILATION.PROBLEMS new file mode 100644 index 0000000..d621ad5 --- /dev/null +++ b/README.COMPILATION.PROBLEMS | |||
| @@ -0,0 +1,130 @@ | |||
| 1 | |||
| 2 | bzip2-1.0 should compile without problems on the vast majority of | ||
| 3 | platforms. Using the supplied Makefile, I've built and tested it | ||
| 4 | myself for x86-linux, sparc-solaris, alpha-linux, x86-cygwin32 and | ||
| 5 | alpha-tru64unix. With makefile.msc, Visual C++ 6.0 and nmake, you can | ||
| 6 | build a native Win32 version too. Large file support seems to work | ||
| 7 | correctly on at least alpha-tru64unix and x86-cygwin32 (on Windows | ||
| 8 | 2000). | ||
| 9 | |||
| 10 | When I say "large file" I mean a file of size 2,147,483,648 (2^31) | ||
| 11 | bytes or above. Many older OSs can't handle files above this size, | ||
| 12 | but many newer ones can. Large files are pretty huge -- most files | ||
| 13 | you'll encounter are not Large Files. | ||
| 14 | |||
| 15 | Earlier versions of bzip2 (0.1, 0.9.0, 0.9.5) compiled on a wide | ||
| 16 | variety of platforms without difficulty, and I hope this version will | ||
| 17 | continue in that tradition. However, in order to support large files, | ||
| 18 | I've had to include the define -D_FILE_OFFSET_BITS=64 in the Makefile. | ||
| 19 | This can cause problems. | ||
| 20 | |||
| 21 | The technique of adding -D_FILE_OFFSET_BITS=64 to get large file | ||
| 22 | support is, as far as I know, the Recommended Way to get correct large | ||
| 23 | file support. For more details, see the Large File Support | ||
| 24 | Specification, published by the Large File Summit, at | ||
| 25 | http://www.sas.com/standard/large.file/ | ||
| 26 | |||
| 27 | As a general comment, if you get compilation errors which you think | ||
| 28 | are related to large file support, try removing the above define from | ||
| 29 | the Makefile, ie, delete the line | ||
| 30 | BIGFILES=-D_FILE_OFFSET_BITS=64 | ||
| 31 | from the Makefile, and do 'make clean ; make'. This will give you a | ||
| 32 | version of bzip2 without large file support, which, for most | ||
| 33 | applications, is probably not a problem. | ||
| 34 | |||
| 35 | Alternatively, try some of the platform-specific hints listed below. | ||
| 36 | |||
| 37 | You can use the spewG.c program to generate huge files to test bzip2's | ||
| 38 | large file support, if you are feeling paranoid. Be aware though that | ||
| 39 | any compilation problems which affect bzip2 will also affect spewG.c, | ||
| 40 | alas. | ||
| 41 | |||
| 42 | |||
| 43 | Known problems as of 1.0pre8: | ||
| 44 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
| 45 | |||
| 46 | * HP/UX 10.20 and 11.00, using gcc (2.7.2.3 and 2.95.2): A large | ||
| 47 | number of warnings appear, including the following: | ||
| 48 | |||
| 49 | /usr/include/sys/resource.h: In function `getrlimit': | ||
| 50 | /usr/include/sys/resource.h:168: | ||
| 51 | warning: implicit declaration of function `__getrlimit64' | ||
| 52 | /usr/include/sys/resource.h: In function `setrlimit': | ||
| 53 | /usr/include/sys/resource.h:170: | ||
| 54 | warning: implicit declaration of function `__setrlimit64' | ||
| 55 | |||
| 56 | This would appear to be a problem with large file support, header | ||
| 57 | files and gcc. gcc may or may not give up at this point. If it | ||
| 58 | fails, you might be able to improve matters by adding | ||
| 59 | -D__STDC_EXT__=1 | ||
| 60 | to the BIGFILES variable in the Makefile (ie, change its definition | ||
| 61 | to | ||
| 62 | BIGFILES=-D_FILE_OFFSET_BITS=64 -D__STDC_EXT__=1 | ||
| 63 | |||
| 64 | Even if gcc does produce a binary which appears to work (ie passes | ||
| 65 | its self-tests), you might want to test it to see if it works properly | ||
| 66 | on large files. | ||
| 67 | |||
| 68 | |||
| 69 | * HP/UX 10.20 and 11.00, using HP's cc compiler. | ||
| 70 | |||
| 71 | No specific problems for this combination, except that you'll need to | ||
| 72 | specify the -Ae flag, and zap the gcc-specific stuff | ||
| 73 | -Wall -Winline -O2 -fomit-frame-pointer -fno-strength-reduce. | ||
| 74 | You should retain -D_FILE_OFFSET_BITS=64 in order to get large | ||
| 75 | file support -- which is reported to work ok for this HP/UX + cc | ||
| 76 | combination. | ||
| 77 | |||
| 78 | |||
| 79 | * SunOS 4.1.X. | ||
| 80 | |||
| 81 | Amazingly, there are still people out there using this venerable old | ||
| 82 | banger. I shouldn't be too rude -- I started life on SunOS, and | ||
| 83 | it was a pretty darn good OS, way back then. Anyway: | ||
| 84 | |||
| 85 | SunOS doesn't seem to have strerror(), so you'll have to use | ||
| 86 | perror(), perhaps by doing adding this (warning: UNTESTED CODE): | ||
| 87 | |||
| 88 | char* strerror ( int errnum ) | ||
| 89 | { | ||
| 90 | if (errnum < 0 || errnum >= sys_nerr) | ||
| 91 | return "Unknown error"; | ||
| 92 | else | ||
| 93 | return sys_errlist[errnum]; | ||
| 94 | } | ||
| 95 | |||
| 96 | Or you could comment out the relevant calls to strerror; they're | ||
| 97 | not mission-critical. Or you could upgrade to Solaris. Ha ha ha! | ||
| 98 | (what?? you think I've got Bad Attitude?) | ||
| 99 | |||
| 100 | |||
| 101 | * Making a shared library on Solaris. (Not really a compilation | ||
| 102 | problem, but many people ask ...) | ||
| 103 | |||
| 104 | Firstly, if you have Solaris 8, either you have libbz2.so already | ||
| 105 | on your system, or you can install it from the Solaris CD. | ||
| 106 | |||
| 107 | Secondly, be aware that there are potential naming conflicts | ||
| 108 | between the .so file supplied with Solaris 8, and the .so file | ||
| 109 | which Makefile-libbz2_so will make. Makefile-libbz2_so creates | ||
| 110 | a .so which has the names which I intend to be "official" as | ||
| 111 | of version 1.0.0 and onwards. Unfortunately, the .so in | ||
| 112 | Solaris 8 appeared before I decided on the final names, so | ||
| 113 | the two libraries are incompatible. We have since communicated | ||
| 114 | and I hope that the problems will have been solved in the next | ||
| 115 | version of Solaris, whenever that might appear. | ||
| 116 | |||
| 117 | All that said: you might be able to get somewhere | ||
| 118 | by finding the line in Makefile-libbz2_so which says | ||
| 119 | |||
| 120 | $(CC) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.1 $(OBJS) | ||
| 121 | |||
| 122 | and replacing with | ||
| 123 | |||
| 124 | ($CC) -G -shared -o libbz2.so.1.0.1 -h libbz2.so.1.0 $(OBJS) | ||
| 125 | |||
| 126 | If gcc objects to the combination -fpic -fPIC, get rid of | ||
| 127 | the second one, leaving just "-fpic". | ||
| 128 | |||
| 129 | |||
| 130 | That's the end of the currently known compilation problems. | ||
