all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Perl module build+install process
@ 2014-08-10 16:35 Tom Molesworth
  2014-08-11 14:37 ` Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: Tom Molesworth @ 2014-08-10 16:35 UTC (permalink / raw)
  To: guix-devel; +Cc: m.trout

[-- Attachment #1: Type: text/plain, Size: 2558 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 3378 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-08-11 16:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-10 16:35 Perl module build+install process Tom Molesworth
2014-08-11 14:37 ` Ludovic Courtès
2014-08-11 15:24   ` Tom Molesworth
2014-08-11 16:25     ` Ludovic Courtès

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.