Subject: bug#31841: ./pre-inst-env guix system no longer works without ~/.config/guix

From: Mark H Weaver <[email-masked]>
Date: Fri, 15 Jun 2018 09:08:00 -0400

Hi,

Ricardo Wurmus <[email-masked]> writes:

> Ludovic Courtès <[email-masked]> writes:
>
>> Hello,
>>
>> Ricardo Wurmus <[email-masked]> 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