Bug#788155: perl-modules: ExtUtils::MakeMaker installs perl modules in the wrong directory
Vincent Lefevre
vincent at vinc17.net
Sun Jun 14 22:49:28 UTC 2015
On 2015-06-13 11:22:27 +0300, Niko Tyni wrote:
> On Mon, Jun 08, 2015 at 10:03:04PM +0000, Vincent Lefevre wrote:
> > While there were no problems with Debian up to Debian 7,
> > ExtUtils::MakeMaker now installs perl modules in the wrong
> > directory. For instance, I build Math-MPFR-3.24 with:
> >
> > unset PERL_LOCAL_LIB_ROOT PERL_MB_OPT PERL_MM_OPT
> > mkdir $HOME/testdir
> > perl Makefile.PL PREFIX="$HOME/testdir"
>
> From ExtUtils::MakeMaker documentation, about "PREFIX":
>
> How the exact location is determined is complicated and depends on how
> your Perl was configured. INSTALL_BASE works more like what other build
> systems call "prefix" than PREFIX and we recommend you use that instead.
>
> Indeed, setting INSTALL_BASE instead of PREFIX seems to do what you
> want (as far as I can tell.)
Yes, INSTALL_BASE now works. I had problems with it in the past, but
it doesn't seem to be the reason I used PREFIX, as I used PREFIX in
the first version of my script in 2010 (and it has already worked
until now). I think that this information is rather hidden, in
particular that if one doesn't look inside Makefile.PL, one doesn't
know that ExtUtils::MakeMaker is used, while $PREFIX seems to be
the standard without ExtUtils::MakeMaker. This is perhaps what the
Config(3perl) man page explains:
The situation is even less clear for tools such as MakeMaker that
can be used to install additional modules into non-standard places.
For example, if a user intends to install a module into a private
directory (perhaps by setting "PREFIX" on the Makefile.PL command
line), then there is no reason to assume that the Configure-time
$installstyle setting will be relevant for that "PREFIX".
So, since $PREFIX seems to be a bad idea with ExtUtils::MakeMaker,
shouldn't it detect whether it is set and output an error in such a
case? Or is there a reason not to make it work like INSTALL_BASE?
--
Vincent Lefèvre <vincent at vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
More information about the Perl-maintainers
mailing list