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