unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Andy Patterson <ajpatter@uwaterloo.ca>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: "help-guix@gnu.org" <help-guix@gnu.org>,
	Jack Lucas <silverbeard@protonmail.com>
Subject: Re: ASDF 2 and 3
Date: Tue, 7 Mar 2017 00:01:40 -0500	[thread overview]
Message-ID: <20170307000140.351dc298@uwaterloo.ca> (raw)
In-Reply-To: <87a88yvfq1.fsf@gnu.org>

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

Hi Jack, Ludo',

On Mon, 06 Mar 2017 11:53:26 +0100
ludo@gnu.org (Ludovic Courtès) wrote:

> Hello,
> 
> Jack Lucas <silverbeard@protonmail.com> skribis:
> 
> > I really don't know how to describe this issue. I can't actually
> > pinpoint where the problem is even though I've spent almost all day
> > pulling my hair out over it.
> >
> > When installing CCL guix will pull version 1.11 from the server to
> > install. Version 1.11 is built with ASDF3.1.5 but after installing
> > and loading it up using (require "asdf"), (in-package :asdf) and
> > finally *asdf-version* it says it has ASDF 2.26.

Huh. Way back when I started working on CL in guix, I wondered why
the ccl package didn't include asdf. Now I have a reason to investigate
it.

> >
> > So I guess what I am asking for help with is I have poured over the
> > CCL definition in guix, and every single asdf related file in the
> > guix tree. I see absolutely no reasoning for this would change from
> > 3.1.5 -> 2.26. 
> >
> > I've tried grepping for any other LISP directories or asfd.lisp's.
> > And nothing exists.
> >
> > I'm fine with trying to work around it I just want to make sure
> > guix isn't doing some backround magic to force ASDF 2.26 on
> > everything.  

Guix isn't doing anything special. After having investigated, my guess
is that CCL_DEFAULT_DIRECTORY is set in your environment. This variable
determines how ccl looks up pathnames with the 'ccl:' prefix. You can
check '*module-search-path*' to see which pathnames are being searched
for asdf. The other possibilities are that you have asdf in
$HOME/openmcl/modules, or that you've extended '*module-search-path*'
in your initialization file, and placed asdf somewhere there.

If you'd like to see how the guix ccl package acts in the absence of
your environment, you can run it like this:

$ guix environment --pure --container --ad-hoc ccl -- ccl

> 
> I don’t know what the problem is, but Andy (Cc’d) may have an answer.
> Andy?

The attached patches aim to address the problems. The first is that our
ccl package was not installing any libraries. I'm not sure if we should
be trying to compile these libraries first; I wasn't able to find
anything in the build system to suggest such. The second patch ensures
that the environment always points toward the executed ccl image's
directory, which I believe is in line with the guix philosophy of
"static" package behaviour.

> 
> Thanks for reporting the issue.
> 
> Ludo’.

Thanks!

--
Andy

[-- Attachment #2: 0001-gnu-ccl-Install-included-libraries.patch --]
[-- Type: text/x-patch, Size: 1925 bytes --]

From 75814db025a39eedc24c3554df84f60b27d0567d Mon Sep 17 00:00:00 2001
From: Andy Patterson <ajpatter@uwaterloo.ca>
Date: Mon, 6 Mar 2017 23:22:11 -0500
Subject: [PATCH 1/2] gnu: ccl: Install included libraries.

* gnu/packages/lisp.scm (ccl)[arguments]: Add 'srfi-26' to '#:modules', and
copy the included libraries to the output in the 'install' phase.
---
 gnu/packages/lisp.scm | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm
index b7465e304..0303fe1d3 100644
--- a/gnu/packages/lisp.scm
+++ b/gnu/packages/lisp.scm
@@ -412,6 +412,9 @@ statistical profiler, a code coverage tool, and many other extensions.")
        ("subversion" ,subversion)))
     (arguments
      `(#:tests? #f                      ;no 'check' target
+       #:modules ((srfi srfi-26)
+                  (guix build utils)
+                  (guix build gnu-build-system))
        #:phases
        (alist-replace
         'unpack
@@ -463,10 +466,16 @@ statistical profiler, a code coverage tool, and many other extensions.")
                         ;; "guix package --search="
                         (_              "UNSUPPORTED")))
                     (heap (string-append kernel ".image")))
-               (mkdir-p libdir)
+               (install-file kernel libdir)
+               (install-file heap libdir)
+
+               (let ((dirs '("lib" "library" "examples" "contrib"
+                             "tools" "objc-bridge")))
+                 (for-each copy-recursively
+                           dirs
+                           (map (cut string-append libdir <>) dirs)))
+
                (mkdir-p bindir)
-               (copy-file kernel (string-append libdir kernel))
-               (copy-file heap (string-append libdir heap))
                (with-output-to-file wrapper
                  (lambda ()
                    (display
-- 
2.11.1


[-- Attachment #3: 0002-gnu-ccl-Forcibly-set-CCL_DEFAULT_DIRECTORY.patch --]
[-- Type: text/x-patch, Size: 1169 bytes --]

From c00976d18111d3b35bfbcd2dabdb2cee23370e4f Mon Sep 17 00:00:00 2001
From: Andy Patterson <ajpatter@uwaterloo.ca>
Date: Mon, 6 Mar 2017 23:27:52 -0500
Subject: [PATCH 2/2] gnu: ccl: Forcibly set CCL_DEFAULT_DIRECTORY.

* gnu/packages/lisp.scm (ccl)[arguments]: Unconditionally set the
CCL_DEFAULT_DIRECTORY environment variable in the wrapper script.
---
 gnu/packages/lisp.scm | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm
index 0303fe1d3..fd6bdd3e4 100644
--- a/gnu/packages/lisp.scm
+++ b/gnu/packages/lisp.scm
@@ -481,9 +481,7 @@ statistical profiler, a code coverage tool, and many other extensions.")
                    (display
                     (string-append
                      "#!" bash "/bin/sh\n"
-                     "if [ -z \"$CCL_DEFAULT_DIRECTORY\" ]; then\n"
-                     "    CCL_DEFAULT_DIRECTORY=" libdir "\n"
-                     "fi\n"
+                     "CCL_DEFAULT_DIRECTORY=" libdir "\n"
                      "export CCL_DEFAULT_DIRECTORY\n"
                      "exec " libdir kernel "\n"))))
                (chmod wrapper #o755)))
-- 
2.11.1


      reply	other threads:[~2017-03-07  6:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-19 21:38 ASDF 2 and 3 Jack Lucas
2017-03-06 10:53 ` Ludovic Courtès
2017-03-07  5:01   ` Andy Patterson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170307000140.351dc298@uwaterloo.ca \
    --to=ajpatter@uwaterloo.ca \
    --cc=help-guix@gnu.org \
    --cc=ludo@gnu.org \
    --cc=silverbeard@protonmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).