| 1 |
|
| 2 |
Compress-Raw-Bzip2 |
| 3 |
|
| 4 |
Version 2.218 |
| 5 |
|
| 6 |
8 March 2026 |
| 7 |
|
| 8 |
Copyright (c) 2005-2026 Paul Marquess. All rights reserved. |
| 9 |
This program is free software; you can redistribute it |
| 10 |
and/or modify it under the same terms as Perl itself. |
| 11 |
|
| 12 |
The directory bzip2-src contains a subset of the |
| 13 |
source files copied directly from bzip2 version 1.0.8. |
| 14 |
These files are Copyright(C) 1996-2019 Julian Seward. |
| 15 |
See the file bzip2-src/LICENSE for licence details for these files. |
| 16 |
Full source for the bzip2 library is available at |
| 17 |
https://sourceware.org/bzip2/ |
| 18 |
|
| 19 |
Note that some of the bzip2 source files have been modified |
| 20 |
to allow them to build with a C++ compiler |
| 21 |
and/or silence compiler warnings. |
| 22 |
The file bzip2-src/bzip2.patch contains the patch |
| 23 |
that was used to modify the original source. |
| 24 |
|
| 25 |
DESCRIPTION |
| 26 |
----------- |
| 27 |
|
| 28 |
Compress-Raw-Bzip2 provides the interface to the bzip2 library for the modules |
| 29 |
IO::Compress::Bzip2 and IO::Compress::Bunzip2. |
| 30 |
|
| 31 |
PREREQUISITES |
| 32 |
------------- |
| 33 |
|
| 34 |
Before you can build Compress-Raw-Bzip2 you need to have the following |
| 35 |
installed on your system: |
| 36 |
|
| 37 |
* A C compiler |
| 38 |
|
| 39 |
* Perl 5.006 or better. |
| 40 |
|
| 41 |
BUILDING THE MODULE |
| 42 |
------------------- |
| 43 |
|
| 44 |
Assuming you have met all the prerequisites, the module can now be built |
| 45 |
using this sequence of commands: |
| 46 |
|
| 47 |
perl Makefile.PL |
| 48 |
make |
| 49 |
make test |
| 50 |
|
| 51 |
INSTALLATION |
| 52 |
------------ |
| 53 |
|
| 54 |
To install Compress-Raw-Bzip2, run the command below: |
| 55 |
|
| 56 |
make install |
| 57 |
|
| 58 |
TROUBLESHOOTING |
| 59 |
--------------- |
| 60 |
|
| 61 |
Solaris build fails with "language optional software package not installed" |
| 62 |
--------------------------------------------------------------------------- |
| 63 |
|
| 64 |
If you are trying to build this module under Solaris and you get an |
| 65 |
error message like this |
| 66 |
|
| 67 |
/usr/ucb/cc: language optional software package not installed |
| 68 |
|
| 69 |
it means that Perl cannot find the C compiler on your system. The cryptic |
| 70 |
message is just Sun's way of telling you that you haven't bought their |
| 71 |
C compiler. |
| 72 |
|
| 73 |
When you build a Perl module that needs a C compiler, the Perl build |
| 74 |
system tries to use the same C compiler that was used to build perl |
| 75 |
itself. In this case your Perl binary was built with a C compiler that |
| 76 |
lived in /usr/ucb. |
| 77 |
|
| 78 |
To continue with building this module, you need to get a C compiler, |
| 79 |
or tell Perl where your C compiler is, if you already have one. |
| 80 |
|
| 81 |
Assuming you have now got a C compiler, what you do next will be dependent |
| 82 |
on what C compiler you have installed. If you have just installed Sun's |
| 83 |
C compiler, you shouldn't have to do anything. Just try rebuilding |
| 84 |
this module. |
| 85 |
|
| 86 |
If you have installed another C compiler, say gcc, you have to tell perl |
| 87 |
how to use it instead of /usr/ucb/cc. |
| 88 |
|
| 89 |
This set of options seems to work if you want to use gcc. Your mileage |
| 90 |
may vary. |
| 91 |
|
| 92 |
perl Makefile.PL CC=gcc CCCDLFLAGS=-fPIC OPTIMIZE=" " |
| 93 |
make test |
| 94 |
|
| 95 |
If that doesn't work for you, it's time to make changes to the Makefile |
| 96 |
by hand. Good luck! |
| 97 |
|
| 98 |
Solaris build fails with "gcc: unrecognized option `-KPIC'" |
| 99 |
----------------------------------------------------------- |
| 100 |
|
| 101 |
You are running Solaris and you get an error like this when you try to |
| 102 |
build this Perl module |
| 103 |
|
| 104 |
gcc: unrecognized option `-KPIC' |
| 105 |
|
| 106 |
This symptom usually means that you are using a Perl binary that has been |
| 107 |
built with the Sun C compiler, but you are using gcc to build this module. |
| 108 |
|
| 109 |
When Perl builds modules that need a C compiler, it will attempt to use |
| 110 |
the same C compiler and command line options that was used to build perl |
| 111 |
itself. In this case "-KPIC" is a valid option for the Sun C compiler, |
| 112 |
but not for gcc. The equivalent option for gcc is "-fPIC". |
| 113 |
|
| 114 |
The solution is either: |
| 115 |
|
| 116 |
1. Build both Perl and this module with the same C compiler, either |
| 117 |
by using the Sun C compiler for both or gcc for both. |
| 118 |
|
| 119 |
2. Try generating the Makefile for this module like this perl |
| 120 |
|
| 121 |
perl Makefile.PL CC=gcc CCCDLFLAGS=-fPIC OPTIMIZE=" " LD=gcc |
| 122 |
make test |
| 123 |
|
| 124 |
This second option seems to work when mixing a Perl binary built |
| 125 |
with the Sun C compiler and this module built with gcc. Your |
| 126 |
mileage may vary. |
| 127 |
|
| 128 |
HP-UX Notes |
| 129 |
----------- |
| 130 |
|
| 131 |
I've had a report that when building Compress-Raw-Bzip2 under HP-UX that it |
| 132 |
is necessary to have first built the bzip2 library with the -fpic |
| 133 |
option. |
| 134 |
|
| 135 |
SUPPORT |
| 136 |
------- |
| 137 |
|
| 138 |
General feedback/questions/bug reports should be sent to |
| 139 |
https://github.com/pmqs/Compress-Raw-Bzip2/issues |
| 140 |
|
| 141 |
FEEDBACK |
| 142 |
-------- |
| 143 |
|
| 144 |
How to report a problem with Compress-Raw-Bzip2. |
| 145 |
|
| 146 |
To help me help you, I need all of the following information: |
| 147 |
|
| 148 |
1. The Versions of everything relevant. |
| 149 |
This includes: |
| 150 |
|
| 151 |
a. The *complete* output from running this |
| 152 |
|
| 153 |
perl -V |
| 154 |
|
| 155 |
Do not edit the output in any way. |
| 156 |
Note, I want you to run "perl -V" and NOT "perl -v". |
| 157 |
|
| 158 |
If your perl does not understand the "-V" option it is too |
| 159 |
old. This module needs Perl version 5.004 or better. |
| 160 |
|
| 161 |
b. The version of Compress-Raw-Bzip2 you have. |
| 162 |
If you have successfully installed Compress-Raw-Bzip2, this one-liner |
| 163 |
will tell you: |
| 164 |
|
| 165 |
perl -MCompress::Raw::Bzip2 -e 'print qq[ver $Compress::Raw::Bzip2::VERSION\n]' |
| 166 |
|
| 167 |
If you are running windows use this |
| 168 |
|
| 169 |
perl -MCompress::Raw::Bzip2 -e "print qq[ver $Compress::Raw::Bzip2::VERSION\n]" |
| 170 |
|
| 171 |
If you haven't installed Compress-Raw-Bzip2 then search Compress::Raw::Bzip2.pm |
| 172 |
for a line like this: |
| 173 |
|
| 174 |
$VERSION = "2.218" ; |
| 175 |
|
| 176 |
c. The version of bzip2 you have used. |
| 177 |
If you have successfully installed Compress-Raw-Bzip2, this one-liner |
| 178 |
will tell you: |
| 179 |
|
| 180 |
perl -MCompress::Raw::Bzip2 -e "print q[bzip2 ver ]. Compress::Raw::Bzip2::ZLIB_VERSION.qq[\n]" |
| 181 |
|
| 182 |
If not, look at the beginning of the file zlib.h. |
| 183 |
|
| 184 |
2. If you are having problems building Compress-Raw-Bzip2, send me a |
| 185 |
complete log of what happened. Start by unpacking the Compress-Raw-Bzip2 |
| 186 |
module into a fresh directory and keep a log of all the steps, including |
| 187 |
the setting of configuration environment variables (if applicable). |
| 188 |
|
| 189 |
[edit config.in or set environment variables, if necessary] |
| 190 |
perl Makefile.PL |
| 191 |
make |
| 192 |
make test TEST_VERBOSE=1 |
| 193 |
|
| 194 |
Paul Marquess <[email protected]> |