[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Perl module build+install process

From: Tom Molesworth
Subject: Perl module build+install process
Date: Sun, 10 Aug 2014 17:35:35 +0100

First, a quick disclaimer: I don't use guix myself, just passing on information which came up in discussion elsewhere

A couple of months ago, someone reported having difficulty installing the Perl distribution "XML::SAX" using guix as a regular user. From a (very) brief inspection of the build process, the issue appears to be that the installation directory is set to a temporary directory under ~/.guix/profile/..., but the files are then moved after installation to a different location. The XML::SAX module therefore expects to finds things in that installation path at runtime, and becomes confused when the paths no longer exist.

Also, the path to which files are copied after installation appears to be of the form:


and subsequently tries to load from:


(again, this is second-hand information, presumably the base32 components in those paths varies between installations)

Since Perl uses an include path, much like the $PATH environment variable for finding executables, this seems to imply that you'd need every module added to the Perl include path (via $PERL5LIB). This would quickly become unwieldy as more modules are installed.

A second issue is that, according to perl-build-system.scm, there does not appear to be any support for CPAN distributions which use the Module::Build toolchain:

Instead, it appears to expect that modules use ExtUtils::MakeMaker, which is not always the case. Module::Build is one of the two main build systems used for Perl modules; it does not use makefiles at all, iinstead it provides a Build.PL which generates the Build script. The build, test and installation process typically follows this sequence:

 perl Build.PL && ./Build && ./Build test && ./Build install

The Module::Build documentation can be found here:

I'm not sure what the solution to either of these two issues should be - the usual advice is "just use the cpan client".

For verification, try installing XML::SAX as a regular user for the first issue, and for an example of a Module::Build-based distribution, try OAuth::Lite2 - there's a more extensive list of Module::Build-based distributions available from here:

Note that some distributions provide both a Makefile.PL and a Build.PL.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]