Guix requires guile-sqlite3

DoneSubmitted by Mark HWeaver.
Details
6 participants
  • Ludovic Courtès
  • Maxim Cournoyer
  • Mark HWeaver
  • myglc2
  • Rutger Helling
  • Ricardo Wurmus
Owner
unassigned
Severity
normal
M
M
Mark HWeaver wrote on 15 Jun 2018 04:24
./pre-inst-env guix system no longer works without ~/.config/guix
(address . bug-guix@gnu.org)
8736xopz0q.fsf@netris.org
Since updating to current master (commit b494bbe46), 'guix system' nolonger works for me:
Toggle snippet (5 lines)mhw@jojen ~/guix$ ./pre-inst-env guix system build -n /etc/config.scmguix: system: command not foundTry `guix --help' for more information.
However, 'guix package' and 'guix build' still work:
Toggle snippet (6 lines)mhw@jojen ~/guix$ ./pre-inst-env guix package -A icecaticecat 52.6.0-gnu1 out gnu/packages/gnuzilla.scm:412:2mhw@jojen ~/guix$ ./pre-inst-env guix build e2fsprogs/gnu/store/0149ikffk8y86yns9f338k2s93nv1vb1-e2fsprogs-1.43.6
Note that I haven't used 'guix pull' in years, and I don't want to useit. My ~/.config/guix/ is empty. I run 'guix' exclusively from gitcheckouts using ./pre-inst-env.
Is this still a supported mode of operation?It is feasible for me to continue in this way?
Mark
R
R
Rutger Helling wrote on 15 Jun 2018 08:56
20180615085652.130dec3b@mykolab.com
I'm having the same problem. I think being able to run Guix entirelyfrom a git checkout is one of the best things about it and it's prettyessential that we keep that possibility for people who want it.
-----BEGIN PGP SIGNATURE-----
iQEzBAEBCAAdFiEEAVThuRzJ2e93ZI3n86cn20T8yjYFAlsjYzQACgkQ86cn20T8yjbjrAgAoYFyLGnZclVLLdBZP0yUsoM+CO+XsRa7C7ErHAuv4jIIRqoXvdgnuBbLYFHXqjkUHzS4xa80N4EtqlpnUMP+sbngDZZiYrvPNFkJorPppslxmOyH1mK9odToIfpaZ5w3OaIQeLtD7WQYsOX2j9gJWgisucz5sVX6s8Zq7Oj5qjnnfdYteDlz5UpXC6zzHUHfWYfNYjtdP2yDBJSslgy3ZTd/nsHe5x1AMglg45+h2BhcQKHnnPqs2l5/6Wacg0Dju7jAMv4u9YUvG805LvBSztmkHR5Zo4sMFdN1QR6+hxxjZkTbRYU1/MBL5PdmEJVH3r9iNVvGYAYQB/YSr7xVCQ===5Rys-----END PGP SIGNATURE-----

M
M
myglc2 wrote on 15 Jun 2018 12:56
(name . Rutger Helling)(address . rhelling@mykolab.com)
877en01fod.fsf@g1.i-did-not-set--mail-host-address--so-tickle-me
On 06/15/2018 at 08:56 Rutger Helling writes:
Toggle quote (4 lines)> 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
R
R
Ricardo Wurmus wrote on 15 Jun 2018 13:24
(name . Mark HWeaver)(address . mhw@netris.org)(address . 31841@debbugs.gnu.org)
87bmccuwbu.fsf@mdc-berlin.de
Hi Mark,
Toggle quote (9 lines)> Since updating to current master (commit b494bbe46), 'guix system' no> longer works for me:>> --8<---------------cut here---------------start------------->8---> mhw@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:
Toggle snippet (19 lines)rekado in master: ./pre-inst-env guix environment --ad-hoc guile guile-sqlite3The 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.drvCreating manual page database...1 entries processed in 0.0 srekado in master [env]: ./pre-inst-env guix system --helpUsage: 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:
[…]
When outside of an environment containing guile-sqlite3 strace showsthat Guix tries to load it right before failing. The cause here is theautoloading of (guix store database), which depends on the sqlitebindings.
We could fix this by recording more of the configuredGUILE_LOAD_{,COMPILED_}PATH and setting it up at runtime withpre-inst-env.
(The same would apply to gnutls bindings, for example.)
--Ricardo
L
L
Ludovic Courtès wrote on 15 Jun 2018 13:45
(name . Ricardo Wurmus)(address . ricardo.wurmus@mdc-berlin.de)
87o9gctgrm.fsf@gnu.org
Hello,
Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> skribis:
Toggle quote (5 lines)> 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 madeguile-sqlite3 a requirement, but ‘configure’ is supposed to error out ifit’s not found.
Mark, any idea why ‘configure’ didn’t fail for you? What does‘config.log’ say?
Toggle quote (4 lines)> 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 developmentenvironment where we can have different expectations IMO.
Ludo’.
L
L
Ludovic Courtès wrote on 15 Jun 2018 13:46
control message for bug #31841
(address . control@debbugs.gnu.org)
87muvwtgqt.fsf@gnu.org
retitle 31841 Guix requires guile-sqlite3
R
R
Ricardo Wurmus wrote on 15 Jun 2018 14:04
Re: bug#31841: ./pre-inst-env guix system no longer works without ~/.config/guix
(name . Ludovic Courtès)(address . ludo@gnu.org)
8736xouuh7.fsf@mdc-berlin.de
Ludovic Courtès <ludo@gnu.org> writes:
Toggle quote (16 lines)> Hello,>> Ricardo Wurmus <ricardo.wurmus@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 adevelopment environment. So “configure” succeeds (when run inside “guixenviromnent guix”), but “./pre-inst-env guix system --help” fails whenrun outside of that environment.
--Ricardo
M
M
Mark HWeaver wrote on 15 Jun 2018 15:08
(name . Ricardo Wurmus)(address . ricardo.wurmus@mdc-berlin.de)
87tvq4nqof.fsf@netris.org
Hi,
Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> writes:
Toggle quote (23 lines)> Ludovic Courtès <ludo@gnu.org> writes:>>> Hello,>>>> Ricardo Wurmus <ricardo.wurmus@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, butuntil now I've been able to *run* Guix using ./pre-inst-env outside ofthe development environment.
My preferred mode of operation has always been to run 'guix' from myprivate git checkout. For years I was able to arrange this by manuallyinstalling a symlink from ~/.config/guix/latest to my git checkout, butat some point that stopped working, so now I have a small 'guix' scriptin ~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 thedevelopment environment, but I wonder if there's a reason not to have'pre-inst-env' install the necessary environment. That would seem to beits job, no?
Mark
M
M
Mark HWeaver wrote on 15 Jun 2018 15:40
(name . Ludovic Courtès)(address . ludo@gnu.org)
87po0snp5g.fsf@netris.org
ludo@gnu.org (Ludovic Courtès) writes:
Toggle quote (6 lines)> Ricardo Wurmus <ricardo.wurmus@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 symlinkpointing to the profile created by 'guix environment guix'. I updatethis environment periodically, as needed.
Toggle quote (3 lines)> 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, Idon't mind keeping my modified 'guix' script above, but I confess that Idon't yet understand the cause of your reluctance.
Anyway, it seems that my practice of running 'guix' from a private gitcheckout is becoming increasingly awkward to arrange. I would bepleased if this mode of operation were better supported.
Regards, Mark
L
L
Ludovic Courtès wrote on 15 Jun 2018 18:51
(name . Mark HWeaver)(address . mhw@netris.org)
87602kro0h.fsf@gnu.org
Hello,
Mark H Weaver <mhw@netris.org> skribis:
Toggle quote (2 lines)> ludo@gnu.org (Ludovic Courtès) writes:
[...]
Toggle quote (7 lines)>> 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 addscomplexity, it’s redundant with the ‘configure’ checks, and one canalways 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 comeup with a patch, that works for me!
Toggle quote (4 lines)> 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’tthink it’s going to stop working any time soon.
In this case, the requirement of a new dependency made the issueapparent but fundamentally nothing has changed. In particular,~/.config/guix is not required any more than it was before, contrary towhat the subject says.
OK to close this issue?
Ludo’.
M
M
myglc2 wrote on 16 Jun 2018 00:56
(name . Ludovic Courtès)(address . ludo@gnu.org)
874li31wx7.fsf@g1.i-did-not-set--mail-host-address--so-tickle-me
On 06/15/2018 at 18:51 Ludovic Courtès writes:
Toggle quote (4 lines)> 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
M
M
Mark HWeaver wrote on 16 Jun 2018 09:51
(name . Ludovic Courtès)(address . ludo@gnu.org)
87d0wr5fuw.fsf@netris.org
flags 31841 + notabugclose 31841thanks
Hi Ludovic,
ludo@gnu.org (Ludovic Courtès) writes:
Toggle quote (14 lines)> Mark H Weaver <mhw@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.
Toggle quote (12 lines)>> 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-envguix system fails outside of the development environment" or "nowrequires guile-sqlite3", but the more I think about it, the more thisseems like a non-issue.
Toggle quote (2 lines)> OK to close this issue?
Done, thanks.
Mark
M
M
Mark HWeaver wrote on 16 Jun 2018 10:06
(address . myglc2@gmail.com)
878t7f5f69.fsf@netris.org
Hi,
myglc2@gmail.com writes:
Toggle quote (4 lines)> 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 didneed to add it temporarily during this transition.
Toggle quote (9 lines)> ... 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 awelcome addition to the "Contributing" chapter of the Guix manual,possibly within the "Running Guix Before It Is Installed" section.
Mark
L
L
Ludovic Courtès wrote on 16 Jun 2018 10:25
(address . myglc2@gmail.com)
87sh5nqgtf.fsf@gnu.org
Hello,
myglc2@gmail.com skribis:
Toggle quote (9 lines)> 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:
Toggle diff (15 lines)diff --git a/doc/contributing.texi b/doc/contributing.texiindex 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@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” becauseit has become unnecessary with commitc5a2e1ffcb029f50c4c18352cf378b61c41c625e.
Likewise, I did not mention “source build-env/etc/profile” because“Building from Git” suggests using ‘guix environment guix’, which setsup the right environment variables.
WDYT?
Ludo’.
M
M
Mark HWeaver wrote on 16 Jun 2018 11:50
(name . Ludovic Courtès)(address . ludo@gnu.org)
87po0r3vsn.fsf@netris.org
Hi,
ludo@gnu.org (Ludovic Courtès) writes:
Toggle quote (42 lines)> myglc2@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@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 berun before running 'guix'.
You seem to be suggesting that "source build-env/etc/profile" couldsimply be replaced by "guix environment guix". One problem with thisidea is that it would introduce a circularity. My 'guix' script cannotvery 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 avoidrunning 'guix pull', it's important to always keep at least oneknown-good development environment for Guix saved as a GC root. Towardthat end, when I run "guix environment guix" to update my developmentenvironment profile, I make sure to preserve my previous profile as a GCroot 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 GCroots, but it has one shortcoming: it discards the older profile symlinkand 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'seasy to get stuck if you're not careful. I suppose that I could alwaysget unstuck by running 'guix pull', but I prefer to avoid it.
Regards, Mark
M
M
Mark HWeaver wrote on 16 Jun 2018 12:04
(no subject)
(address . control@debbugs.gnu.org)
87lgbf3v3s.fsf@netris.org
tags 31841 + notabugthanks
G
G
George Clemmer wrote on 16 Jun 2018 16:31
Re: bug#31841: ./pre-inst-env guix system no longer works without ~/.config/guix
(name . Mark HWeaver)(address . mhw@netris.org)
87lgbeajlm.fsf@gmail.com
Mark H Weaver <mhw@netris.org> writes:
Toggle quote (87 lines)> Hi,>> ludo@gnu.org (Ludovic Courtès) writes:>>> myglc2@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@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 hadto "resort" to 'guix pull' only a few times, usually to escape the 'guixenvironment 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 upand did git pull first ;-)
I recently started using gc roots and "custom" profiles and put my guixbuild into a makefile "harness" to eliminate manual steps. I alsoswitched from the symlink to a script like yours. My script also fallsback 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 theissue raised by this bug.
Recently I have been eyeing all the thrashing that goes on when 'guixenvironment' is run after a "big" pull. Previously I avoided thisthrashing 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
M
M
Maxim Cournoyer wrote on 17 Jun 2018 14:54
Re: Status: Guix requires guile-sqlite3
(name . bug#31841)(address . 31841@debbugs.gnu.org)
8736xlshdm.fsf@gmail.com
Hello,
I just stumbled on this after 'guix pull' on my GuixSD system.
Would it have been possible to have guix output some useful messageabout 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
L
L
Ludovic Courtès wrote on 17 Jun 2018 22:53
Re: bug#31841: ./pre-inst-env guix system no longer works without ~/.config/guix
(name . Mark HWeaver)(address . mhw@netris.org)
87wouxjft9.fsf@gnu.org
Hello,
Mark H Weaver <mhw@netris.org> skribis:
Toggle quote (7 lines)> 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 bootstrappingproblem: given an already installed Guix, it builds your checkout andits 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 “makeas-derivation”/“guix pull” should converge because there’s clearly someoverlap.
Ludo’.
L
L
Ludovic Courtès wrote on 17 Jun 2018 23:19
Re: bug#31841: Status: Guix requires guile-sqlite3
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)(name . bug#31841)(address . 31841@debbugs.gnu.org)
87bmc9jekx.fsf@gnu.org
Hello,
Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:
Toggle quote (6 lines)> 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 wasnot the case with the old ‘guix pull’.
Ludo’.
M
M
Maxim Cournoyer wrote on 18 Jun 2018 03:34
(name . Ludovic Courtès)(address . ludo@gnu.org)(name . bug#31841)(address . 31841@debbugs.gnu.org)
87k1qw7u7w.fsf@gmail.com
Hello,
ludo@gnu.org (Ludovic Courtès) writes:
Toggle quote (16 lines)> Hello,>> Maxim Cournoyer <maxim.cournoyer@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
M
M
myglc2 wrote on 19 Jun 2018 19:08
Re: bug#31841: ./pre-inst-env guix system no longer works without ~/.config/guix
(name . Ludovic Courtès)(address . ludo@gnu.org)
87o9g6zot6.fsf@g1.i-did-not-set--mail-host-address--so-tickle-me
Hi Ludo’,
On 06/17/2018 at 22:53 Ludovic Courtès writes:
Toggle quote (17 lines)> Hello,>> Mark H Weaver <mhw@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
L
L
Ludovic Courtès wrote on 20 Jun 2018 16:06
(address . myglc2@gmail.com)
87bmc5sgal.fsf@gnu.org
Hello,
myglc2@gmail.com skribis:
Toggle quote (24 lines)> On 06/17/2018 at 22:53 Ludovic Courtès writes:>>> Hello,>>>> Mark H Weaver <mhw@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’.
?
Your comment

This issue is archived.

To comment on this conversation send email to 31841@debbugs.gnu.org