Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ExtUtils::MakeMaker question, before I post to a larger audience

3 views
Skip to first unread message

Phil Kasten

unread,
Dec 14, 2011, 10:25:08 AM12/14/11
to module...@perl.org, pska...@gmail.com
I'm probably just doing something really dumb, but I cannot figure out
what...

I am using the cpan tool to install modules on a FreeBSD system that I
do not have root permission on. I have a provided a PREFIX for the
makepl_arg, to install everything in my local path. Almost everything
works fine.

The modules (e.g. foo.pm) and the man1 pages are correctly installed
relative to the PREFIX path. However, man3 pages seem to ignore PREFIX.
In fact, even if I try using INSTALLMAN3DIR, and whether or not I
specific INSTALLDIRS=perl, nothing seems to cause man3 man pages to be
re-routed. Instead, they try to be installed in the root distribution
and the install fails:

> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
> ERROR: Can't create '/usr/local/lib/perl5/5.8.8/man/man3'
> Do not have write permissions on '/usr/local/lib/perl5/5.8.8/man/man3'
> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
> at /homes/pkasten/perl/lib/perl5/site_perl/5.8.8/Module/Build/Base.pm
> line 3569

In other words, with the PREFIX variable set (to ~/perl), man1 man pages
are correctly placed in ~/perl/man/man1, but man3 man pages seem to want
to go to /usr/local/lib/perl5/5.8.8/man/man3. And, this does not change
even if I also specify INSTALLMAN3DIR=~/perl/man/man3, with or without
INSTALLDIRS=perl.

Here's the line from my ~/.cpan/CPAN/MyConfig.pm:
'makepl_arg' => q[PREFIX=~/perl],

perl is 5.8.8 and ExtUtils::MakeMaker 6.62 is installed on my system.
And the directory ~/perl/man/man3/ exists.

Am I doing something wrong? Should I send this question somewhere else?

Thanks!
Phil

Leon Timmermans

unread,
Dec 16, 2011, 11:57:35 AM12/16/11
to Phil Kasten, Module-Build
On Wed, Dec 14, 2011 at 4:25 PM, Phil Kasten <pska...@gmail.com> wrote:
> Am I doing something wrong?  Should I send this question somewhere else?

Yes you are. This list is for Module::Build, not for
ExtUtils::MakeMaker. You can find the makemaker list at
http://lists.perl.org/list/makemaker.html

Leon

P.S. On your next install, you may want to use INSTALL_BASE instead of
PREFIX, it's a far more predictable mechanism, though not compatible
with PREFIX.

Leon Timmermans

unread,
Dec 16, 2011, 12:33:46 PM12/16/11
to Phil Kasten, Module-Build
On Wed, Dec 14, 2011 at 4:25 PM, Phil Kasten <pska...@gmail.com> wrote:
> Am I doing something wrong?  Should I send this question somewhere else?

On second sight, the error seems to Module::Build after all. You've
been told that on the MakeMaker list (and I assume that's why you
posted this here), and it would be useful if you actually wrote that
in your email. You're making it very hard for others to help you solve
your problem.

What version of Module::Build are you running. If it's not recent
(0.36 or up), please upgrade it and see if the problem disappears.

Leon

David Golden

unread,
Dec 16, 2011, 1:47:36 PM12/16/11
to Phil Kasten, module...@perl.org
On Wed, Dec 14, 2011 at 10:25 AM, Phil Kasten <pska...@gmail.com> wrote:
> I am using the cpan tool to install modules on a FreeBSD system that I do
> not have root permission on.  I have a provided a PREFIX for the makepl_arg,
> to install everything in my local path.  Almost everything works fine.

There are two different sets of configuration options in the "cpan"
tool, one for dists with Makefile.PL and one for dists with Build.PL.
The options are separate because Makefile.PL and Build.PL have
different argument names to do similar things.
For "cpan" (i.e. CPAN.pm), the arguments are like this (type "o conf"
from the cpan prompt to see them):

makepl_arg
make_arg
make_install_arg

Those are the arguments respectively for "perl Makefile.PL", "make"
and "make install". Likewise, they have Build.PL equivalents:

mbuildpl_arg
mbuild_arg
mbuild_install_arg

Those are for "perl Build.PL", "./Build" and "./Build install"

You need to set installation directory arguments for *both* makepl_arg
and mbuildpl_arg.

As others have mentioned, using INSTALL_BASE/install_base is
recommended by experts over PREFIX.

You should also explore the local::lib module on CPAN, which is
designed to automate the kind of configuration that you're doing. See
the "bootstrapping" documentation for how to set it up.

https://metacpan.org/module/local::lib#The-bootstrapping-technique

Good luck!

-- David
0 new messages