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