From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Molesworth Subject: Perl module build+install process Date: Sun, 10 Aug 2014 17:35:35 +0100 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11c221b21e4f38050049070e Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60086) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XGW5r-0006ZP-Nu for guix-devel@gnu.org; Sun, 10 Aug 2014 12:35:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XGW5p-0007SZ-R4 for guix-devel@gnu.org; Sun, 10 Aug 2014 12:35:39 -0400 Received: from mail-lb0-x233.google.com ([2a00:1450:4010:c04::233]:50786) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XGW5p-0007SS-Av for guix-devel@gnu.org; Sun, 10 Aug 2014 12:35:37 -0400 Received: by mail-lb0-f179.google.com with SMTP id v6so5127808lbi.38 for ; Sun, 10 Aug 2014 09:35:35 -0700 (PDT) List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel@gnu.org Cc: m.trout@shadowcat.co.uk --001a11c221b21e4f38050049070e Content-Type: text/plain; charset=UTF-8 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: /gnu/store/d8fwypp5cnzjpc7kycmj4nj0gwn7k6lq-perl-xml-sax-0.99/ and subsequently tries to load from: /gnu/store/wl8b56g57dbln9rrgi833q2j4ma0bh0z-perl-5.16.1/lib/perl5/site_perl/5.16.1/ (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: http://git.savannah.gnu.org/cgit/guix.git/tree/guix/build/perl-build-system.scm 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: https://metacpan.org/pod/Module::Build 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: https://metacpan.org/requires/distribution/Module-Build Note that some distributions provide both a Makefile.PL and a Build.PL. thanks, Tom --001a11c221b21e4f38050049070e Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
First, a quick disclaimer: I don't use guix mysel= f, 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 gui= x as a regular user. From a (very) brief inspection of the build process, t= he issue appears to be that the installation directory is set to a temporar= y directory under ~/.guix/profile/..., but the files are then moved after i= nstallation 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 installa= tion appears to be of the form:

=C2=A0/gnu/store/d= 8fwypp5cnzjpc7kycmj4nj0gwn7k6lq-perl-xml-sax-0.99/

and subsequently tries to load from:

/gnu/sto= re/wl8b56g57dbln9rrgi833q2j4ma0bh0z-perl-5.16.1/lib/perl5/site_perl/5.16.1/=

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

Since Perl uses an include path, much like the $PATH en= vironment variable for finding executables, this seems to imply that you= 9;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 u= se the Module::Build toolchain:


Instead, it appears to expect that modules use=C2=A0Ext= Utils::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:

=C2=A0perl Build.PL && ./Build && ./Bui= ld test && ./Build install

The Module::Bui= ld documentation can be found here:


I'm not sure what the solution to either of t= hese two issues should be - the usual advice is "just use the cpan cli= ent".

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



thanks,

Tom
--001a11c221b21e4f38050049070e--