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