GNU bug report logs - #31841
Guix requires guile-sqlite3

Previous Next

Package: guix;

Reported by: Mark H Weaver <mhw <at> netris.org>

Date: Fri, 15 Jun 2018 02:27:02 UTC

Severity: normal

Tags: notabug

Done: Mark H Weaver <mhw <at> netris.org>

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 31841 in the body.
You can then email your comments to 31841 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 bug-guix <at> gnu.org:
bug#31841; Package guix. (Fri, 15 Jun 2018 02:27:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Mark H Weaver <mhw <at> netris.org>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Fri, 15 Jun 2018 02:27:02 GMT) Full text and rfc822 format available.

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

From: Mark H Weaver <mhw <at> netris.org>
To: bug-guix <at> gnu.org
Subject: ./pre-inst-env guix system no longer works without ~/.config/guix
Date: Thu, 14 Jun 2018 22:24:53 -0400
Since updating to current master (commit b494bbe46), 'guix system' no
longer works for me:

--8<---------------cut here---------------start------------->8---
mhw <at> jojen ~/guix$ ./pre-inst-env guix system build -n /etc/config.scm
guix: system: command not found
Try `guix --help' for more information.
--8<---------------cut here---------------end--------------->8---

However, 'guix package' and 'guix build' still work:

--8<---------------cut here---------------start------------->8---
mhw <at> jojen ~/guix$ ./pre-inst-env guix package -A icecat
icecat	52.6.0-gnu1	out	gnu/packages/gnuzilla.scm:412:2
mhw <at> jojen ~/guix$ ./pre-inst-env guix build e2fsprogs
/gnu/store/0149ikffk8y86yns9f338k2s93nv1vb1-e2fsprogs-1.43.6
--8<---------------cut here---------------end--------------->8---

Note that I haven't used 'guix pull' in years, and I don't want to use
it.  My ~/.config/guix/ is empty.  I run 'guix' exclusively from git
checkouts using ./pre-inst-env.

Is this still a supported mode of operation?
It is feasible for me to continue in this way?

       Mark




Information forwarded to bug-guix <at> gnu.org:
bug#31841; Package guix. (Fri, 15 Jun 2018 06:58:01 GMT) Full text and rfc822 format available.

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

From: Rutger Helling <rhelling <at> mykolab.com>
To: mhw <at> netris.org, 31841 <at> debbugs.gnu.org
Subject: bug#31841: ./pre-inst-env guix system no longer works without
 ~/.config/guix
Date: Fri, 15 Jun 2018 08:56:52 +0200
[Message part 1 (text/plain, inline)]
I'm having the same problem. I think being able to run Guix entirely
from a git checkout is one of the best things about it and it's pretty
essential that we keep that possibility for people who want it.
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#31841; Package guix. (Fri, 15 Jun 2018 10:57:02 GMT) Full text and rfc822 format available.

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

From: myglc2 <at> gmail.com
To: Rutger Helling <rhelling <at> mykolab.com>
Cc: mhw <at> netris.org, 31841 <at> debbugs.gnu.org
Subject: Re: bug#31841: ./pre-inst-env guix system no longer works without
 ~/.config/guix
Date: Fri, 15 Jun 2018 06:56:34 -0400
On 06/15/2018 at 08:56 Rutger Helling writes:

> I'm having the same problem. I think being able to run Guix entirely
> from a git checkout is one of the best things about it and it's pretty
> essential that we keep that possibility for people who want it.

+1




Information forwarded to bug-guix <at> gnu.org:
bug#31841; Package guix. (Fri, 15 Jun 2018 11:25:02 GMT) Full text and rfc822 format available.

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

From: Ricardo Wurmus <ricardo.wurmus <at> mdc-berlin.de>
To: Mark H Weaver <mhw <at> netris.org>
Cc: 31841 <at> debbugs.gnu.org
Subject: Re: bug#31841: ./pre-inst-env guix system no longer works without
 ~/.config/guix
Date: Fri, 15 Jun 2018 13:24:05 +0200
Hi Mark,

> Since updating to current master (commit b494bbe46), 'guix system' no
> longer works for me:
>
> --8<---------------cut here---------------start------------->8---
> mhw <at> jojen ~/guix$ ./pre-inst-env guix system build -n /etc/config.scm
> guix: system: command not found
> Try `guix --help' for more information.
> --8<---------------cut here---------------end--------------->8---

This works when inside an environment containing guile-sqlite3:

--8<---------------cut here---------------start------------->8---
rekado in master: ./pre-inst-env guix environment --ad-hoc guile guile-sqlite3
The following derivations will be built:
   /gnu/store/kgw7p80vksbw9yccx947gdar14486y9y-profile.drv
   /gnu/store/fw5m7zhwch6749w3jz8mr1k46qnjp73v-info-dir.drv
   /gnu/store/c1zr6p5w7kaz7rfcq8vbw9pw9pmzycf1-fonts-dir.drv
   /gnu/store/akxhpxyl9ialbl7c2ikykh26ai3i7yw3-ca-certificate-bundle.drv
   /gnu/store/6n654bc9lbisaw97aikd8d13z9w78779-manual-database.drv
Creating manual page database...
1 entries processed in 0.0 s
rekado in master [env]: ./pre-inst-env guix system --help
Usage: guix system [OPTION ...] ACTION [ARG ...] [FILE]
Build the operating system declared in FILE according to ACTION.
Some ACTIONS support additional ARGS.

The valid values for ACTION are:

[…]
--8<---------------cut here---------------end--------------->8---

When outside of an environment containing guile-sqlite3 strace shows
that Guix tries to load it right before failing.  The cause here is the
autoloading of (guix store database), which depends on the sqlite
bindings.

We could fix this by recording more of the configured
GUILE_LOAD_{,COMPILED_}PATH and setting it up at runtime with
pre-inst-env.

(The same would apply to gnutls bindings, for example.)

--
Ricardo




Information forwarded to bug-guix <at> gnu.org:
bug#31841; Package guix. (Fri, 15 Jun 2018 11:46:01 GMT) Full text and rfc822 format available.

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

From: ludo <at> gnu.org (Ludovic Courtès)
To: Ricardo Wurmus <ricardo.wurmus <at> mdc-berlin.de>
Cc: Mark H Weaver <mhw <at> netris.org>, 31841 <at> debbugs.gnu.org
Subject: Re: bug#31841: ./pre-inst-env guix system no longer works without
 ~/.config/guix
Date: Fri, 15 Jun 2018 13:45:33 +0200
Hello,

Ricardo Wurmus <ricardo.wurmus <at> mdc-berlin.de> skribis:

> When outside of an environment containing guile-sqlite3 strace shows
> that Guix tries to load it right before failing.  The cause here is the
> autoloading of (guix store database), which depends on the sqlite
> bindings.

Indeed.  Commit c5a2e1ffcb029f50c4c18352cf378b61c41c625e made
guile-sqlite3 a requirement, but ‘configure’ is supposed to error out if
it’s not found.

Mark, any idea why ‘configure’ didn’t fail for you?  What does
‘config.log’ say?

> We could fix this by recording more of the configured
> GUILE_LOAD_{,COMPILED_}PATH and setting it up at runtime with
> pre-inst-env.

I’m a bit reluctant to that, in part because it’s a development
environment where we can have different expectations IMO.

Ludo’.




Changed bug title to 'Guix requires guile-sqlite3' from './pre-inst-env guix system no longer works without ~/.config/guix' Request was from ludo <at> gnu.org (Ludovic Courtès) to control <at> debbugs.gnu.org. (Fri, 15 Jun 2018 11:47:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-guix <at> gnu.org:
bug#31841; Package guix. (Fri, 15 Jun 2018 12:05:01 GMT) Full text and rfc822 format available.

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

From: Ricardo Wurmus <ricardo.wurmus <at> mdc-berlin.de>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: Mark H Weaver <mhw <at> netris.org>, 31841 <at> debbugs.gnu.org
Subject: Re: bug#31841: ./pre-inst-env guix system no longer works without
 ~/.config/guix
Date: Fri, 15 Jun 2018 14:04:04 +0200
Ludovic Courtès <ludo <at> gnu.org> writes:

> Hello,
>
> Ricardo Wurmus <ricardo.wurmus <at> mdc-berlin.de> skribis:
>
>> When outside of an environment containing guile-sqlite3 strace shows
>> that Guix tries to load it right before failing.  The cause here is the
>> autoloading of (guix store database), which depends on the sqlite
>> bindings.
>
> Indeed.  Commit c5a2e1ffcb029f50c4c18352cf378b61c41c625e made
> guile-sqlite3 a requirement, but ‘configure’ is supposed to error out if
> it’s not found.
>
> Mark, any idea why ‘configure’ didn’t fail for you?  What does
> ‘config.log’ say?

I have the same problem when using “pre-inst-env” outside of a
development environment.  So “configure” succeeds (when run inside “guix
enviromnent guix”), but “./pre-inst-env guix system --help” fails when
run outside of that environment.

--
Ricardo




Information forwarded to bug-guix <at> gnu.org:
bug#31841; Package guix. (Fri, 15 Jun 2018 13:10:02 GMT) Full text and rfc822 format available.

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

From: Mark H Weaver <mhw <at> netris.org>
To: Ricardo Wurmus <ricardo.wurmus <at> mdc-berlin.de>
Cc: Ludovic Courtès <ludo <at> gnu.org>, 31841 <at> debbugs.gnu.org
Subject: Re: bug#31841: ./pre-inst-env guix system no longer works without
 ~/.config/guix
Date: Fri, 15 Jun 2018 09:08:00 -0400
Hi,

Ricardo Wurmus <ricardo.wurmus <at> mdc-berlin.de> writes:

> Ludovic Courtès <ludo <at> gnu.org> writes:
>
>> Hello,
>>
>> Ricardo Wurmus <ricardo.wurmus <at> mdc-berlin.de> skribis:
>>
>>> When outside of an environment containing guile-sqlite3 strace shows
>>> that Guix tries to load it right before failing.  The cause here is the
>>> autoloading of (guix store database), which depends on the sqlite
>>> bindings.
>>
>> Indeed.  Commit c5a2e1ffcb029f50c4c18352cf378b61c41c625e made
>> guile-sqlite3 a requirement, but ‘configure’ is supposed to error out if
>> it’s not found.
>>
>> Mark, any idea why ‘configure’ didn’t fail for you?  What does
>> ‘config.log’ say?
>
> I have the same problem when using “pre-inst-env” outside of a
> development environment.  So “configure” succeeds (when run inside “guix
> enviromnent guix”), but “./pre-inst-env guix system --help” fails when
> run outside of that environment.

Indeed.  I make sure to run 'make' within a development environment, but
until now I've been able to *run* Guix using ./pre-inst-env outside of
the development environment.

My preferred mode of operation has always been to run 'guix' from my
private git checkout.  For years I was able to arrange this by manually
installing a symlink from ~/.config/guix/latest to my git checkout, but
at some point that stopped working, so now I have a small 'guix' script
in ~mhw/bin and ~root/bin:

  #!/bin/sh
  exec /home/mhw/guix/pre-inst-env guix "$@"

I suppose I could extend this script to run 'pre-inst-env' within the
development environment, but I wonder if there's a reason not to have
'pre-inst-env' install the necessary environment.  That would seem to be
its job, no?

      Mark




Information forwarded to bug-guix <at> gnu.org:
bug#31841; Package guix. (Fri, 15 Jun 2018 13:43:02 GMT) Full text and rfc822 format available.

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

From: Mark H Weaver <mhw <at> netris.org>
To: ludo <at> gnu.org (Ludovic Courtès)
Cc: 31841 <at> debbugs.gnu.org, Ricardo Wurmus <ricardo.wurmus <at> mdc-berlin.de>
Subject: Re: bug#31841: ./pre-inst-env guix system no longer works without
 ~/.config/guix
Date: Fri, 15 Jun 2018 09:40:59 -0400
ludo <at> gnu.org (Ludovic Courtès) writes:

> Ricardo Wurmus <ricardo.wurmus <at> mdc-berlin.de> skribis:
>
>> We could fix this by recording more of the configured
>> GUILE_LOAD_{,COMPILED_}PATH and setting it up at runtime with
>> pre-inst-env.

Thanks, Ricardo.  For now, I've changed my local 'guix' script to this:

  #!/bin/sh
  source /var/guix/gcroots/per-user/mhw/environment-guix/etc/profile
  exec /home/mhw/guix/pre-inst-env guix "$@"

Where /var/guix/gcroots/per-user/mhw/environment-guix is a symlink
pointing to the profile created by 'guix environment guix'.  I update
this environment periodically, as needed.

> I’m a bit reluctant to that, in part because it’s a development
> environment where we can have different expectations IMO.

If there's a good reason to avoid implementing Ricardo's suggestion, I
don't mind keeping my modified 'guix' script above, but I confess that I
don't yet understand the cause of your reluctance.

Anyway, it seems that my practice of running 'guix' from a private git
checkout is becoming increasingly awkward to arrange.  I would be
pleased if this mode of operation were better supported.

     Regards,
       Mark




Information forwarded to bug-guix <at> gnu.org:
bug#31841; Package guix. (Fri, 15 Jun 2018 16:53:01 GMT) Full text and rfc822 format available.

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

From: ludo <at> gnu.org (Ludovic Courtès)
To: Mark H Weaver <mhw <at> netris.org>
Cc: 31841 <at> debbugs.gnu.org, Ricardo Wurmus <ricardo.wurmus <at> mdc-berlin.de>
Subject: Re: bug#31841: ./pre-inst-env guix system no longer works without
 ~/.config/guix
Date: Fri, 15 Jun 2018 18:51:58 +0200
Hello,

Mark H Weaver <mhw <at> netris.org> skribis:

> ludo <at> gnu.org (Ludovic Courtès) writes:

[...]

>> I’m a bit reluctant to that, in part because it’s a development
>> environment where we can have different expectations IMO.
>
> If there's a good reason to avoid implementing Ricardo's suggestion, I
> don't mind keeping my modified 'guix' script above, but I confess that I
> don't yet understand the cause of your reluctance.

Well I’m not opposed to it, but my first reaction was that it adds
complexity, it’s redundant with the ‘configure’ checks, and one can
always find other ways to make things break.

Now, I agree that it would be useful for the use case you mentioned
(build in ‘guix environment’ and run outside of it), so if you come
up with a patch, that works for me!

> Anyway, it seems that my practice of running 'guix' from a private git
> checkout is becoming increasingly awkward to arrange.  I would be
> pleased if this mode of operation were better supported.

I do that (like every Guix developer I suppose) every day, so I don’t
think it’s going to stop working any time soon.

In this case, the requirement of a new dependency made the issue
apparent but fundamentally nothing has changed.  In particular,
~/.config/guix is not required any more than it was before, contrary to
what the subject says.

OK to close this issue?

Ludo’.




Information forwarded to bug-guix <at> gnu.org:
bug#31841; Package guix. (Fri, 15 Jun 2018 22:57:02 GMT) Full text and rfc822 format available.

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

From: myglc2 <at> gmail.com
To: ludo <at> gnu.org (Ludovic Courtès)
Cc: Mark H Weaver <mhw <at> netris.org>, 31841 <at> debbugs.gnu.org,
 Ricardo Wurmus <ricardo.wurmus <at> mdc-berlin.de>
Subject: Re: bug#31841: ./pre-inst-env guix system no longer works without
 ~/.config/guix
Date: Fri, 15 Jun 2018 18:56:20 -0400
On 06/15/2018 at 18:51 Ludovic Courtès writes:

> OK to close this issue?
>
> Ludo’.

Hi Ludo’,

Based on this thread I am now making guix like this ...

guix environment guix --ad-hoc guile-sqlite3 --root=build-env -- make [MAKECMDGOALS]

... and using it like this ...

source build-env/etc/profile
./pre-inst-env guix COMMAND ARGS...

... and I am sure you can predict what I will say next ;-)

How about putting this in the doc?

- George




Information forwarded to bug-guix <at> gnu.org:
bug#31841; Package guix. (Sat, 16 Jun 2018 07:53:02 GMT) Full text and rfc822 format available.

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

From: Mark H Weaver <mhw <at> netris.org>
To: ludo <at> gnu.org (Ludovic Courtès)
Cc: 31841 <at> debbugs.gnu.org, Ricardo Wurmus <ricardo.wurmus <at> mdc-berlin.de>
Subject: Re: bug#31841: ./pre-inst-env guix system no longer works without
 ~/.config/guix
Date: Sat, 16 Jun 2018 03:51:19 -0400
flags 31841 + notabug
close 31841
thanks

Hi Ludovic,

ludo <at> gnu.org (Ludovic Courtès) writes:

> Mark H Weaver <mhw <at> netris.org> skribis:
>
>> If there's a good reason to avoid implementing Ricardo's suggestion, I
>> don't mind keeping my modified 'guix' script above, but I confess that I
>> don't yet understand the cause of your reluctance.
>
> Well I’m not opposed to it, but my first reaction was that it adds
> complexity, it’s redundant with the ‘configure’ checks, and one can
> always find other ways to make things break.
>
> Now, I agree that it would be useful for the use case you mentioned
> (build in ‘guix environment’ and run outside of it), so if you come
> up with a patch, that works for me!

Fair enough.

>> Anyway, it seems that my practice of running 'guix' from a private git
>> checkout is becoming increasingly awkward to arrange.  I would be
>> pleased if this mode of operation were better supported.
>
> I do that (like every Guix developer I suppose) every day, so I don’t
> think it’s going to stop working any time soon.
>
> In this case, the requirement of a new dependency made the issue
> apparent but fundamentally nothing has changed.  In particular,
> ~/.config/guix is not required any more than it was before, contrary to
> what the subject says.

Indeed, good points.  I considered retitling this bug to "./pre-inst-env
guix system fails outside of the development environment" or "now
requires guile-sqlite3", but the more I think about it, the more this
seems like a non-issue.

> OK to close this issue?

Done, thanks.

     Mark




bug closed, send any further explanations to 31841 <at> debbugs.gnu.org and Mark H Weaver <mhw <at> netris.org> Request was from Mark H Weaver <mhw <at> netris.org> to control <at> debbugs.gnu.org. (Sat, 16 Jun 2018 07:53:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-guix <at> gnu.org:
bug#31841; Package guix. (Sat, 16 Jun 2018 08:08:02 GMT) Full text and rfc822 format available.

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

From: Mark H Weaver <mhw <at> netris.org>
To: myglc2 <at> gmail.com
Cc: Ludovic Courtès <ludo <at> gnu.org>,
 Ricardo Wurmus <ricardo.wurmus <at> mdc-berlin.de>, 31841 <at> debbugs.gnu.org
Subject: Re: bug#31841: ./pre-inst-env guix system no longer works without
 ~/.config/guix
Date: Sat, 16 Jun 2018 04:06:06 -0400
Hi,

myglc2 <at> gmail.com writes:

> Based on this thread I am now making guix like this ...
>
> guix environment guix --ad-hoc guile-sqlite3 --root=build-env -- make [MAKECMDGOALS]

Nice.  Somehow I failed to know of the existence of the --root option.

The "--ad-hoc guile-sqlite3" should no longer be needed, although I did
need to add it temporarily during this transition.

> ... and using it like this ...
>
> source build-env/etc/profile
> ./pre-inst-env guix COMMAND ARGS...
>
> ... and I am sure you can predict what I will say next ;-)
>
> How about putting this in the doc?

For what it's worth, I agree that something along these lines would be a
welcome addition to the "Contributing" chapter of the Guix manual,
possibly within the "Running Guix Before It Is Installed" section.

      Mark




Information forwarded to bug-guix <at> gnu.org:
bug#31841; Package guix. (Sat, 16 Jun 2018 08:26:02 GMT) Full text and rfc822 format available.

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

From: ludo <at> gnu.org (Ludovic Courtès)
To: myglc2 <at> gmail.com
Cc: Mark H Weaver <mhw <at> netris.org>, 31841 <at> debbugs.gnu.org,
 Ricardo Wurmus <ricardo.wurmus <at> mdc-berlin.de>
Subject: Re: bug#31841: ./pre-inst-env guix system no longer works without
 ~/.config/guix
Date: Sat, 16 Jun 2018 10:25:00 +0200
[Message part 1 (text/plain, inline)]
Hello,

myglc2 <at> gmail.com skribis:

> Based on this thread I am now making guix like this ...
>
> guix environment guix --ad-hoc guile-sqlite3 --root=build-env -- make [MAKECMDGOALS]
>
> ... and using it like this ...
>
> source build-env/etc/profile
> ./pre-inst-env guix COMMAND ARGS...

Yeah we can improve the doc.  Currently, “Building from Git” mentions
‘guix environment guix’, but “Running Guix Before It Is Installed”
doesn’t.  How about this:

[Message part 2 (text/x-patch, inline)]
diff --git a/doc/contributing.texi b/doc/contributing.texi
index 205c972ae..3f82f4bc2 100644
--- a/doc/contributing.texi
+++ b/doc/contributing.texi
@@ -108,7 +108,9 @@ actually installing them.  So that you can distinguish between your
 ``end-user'' hat and your ``motley'' costume.
 
 To that end, all the command-line tools can be used even if you have not
-run @code{make install}.  To do that, prefix each command with
+run @code{make install}.  To do that, you first need to have an environment
+with all the dependencies available (@pxref{Building from Git}), and then
+simply prefix each command with
 @command{./pre-inst-env} (the @file{pre-inst-env} script lives in the
 top build tree of Guix), as in <at> footnote{The @option{-E} flag to
 @command{sudo} guarantees that @code{GUILE_LOAD_PATH} is correctly set
[Message part 3 (text/plain, inline)]
Note that I purposely did not mention “--ad-hoc guile-sqlite3” because
it has become unnecessary with commit
c5a2e1ffcb029f50c4c18352cf378b61c41c625e.

Likewise, I did not mention “source build-env/etc/profile” because
“Building from Git” suggests using ‘guix environment guix’, which sets
up the right environment variables.

WDYT?

Ludo’.

Information forwarded to bug-guix <at> gnu.org:
bug#31841; Package guix. (Sat, 16 Jun 2018 09:52:01 GMT) Full text and rfc822 format available.

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

From: Mark H Weaver <mhw <at> netris.org>
To: ludo <at> gnu.org (Ludovic Courtès)
Cc: Ricardo Wurmus <ricardo.wurmus <at> mdc-berlin.de>, 31841 <at> debbugs.gnu.org,
 myglc2 <at> gmail.com
Subject: Re: bug#31841: ./pre-inst-env guix system no longer works without
 ~/.config/guix
Date: Sat, 16 Jun 2018 05:50:00 -0400
Hi,

ludo <at> gnu.org (Ludovic Courtès) writes:

> myglc2 <at> gmail.com skribis:
>
>> Based on this thread I am now making guix like this ...
>>
>> guix environment guix --ad-hoc guile-sqlite3 --root=build-env -- make [MAKECMDGOALS]
>>
>> ... and using it like this ...
>>
>> source build-env/etc/profile
>> ./pre-inst-env guix COMMAND ARGS...
>
> Yeah we can improve the doc.  Currently, “Building from Git” mentions
> ‘guix environment guix’, but “Running Guix Before It Is Installed”
> doesn’t.  How about this:
>
> diff --git a/doc/contributing.texi b/doc/contributing.texi
> index 205c972ae..3f82f4bc2 100644
> --- a/doc/contributing.texi
> +++ b/doc/contributing.texi
> @@ -108,7 +108,9 @@ actually installing them.  So that you can distinguish between your
>  ``end-user'' hat and your ``motley'' costume.
>  
>  To that end, all the command-line tools can be used even if you have not
> -run @code{make install}.  To do that, prefix each command with
> +run @code{make install}.  To do that, you first need to have an environment
> +with all the dependencies available (@pxref{Building from Git}), and then
> +simply prefix each command with
>  @command{./pre-inst-env} (the @file{pre-inst-env} script lives in the
>  top build tree of Guix), as in <at> footnote{The @option{-E} flag to
>  @command{sudo} guarantees that @code{GUILE_LOAD_PATH} is correctly set
>
>
> Note that I purposely did not mention “--ad-hoc guile-sqlite3” because
> it has become unnecessary with commit
> c5a2e1ffcb029f50c4c18352cf378b61c41c625e.
>
> Likewise, I did not mention “source build-env/etc/profile” because
> “Building from Git” suggests using ‘guix environment guix’, which sets
> up the right environment variables.
>
> WDYT?

When running Guix exclusively from a git checkout and never running
'guix pull', something like "source build-env/etc/profile" must now be
run before running 'guix'.

You seem to be suggesting that "source build-env/etc/profile" could
simply be replaced by "guix environment guix".  One problem with this
idea is that it would introduce a circularity.  My 'guix' script cannot
very well begin by running 'guix environment guix'.

There are other problems as well:

(1) The build environment used to build the git checkout must be
    registered as a GC root, or else "guix gc" may render my git
    checkout of 'guix' non-functional, with no easy way to recover
    (at least not without running 'guix pull').

(2) When my git checkout is in a bad state, or is unbuilt, then during
    this time I'm unable to easily run "guix environment guix".  So, I
    always need a way to restore a known good development environment to
    rebuild my copy of guix, without using guix itself.  My method is to
    source the etc/profile from my saved development environment profile.

I should emphasize that when running Guix this way, if you wish to avoid
running 'guix pull', it's important to always keep at least one
known-good development environment for Guix saved as a GC root.  Toward
that end, when I run "guix environment guix" to update my development
environment profile, I make sure to preserve my previous profile as a GC
root until I'm confident that my new profile is working.

The suggested recipe involving "guix environment guix --root=build-env"
command is a nice improvement over my manual management of these GC
roots, but it has one shortcoming: it discards the older profile symlink
and GC root immediately, before it's known whether the new profile works.

This message should make it clear that when using Guix in this way, it's
easy to get stuck if you're not careful.  I suppose that I could always
get unstuck by running 'guix pull', but I prefer to avoid it.

     Regards,
       Mark




Added tag(s) notabug. Request was from Mark H Weaver <mhw <at> netris.org> to control <at> debbugs.gnu.org. (Sat, 16 Jun 2018 10:07:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-guix <at> gnu.org:
bug#31841; Package guix. (Sat, 16 Jun 2018 14:32:01 GMT) Full text and rfc822 format available.

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

From: George Clemmer <myglc2 <at> gmail.com>
To: Mark H Weaver <mhw <at> netris.org>
Cc: Ludovic Courtès <ludo <at> gnu.org>,
 Ricardo Wurmus <ricardo.wurmus <at> mdc-berlin.de>, 31841 <at> debbugs.gnu.org
Subject: Re: bug#31841: ./pre-inst-env guix system no longer works without
 ~/.config/guix
Date: Sat, 16 Jun 2018 10:31:33 -0400
Mark H Weaver <mhw <at> netris.org> writes:

> Hi,
>
> ludo <at> gnu.org (Ludovic Courtès) writes:
>
>> myglc2 <at> gmail.com skribis:
>>
>>> Based on this thread I am now making guix like this ...
>>>
>>> guix environment guix --ad-hoc guile-sqlite3 --root=build-env -- make [MAKECMDGOALS]
>>>
>>> ... and using it like this ...
>>>
>>> source build-env/etc/profile
>>> ./pre-inst-env guix COMMAND ARGS...
>>
>> Yeah we can improve the doc.  Currently, “Building from Git” mentions
>> ‘guix environment guix’, but “Running Guix Before It Is Installed”
>> doesn’t.  How about this:
>>
>> diff --git a/doc/contributing.texi b/doc/contributing.texi
>> index 205c972ae..3f82f4bc2 100644
>> --- a/doc/contributing.texi
>> +++ b/doc/contributing.texi
>> @@ -108,7 +108,9 @@ actually installing them.  So that you can distinguish between your
>>  ``end-user'' hat and your ``motley'' costume.
>>
>>  To that end, all the command-line tools can be used even if you have not
>> -run @code{make install}.  To do that, prefix each command with
>> +run @code{make install}.  To do that, you first need to have an environment
>> +with all the dependencies available (@pxref{Building from Git}), and then
>> +simply prefix each command with
>>  @command{./pre-inst-env} (the @file{pre-inst-env} script lives in the
>>  top build tree of Guix), as in <at> footnote{The @option{-E} flag to
>>  @command{sudo} guarantees that @code{GUILE_LOAD_PATH} is correctly set
>>
>>
>> Note that I purposely did not mention “--ad-hoc guile-sqlite3” because
>> it has become unnecessary with commit
>> c5a2e1ffcb029f50c4c18352cf378b61c41c625e.
>>
>> Likewise, I did not mention “source build-env/etc/profile” because
>> “Building from Git” suggests using ‘guix environment guix’, which sets
>> up the right environment variables.
>>
>> WDYT?
>
> When running Guix exclusively from a git checkout and never running
> 'guix pull', something like "source build-env/etc/profile" must now be
> run before running 'guix'.
>
> You seem to be suggesting that "source build-env/etc/profile" could
> simply be replaced by "guix environment guix".  One problem with this
> idea is that it would introduce a circularity.  My 'guix' script cannot
> very well begin by running 'guix environment guix'.
>
> There are other problems as well:
>
> (1) The build environment used to build the git checkout must be
>     registered as a GC root, or else "guix gc" may render my git
>     checkout of 'guix' non-functional, with no easy way to recover
>     (at least not without running 'guix pull').
>
> (2) When my git checkout is in a bad state, or is unbuilt, then during
>     this time I'm unable to easily run "guix environment guix".  So, I
>     always need a way to restore a known good development environment to
>     rebuild my copy of guix, without using guix itself.  My method is to
>     source the etc/profile from my saved development environment profile.
>
> I should emphasize that when running Guix this way, if you wish to avoid
> running 'guix pull', it's important to always keep at least one
> known-good development environment for Guix saved as a GC root.  Toward
> that end, when I run "guix environment guix" to update my development
> environment profile, I make sure to preserve my previous profile as a GC
> root until I'm confident that my new profile is working.
>
> The suggested recipe involving "guix environment guix --root=build-env"
> command is a nice improvement over my manual management of these GC
> roots, but it has one shortcoming: it discards the older profile symlink
> and GC root immediately, before it's known whether the new profile works.
>
> This message should make it clear that when using Guix in this way, it's
> easy to get stuck if you're not careful.  I suppose that I could always
> get unstuck by running 'guix pull', but I prefer to avoid it.
>
>      Regards,
>        Mark

Hi Mark,

While I have submitted a few patches, generally I use 'guix pull; make'
primarily to manage my GuixSD systems. In the past 2+ years I have had
to "resort" to 'guix pull' only a few times, usually to escape the 'guix
environment guix' "hole" you describe. Eventually I discovered that if I
_never_ did 'guix gc' and did 'guix environment guix' _before_ I did
'git pull', I never fell into the "hole", that is, unless I screwed up
and did git pull first ;-)

I recently started using gc roots and "custom" profiles and put my guix
build into a makefile "harness" to eliminate manual steps.  I also
switched from the symlink to a script like yours. My script also falls
back to the globally-installed Guix if an environmental is set.

The harness inflates a custom profile and includes a makefile that calls
'guix environment guix -- make'. I added the gc root to work around the
issue raised by this bug.

Recently I have been eyeing all the thrashing that goes on when 'guix
environment' is run after a "big" pull. Previously I avoided this
thrashing and the hole when I remembered to do 'guix environment guix'
before 'git pull'.

I am contemplating two modifications to the harness:

1) Cache the 'guix environment' gc root at the end of each successful
   make and a) normally use the cache, or b) fall back to the cache if
   'guix environment' fails. 

2) Add the guix dependencies to the harness's custom profile so 'guix
   environment guix' won't be needed.  

WDYT? - George




Information forwarded to bug-guix <at> gnu.org:
bug#31841; Package guix. (Sun, 17 Jun 2018 12:55:01 GMT) Full text and rfc822 format available.

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

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: bug#31841 <31841 <at> debbugs.gnu.org>
Subject: Re: Status: Guix requires guile-sqlite3
Date: Sun, 17 Jun 2018 08:54:29 -0400
Hello,

I just stumbled on this after 'guix pull' on my GuixSD system.

Would it have been possible to have guix output some useful message
about a missing dependency? (guile-sqlite3 dependency is required for
`guix system').

I wasn't sure how to proceed until efraim let me know of this bug in
#guix.

Thanks,

Maxim




Information forwarded to bug-guix <at> gnu.org:
bug#31841; Package guix. (Sun, 17 Jun 2018 20:54:01 GMT) Full text and rfc822 format available.

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

From: ludo <at> gnu.org (Ludovic Courtès)
To: Mark H Weaver <mhw <at> netris.org>
Cc: Ricardo Wurmus <ricardo.wurmus <at> mdc-berlin.de>, 31841 <at> debbugs.gnu.org,
 myglc2 <at> gmail.com
Subject: Re: bug#31841: ./pre-inst-env guix system no longer works without
 ~/.config/guix
Date: Sun, 17 Jun 2018 22:53:06 +0200
Hello,

Mark H Weaver <mhw <at> netris.org> skribis:

> I should emphasize that when running Guix this way, if you wish to avoid
> running 'guix pull', it's important to always keep at least one
> known-good development environment for Guix saved as a GC root.  Toward
> that end, when I run "guix environment guix" to update my development
> environment profile, I make sure to preserve my previous profile as a GC
> root until I'm confident that my new profile is working.

The “make as-derivation” command aims to help with this bootstrapping
problem: given an already installed Guix, it builds your checkout and
its dependencies like ‘guix pull’ would do.  Thus, you can run:

  $(make as-derivation)/bin/guix environment guix

This is just a first step, but I think “make” and “make
as-derivation”/“guix pull” should converge because there’s clearly some
overlap.

Ludo’.




Information forwarded to bug-guix <at> gnu.org:
bug#31841; Package guix. (Sun, 17 Jun 2018 21:20:02 GMT) Full text and rfc822 format available.

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

From: ludo <at> gnu.org (Ludovic Courtès)
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: bug#31841 <31841 <at> debbugs.gnu.org>
Subject: Re: bug#31841: Status: Guix requires guile-sqlite3
Date: Sun, 17 Jun 2018 23:19:42 +0200
Hello,

Maxim Cournoyer <maxim.cournoyer <at> gmail.com> skribis:

> I just stumbled on this after 'guix pull' on my GuixSD system.
>
> Would it have been possible to have guix output some useful message
> about a missing dependency? (guile-sqlite3 dependency is required for
> `guix system').

This will not be a problem now: ~/.config/guix/current, which the new
‘guix pull’ provides, contains Guix and all its dependencies.  This was
not the case with the old ‘guix pull’.

Ludo’.




Information forwarded to bug-guix <at> gnu.org:
bug#31841; Package guix. (Mon, 18 Jun 2018 01:36:02 GMT) Full text and rfc822 format available.

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

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: ludo <at> gnu.org (Ludovic Courtès)
Cc: bug#31841 <31841 <at> debbugs.gnu.org>
Subject: Re: bug#31841: Status: Guix requires guile-sqlite3
Date: Sun, 17 Jun 2018 21:34:59 -0400
Hello,

ludo <at> gnu.org (Ludovic Courtès) writes:

> Hello,
>
> Maxim Cournoyer <maxim.cournoyer <at> gmail.com> skribis:
>
>> I just stumbled on this after 'guix pull' on my GuixSD system.
>>
>> Would it have been possible to have guix output some useful message
>> about a missing dependency? (guile-sqlite3 dependency is required for
>> `guix system').
>
> This will not be a problem now: ~/.config/guix/current, which the new
> ‘guix pull’ provides, contains Guix and all its dependencies.  This was
> not the case with the old ‘guix pull’.
>
> Ludo’.

I see.  Thank you as always, Ludo!

Maxim




Information forwarded to bug-guix <at> gnu.org:
bug#31841; Package guix. (Tue, 19 Jun 2018 17:10:02 GMT) Full text and rfc822 format available.

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

From: myglc2 <at> gmail.com
To: ludo <at> gnu.org (Ludovic Courtès)
Cc: myglc2 <at> gmail.com, Mark H Weaver <mhw <at> netris.org>, 31841 <at> debbugs.gnu.org,
 Ricardo Wurmus <ricardo.wurmus <at> mdc-berlin.de>
Subject: Re: bug#31841: ./pre-inst-env guix system no longer works without
 ~/.config/guix
Date: Tue, 19 Jun 2018 13:08:53 -0400
Hi Ludo’,

On 06/17/2018 at 22:53 Ludovic Courtès writes:

> Hello,
>
> Mark H Weaver <mhw <at> netris.org> skribis:
>
>> I should emphasize that when running Guix this way, if you wish to avoid
>> running 'guix pull', it's important to always keep at least one
>> known-good development environment for Guix saved as a GC root.  Toward
>> that end, when I run "guix environment guix" to update my development
>> environment profile, I make sure to preserve my previous profile as a GC
>> root until I'm confident that my new profile is working.
>
> The “make as-derivation” command aims to help with this bootstrapping
> problem: given an already installed Guix, it builds your checkout and
> its dependencies like ‘guix pull’ would do.  Thus, you can run:
>
>   $(make as-derivation)/bin/guix environment guix

Nice! This is news to me. Thank you for pointing it out.

Does 'make as-derivation' set the "current" symlink normally set by
'guix pull'?

TIA - George




Information forwarded to bug-guix <at> gnu.org:
bug#31841; Package guix. (Wed, 20 Jun 2018 14:08:01 GMT) Full text and rfc822 format available.

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

From: ludo <at> gnu.org (Ludovic Courtès)
To: myglc2 <at> gmail.com
Cc: Mark H Weaver <mhw <at> netris.org>, 31841 <at> debbugs.gnu.org,
 Ricardo Wurmus <ricardo.wurmus <at> mdc-berlin.de>
Subject: Re: bug#31841: ./pre-inst-env guix system no longer works without
 ~/.config/guix
Date: Wed, 20 Jun 2018 16:06:58 +0200
Hello,

myglc2 <at> gmail.com skribis:

> On 06/17/2018 at 22:53 Ludovic Courtès writes:
>
>> Hello,
>>
>> Mark H Weaver <mhw <at> netris.org> skribis:
>>
>>> I should emphasize that when running Guix this way, if you wish to avoid
>>> running 'guix pull', it's important to always keep at least one
>>> known-good development environment for Guix saved as a GC root.  Toward
>>> that end, when I run "guix environment guix" to update my development
>>> environment profile, I make sure to preserve my previous profile as a GC
>>> root until I'm confident that my new profile is working.
>>
>> The “make as-derivation” command aims to help with this bootstrapping
>> problem: given an already installed Guix, it builds your checkout and
>> its dependencies like ‘guix pull’ would do.  Thus, you can run:
>>
>>   $(make as-derivation)/bin/guix environment guix
>
> Nice! This is news to me. Thank you for pointing it out.
>
> Does 'make as-derivation' set the "current" symlink normally set by
> 'guix pull'?

Not at all; only ‘guix pull’ does.

Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 19 Jul 2018 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 7 years and 35 days ago.

Previous Next


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