[TriLUG] Perl modules and RPMs

Jeremy Portzer jeremyp at pobox.com
Mon Nov 18 08:57:22 EST 2002


On Mon, 2002-11-18 at 00:15, Mike Broome wrote:
> On Sun, Nov 17, 2002 at 10:52:26PM -0500, Tanner Lovelace wrote:
> > 
> > Jeremy,
> > 
> > I have not tested this on RH8 because I don't have access to a
> > RH8 box.  Do you know, specifically, what version of perl and
> > MakeMaker RH8 uses?  
> > 
> > I have tested it on Mandrake 9 and it works there.  Mandrake
> > 9 uses perl 5.8.0 and MakeMaker 6.03.
> 
> I don't have access to a RHL 8.0 box, but I pulled down the perl rpm
> from the ditribution.  It's perl 5.8.0.  (The rpm info says it's release
> 55; that's the Redhat rpm rebuild number, right?)  The version of
> MakeMaker is 6.03.  So it looks pretty much the same as the Mandrake 9
> versions.

Yep, this is correct.  So maybe I'm misunderstanding the problem then.
Here's an example of an error I get (after fixing cpan2rpm to use
"rpmbuild" instead of "rpm").  Command is "cpan2rpm MD5" -- the MD5
module is trivial; all it does is call Digest::MD5.

[snip]
+ mkdir -p
/var/tmp/perl-MD5-2.02-jeremy//usr/lib/perl5/5.8.0/i386-linux-thread-multi
+ make PREFIX=/var/tmp/perl-MD5-2.02-jeremy/usr install
Warning: You do not have permissions to install into
/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi at
/usr/lib/perl5/5.8.0/ExtUtils/Install.pm line 84.Writing
/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/auto/MD5/.packlist
Can't open file
/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/auto/MD5/.packlist: Permission denied at /usr/lib/perl5/5.8.0/ExtUtils/Install.pm line 167
make: *** [pure_site_install] Error 255
error: Bad exit status from /var/tmp/rpm-tmp.93326 (%install)

I think the problem is that overriding the PREFIX variable on the
command line doesn't override everything correctly.  If you look at the
Makefile, you see stuff like this.

INSTALLPRIVLIB = /usr/lib/perl5/5.8.0
INSTALLSITELIB = /usr/lib/perl5/site_perl/5.8.0
[etc.]

So even though PREFIX is being overriden on the command-line, it doesn't
affect these various INSTALL* variables, and therefore the make install
doesn't install to RPM_BUILD_ROOT correctly.  However, building the same
module on Red Hat 7.3, which uses MakeMaker version 5.45, works fine,
and the Makefile generated by MakeMaker looks like this:

INSTALLPRIVLIB = $(PREFIX)/lib/perl5/5.6.1
INSTALLARCHLIB = $(PREFIX)/lib/perl5/5.6.1/i386-linux

In this case, cpan2rpm can properly override the PREFIX when running
"make install".

So what I'm wondering is what does the Makefile look like on Mandrake so
that it works correctly?

--Jeremy




More information about the TriLUG mailing list