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.
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
22 Compress-Raw-Bzip2 provides the interface to the bzip2 library for the modules
23 IO::Compress::Bzip2 and IO::Compress::Bunzip2.
28 Before you can build Compress-Raw-Bzip2 you need to have the following
29 installed on your system:
33 * Perl 5.004 or better.
38 Assuming you have met all the prerequisites, the module can now be built
39 using this sequence of commands:
48 To install Compress-Raw-Bzip2, run the command below:
55 Solaris build fails with "language optional software package not installed"
56 ---------------------------------------------------------------------------
58 If you are trying to build this module under Solaris and you get an
59 error message like this
61 /usr/ucb/cc: language optional software package not installed
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
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
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.
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
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.
83 This set of options seems to work if you want to use gcc. Your mileage
86 perl Makefile.PL CC=gcc CCCDLFLAGS=-fPIC OPTIMIZE=" "
89 If that doesn't work for you, it's time to make changes to the Makefile
92 Solaris build fails with "gcc: unrecognized option `-KPIC'"
93 -----------------------------------------------------------
95 You are running Solaris and you get an error like this when you try to
96 build this Perl module
98 gcc: unrecognized option `-KPIC'
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.
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".
108 The solution is either:
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.
113 2. Try generating the Makefile for this module like this perl
115 perl Makefile.PL CC=gcc CCCDLFLAGS=-fPIC OPTIMIZE=" " LD=gcc
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
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
132 How to report a problem with Compress-Raw-Bzip2.
134 To help me help you, I need all of the following information:
136 1. The Versions of everything relevant.
139 a. The *complete* output from running this
143 Do not edit the output in any way.
144 Note, I want you to run "perl -V" and NOT "perl -v".
146 If your perl does not understand the "-V" option it is too
147 old. This module needs Perl version 5.004 or better.
149 b. The version of Compress-Raw-Bzip2 you have.
150 If you have successfully installed Compress-Raw-Bzip2, this one-liner
153 perl -MCompress::Raw::Bzip2 -e 'print qq[ver $Compress::Raw::Bzip2::VERSION\n]'
155 If you are running windows use this
157 perl -MCompress::Raw::Bzip2 -e "print qq[ver $Compress::Raw::Bzip2::VERSION\n]"
159 If you haven't installed Compress-Raw-Bzip2 then search Compress::Raw::Bzip2.pm
160 for a line like this:
164 c. The version of bzip2 you have used.
165 If you have successfully installed Compress-Raw-Bzip2, this one-liner
168 perl -MCompress::Raw::Bzip2 -e "print q[bzip2 ver ]. Compress::Raw::Bzip2::ZLIB_VERSION.qq[\n]"
170 If not, look at the beginning of the file zlib.h.
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
176 [edit config.in, if necessary]
179 make test TEST_VERBOSE=1
181 Paul Marquess <pmqs@cpan.org>