GNU bug report logs - #49965
Correct Input type for Common Lisp packages

Previous Next

Package: guix-patches;

Reported by: Charles <charles.b.jackson <at> protonmail.com>

Date: Mon, 9 Aug 2021 17:20:02 UTC

Severity: normal

Done: Guillaume Le Vaillant <glv <at> posteo.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 49965 in the body.
You can then email your comments to 49965 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#49965; Package guix-patches. (Mon, 09 Aug 2021 17:20:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Charles <charles.b.jackson <at> protonmail.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Mon, 09 Aug 2021 17:20:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Charles <charles.b.jackson <at> protonmail.com>
To: "guix-patches <at> gnu.org" <guix-patches <at> gnu.org>
Subject: Correct Input type for Common Lisp packages
Date: Mon, 09 Aug 2021 17:19:14 +0000
[Message part 1 (text/plain, inline)]
I'm pretty sure this is correct and I have confired on the irc. Open to conversation though.
[Message part 2 (text/html, inline)]
[0001-gnu-Change-inputs-to-propagated-inputs.patch (text/x-patch, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#49965; Package guix-patches. (Mon, 09 Aug 2021 20:31:02 GMT) Full text and rfc822 format available.

Message #8 received at 49965 <at> debbugs.gnu.org (full text, mbox):

From: Guillaume Le Vaillant <glv <at> posteo.net>
To: Charles <charles.b.jackson <at> protonmail.com>
Cc: 49965 <at> debbugs.gnu.org
Subject: Re: [bug#49965] Correct Input type for Common Lisp packages
Date: Mon, 09 Aug 2021 20:30:41 +0000
[Message part 1 (text/plain, inline)]
Charles via Guix-patches via <guix-patches <at> gnu.org> skribis:

> I'm pretty sure this is correct and I have confired on the irc. Open to conversation though.

Hi,

Instead of propagating the dependencies, we use configuration files
indicating to ASDF where to find the sources and compiled files of the
dependencies in the store.

These configuration files are in "$GUIX_PROFILE/etc/common-lisp"
or "$GUIX_ENVIRONMENT/etc/common-lisp".

Do you have a use case where the Common Lisp implementation fails to
find dependencies?
If yes, could you give an example?
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#49965; Package guix-patches. (Mon, 09 Aug 2021 21:00:02 GMT) Full text and rfc822 format available.

Message #11 received at 49965 <at> debbugs.gnu.org (full text, mbox):

From: Charles <charles.b.jackson <at> protonmail.com>
To: Guillaume Le Vaillant <glv <at> posteo.net>
Cc: 49965 <at> debbugs.gnu.org
Subject: Re: [bug#49965] Correct Input type for Common Lisp packages
Date: Mon, 09 Aug 2021 20:58:59 +0000
I didn't know I about theses conf files, and after seeing them, I'm not sure how to use them. Not to mention: I don't have a $GUIX_PROFILE/etc/common-lisp.

Up to now I have been using a config like the following:

(require :asdf)
(uiop:appendf
 asdf:*central-registry*
 (list (uiop:getcwd))
 (directory
  (concatenate
   'string
   (or (uiop:getenv "GUIX_ENVIRONMENT")
       "~/.guix-profile")
   "/share/common-lisp/"
   (case uiop:*implementation-type*
     ((:sbcl) "sbcl")
     ((:ecl) "ecl")
     (otherwise "source"))
   "/*")))

which I find quite readable, although probably not perfect.

What advantage is there to avoiding propagated-inputs?

Also whatever the solution is should probably been in the manual, or better yet automatically loaded by Common Lisp in a system level init file.

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐

On Monday, August 9th, 2021 at 3:30 PM, Guillaume Le Vaillant <glv <at> posteo.net> wrote:

> Charles via Guix-patches via guix-patches <at> gnu.org skribis:
>
> > I'm pretty sure this is correct and I have confired on the irc. Open to conversation though.
>
> Hi,
>
> Instead of propagating the dependencies, we use configuration files
>
> indicating to ASDF where to find the sources and compiled files of the
>
> dependencies in the store.
>
> These configuration files are in "$GUIX_PROFILE/etc/common-lisp"
>
> or "$GUIX_ENVIRONMENT/etc/common-lisp".
>
> Do you have a use case where the Common Lisp implementation fails to
>
> find dependencies?
>
> If yes, could you give an example?




Information forwarded to guix-patches <at> gnu.org:
bug#49965; Package guix-patches. (Tue, 10 Aug 2021 08:11:01 GMT) Full text and rfc822 format available.

Message #14 received at 49965 <at> debbugs.gnu.org (full text, mbox):

From: Guillaume Le Vaillant <glv <at> posteo.net>
To: Charles <charles.b.jackson <at> protonmail.com>
Cc: 49965 <at> debbugs.gnu.org
Subject: Re: [bug#49965] Correct Input type for Common Lisp packages
Date: Tue, 10 Aug 2021 08:10:19 +0000
[Message part 1 (text/plain, inline)]
Charles <charles.b.jackson <at> protonmail.com> skribis:

> I didn't know I about theses conf files, and after seeing them, I'm
> not sure how to use them. Not to mention: I don't have
> a $GUIX_PROFILE/etc/common-lisp.
>
> Up to now I have been using a config like the following:
>
> (require :asdf)
> (uiop:appendf
>  asdf:*central-registry*
>  (list (uiop:getcwd))
>  (directory
>   (concatenate
>    'string
>    (or (uiop:getenv "GUIX_ENVIRONMENT")
>        "~/.guix-profile")
>    "/share/common-lisp/"
>    (case uiop:*implementation-type*
>      ((:sbcl) "sbcl")
>      ((:ecl) "ecl")
>      (otherwise "source"))
>    "/*")))
>
> which I find quite readable, although probably not perfect.

The "$GUIX_PROFILE/etc/common-lisp" directory will only be there if you
have at least one Common Lisp package installed in the profile.

ASDF should be able to find sources and compiled libraries by itself
(it's using XDG_CONFIG_DIRS and XDG_DATA_DIRS to find the
configuration files created by asdf-build-system and populate the
source registry and the output translations).
I suspect that your custom 'asdf:*central-registry*' is superseding the
default configuration, causing ASDF to ignore the
'etc/common-lisp/source-registry.conf.d/*' files.
Could you try without it to see if it works?


> What advantage is there to avoiding propagated-inputs?

I think it's the philosophy of GNU Guix to use references to the store
by default, and use input propagation only when it's the only way to get
things to work. This way the profiles are less cluttered.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#49965; Package guix-patches. (Wed, 11 Aug 2021 23:40:01 GMT) Full text and rfc822 format available.

Message #17 received at 49965 <at> debbugs.gnu.org (full text, mbox):

From: Charles <charles.b.jackson <at> protonmail.com>
To: Guillaume Le Vaillant <glv <at> posteo.net>
Cc: 49965 <at> debbugs.gnu.org
Subject: Re: [bug#49965] Correct Input type for Common Lisp packages
Date: Wed, 11 Aug 2021 23:39:39 +0000
[Message part 1 (text/plain, inline)]
> I think it's the philosophy of GNU Guix to use references to the store

You're right, I see now: "propagated-inputs is useful is for languages that
lack a facility to record the run-time search path". Common Lisp has
asdf:*central-registry*. It still seems to me that propogated inputs is
more intuitive and is more portable to guix on forgein linux distributions.
I have a Centos system with guix package manager, and I had to install every
dependency manually for some packages.

Also it still doesn't fully work for me. I deleted my custom init-file.
Attatched is my shell session where I tryto use the sbcl-cl-str package.
In short: package cannot be found in ad-hoc environment; package is found
if installed, but is compiled with an newer version of sbcl: weird, but also
probably unrelated.
[script (application/octet-stream, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#49965; Package guix-patches. (Thu, 12 Aug 2021 08:52:02 GMT) Full text and rfc822 format available.

Message #20 received at 49965 <at> debbugs.gnu.org (full text, mbox):

From: Guillaume Le Vaillant <glv <at> posteo.net>
To: Charles <charles.b.jackson <at> protonmail.com>
Cc: 49965 <at> debbugs.gnu.org
Subject: Re: [bug#49965] Correct Input type for Common Lisp packages
Date: Thu, 12 Aug 2021 08:51:47 +0000
[Message part 1 (text/plain, inline)]
Charles <charles.b.jackson <at> protonmail.com> skribis:

>> I think it's the philosophy of GNU Guix to use references to the store
>
> You're right, I see now: "propagated-inputs is useful is for languages that
> lack a facility to record the run-time search path". Common Lisp has
> asdf:*central-registry*. It still seems to me that propogated inputs is
> more intuitive and is more portable to guix on forgein linux distributions.
> I have a Centos system with guix package manager, and I had to install every
> dependency manually for some packages.
>
> Also it still doesn't fully work for me. I deleted my custom init-file.
> Attatched is my shell session where I tryto use the sbcl-cl-str package.
> In short: package cannot be found in ad-hoc environment; package is found
> if installed, but is compiled with an newer version of sbcl: weird, but also
> probably unrelated.

From the error in your shell session:

--8<---------------cut here---------------start------------->8---
ASDF could not load str because
#<SB-SYS:FD-STREAM for "file /gnu/store/mn1b8pkxfv081m2crjjh1jk049gxq165-sbcl-cl-ppcre-2.1.1/lib/common-lisp/sbcl/cl-ppcre/packages.fasl" {100648B483}>
is a fasl file compiled with SBCL 2.1.6, and can't be loaded into SBCL 2.1.5.
--8<---------------cut here---------------end--------------->8---

it looks like your are trying to use the SBCL from the foreign
distribution (version 2.1.5) to load libraries compiled with the SBCL
from Guix (version 2.1.6).

I think this is also why it fails to find dependencies. The ASDF used by
the Common Lisp implementations packaged in Guix has a little patch
making it able to find dependencies in "/gnu/store/...". The foreign
SBCL will not have that automatically (it would have to load the
"share/common-lisp/source/asdf/asdf.lisp" file from the cl-asdf
package to use the patched ASDF).

You should add sbcl to your Guix profile/environment as it will be able
to find the dependencies and use the precompiled libraries.

If you really need to use the SBCL from the foreign distribution, you
could use the source cl-xxx packages instead of the precompiled
sbcl-xxx packages to avoid SBCL version mismatch. However this means
that the foreign SBCL will have to compile everything (usually into
"$HOME/.cache/common-lisp/...").
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#49965; Package guix-patches. (Thu, 12 Aug 2021 13:48:01 GMT) Full text and rfc822 format available.

Message #23 received at 49965 <at> debbugs.gnu.org (full text, mbox):

From: Charles <charles.b.jackson <at> protonmail.com>
To: Guillaume Le Vaillant <glv <at> posteo.net>
Cc: 49965 <at> debbugs.gnu.org
Subject: Re: [bug#49965] Correct Input type for Common Lisp packages
Date: Thu, 12 Aug 2021 13:47:13 +0000
Thank you for the valuble information. There is a small misunderstanding:
the console log is from my pure guix system; I just needed to do a guix
upgrade sbcl. Never-the-less, common lisp packages added in an ad-hoc
environment can't be found.




Information forwarded to guix-patches <at> gnu.org:
bug#49965; Package guix-patches. (Fri, 13 Aug 2021 07:35:01 GMT) Full text and rfc822 format available.

Message #26 received at 49965 <at> debbugs.gnu.org (full text, mbox):

From: Guillaume Le Vaillant <glv <at> posteo.net>
To: Charles <charles.b.jackson <at> protonmail.com>
Cc: 49965 <at> debbugs.gnu.org
Subject: Re: [bug#49965] Correct Input type for Common Lisp packages
Date: Fri, 13 Aug 2021 07:33:36 +0000
[Message part 1 (text/plain, inline)]
Charles <charles.b.jackson <at> protonmail.com> skribis:

> Thank you for the valuble information. There is a small misunderstanding:
> the console log is from my pure guix system; I just needed to do a guix
> upgrade sbcl. Never-the-less, common lisp packages added in an ad-hoc
> environment can't be found.

It looks like "$GUIX_ENVIRONMENT/etc" does not get added to
XDG_CONFIG_DIRS in an ad-hoc environment when sbcl is not in the list
of ad-hoc packages, which is why it fails to find some Lisp libraries.

In other words, this works:

  guix environment --ad-hoc sbcl sbcl-cl-str --
    sbcl --eval '(require :asdf)' --eval '(asdf:load-system "str")'

But this doesn't work:

  guix environment --ad-hoc sbcl-cl-str --
    sbcl --eval '(require :asdf)' --eval '(asdf:load-system "str")'
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#49965; Package guix-patches. (Sat, 14 Aug 2021 00:40:02 GMT) Full text and rfc822 format available.

Message #29 received at 49965 <at> debbugs.gnu.org (full text, mbox):

From: Charles <charles.b.jackson <at> protonmail.com>
To: Guillaume Le Vaillant <glv <at> posteo.net>
Cc: 49965 <at> debbugs.gnu.org
Subject: Re: [bug#49965] Correct Input type for Common Lisp packages
Date: Sat, 14 Aug 2021 00:38:51 +0000
Thanks so much! that is some really good information. It seems al the features are present already, so this ticket can be closed.

I think it would be nice to have this part in the manual though:

In other words, this works:

  guix environment --ad-hoc sbcl sbcl-cl-str --
    sbcl --eval '(require :asdf)' --eval '(asdf:load-system "str")'




Reply sent to Guillaume Le Vaillant <glv <at> posteo.net>:
You have taken responsibility. (Sat, 14 Aug 2021 09:49:03 GMT) Full text and rfc822 format available.

Notification sent to Charles <charles.b.jackson <at> protonmail.com>:
bug acknowledged by developer. (Sat, 14 Aug 2021 09:49:03 GMT) Full text and rfc822 format available.

Message #34 received at 49965-done <at> debbugs.gnu.org (full text, mbox):

From: Guillaume Le Vaillant <glv <at> posteo.net>
To: Charles <charles.b.jackson <at> protonmail.com>
Cc: 49965-done <at> debbugs.gnu.org
Subject: Re: [bug#49965] Correct Input type for Common Lisp packages
Date: Sat, 14 Aug 2021 09:48:19 +0000
[Message part 1 (text/plain, inline)]
Charles <charles.b.jackson <at> protonmail.com> skribis:

> Thanks so much! that is some really good information. It seems al the features are present already, so this ticket can be closed.
>
> I think it would be nice to have this part in the manual though:
>
> In other words, this works:
>
>   guix environment --ad-hoc sbcl sbcl-cl-str --
>     sbcl --eval '(require :asdf)' --eval '(asdf:load-system "str")'

Ok, I'm closing this issue then.
In the future, you can also close issues yourself by sending an email
to xxxxx-done <at> debbugs.gnu.org, where xxxxx is the bug number.

Feel free to send a patch for the manual (doc/guix.texi or
doc/guix-cookbook.texi) if you think it can be useful.
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 11 Sep 2021 11:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 283 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.