unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Heads-up: New dependency on Guile-Gcrypt
@ 2018-09-02 16:35 Ludovic Courtès
  2018-09-03 10:36 ` Christopher Lemmer Webber
  0 siblings, 1 reply; 22+ messages in thread
From: Ludovic Courtès @ 2018-09-02 16:35 UTC (permalink / raw)
  To: guix-devel

Hello Guix!

Coming soon: Guix will no longer provide its own crypto modules and will
instead depend on Guile-Gcrypt:

  https://issues.guix.info/issue/32606

‘guix pull’ will happily perform the transition.

If you’re used to working on a Git checkout with “guix environment
guix”, you’ll have to add ‘guile-gcrypt’ to the environment.  If your
“guix” is too old and lacks the ‘guile-gcrypt’ package, you have a
chicken-and-egg problem that you can solve either by running ‘guix pull’
or by running this from your checkout:

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

or:

  $(make as-derivation)/bin/guix package -i guile-gcrypt

Besides, our friends at openSuSE have already created a ‘guile-gcrypt’
package.  :-)

Ludo’.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Heads-up: New dependency on Guile-Gcrypt
  2018-09-02 16:35 Ludovic Courtès
@ 2018-09-03 10:36 ` Christopher Lemmer Webber
  2018-09-04 20:07   ` Alex Vong
  0 siblings, 1 reply; 22+ messages in thread
From: Christopher Lemmer Webber @ 2018-09-03 10:36 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

Ludovic Courtès writes:

> Hello Guix!
>
> Coming soon: Guix will no longer provide its own crypto modules and will
> instead depend on Guile-Gcrypt:
>
>   https://issues.guix.info/issue/32606
>
> ‘guix pull’ will happily perform the transition.
>
> If you’re used to working on a Git checkout with “guix environment
> guix”, you’ll have to add ‘guile-gcrypt’ to the environment.  If your
> “guix” is too old and lacks the ‘guile-gcrypt’ package, you have a
> chicken-and-egg problem that you can solve either by running ‘guix pull’
> or by running this from your checkout:
>
>   $(make as-derivation)/bin/guix environment guix
>
> or:
>
>   $(make as-derivation)/bin/guix package -i guile-gcrypt
>
> Besides, our friends at openSuSE have already created a ‘guile-gcrypt’
> package.  :-)
>
> Ludo’.

Woohoo!  Really nice to see that package put to good use!

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Heads-up: New dependency on Guile-Gcrypt
  2018-09-03 10:36 ` Christopher Lemmer Webber
@ 2018-09-04 20:07   ` Alex Vong
  2018-09-04 20:14     ` Leo Famulari
  2018-09-04 21:33     ` Ludovic Courtès
  0 siblings, 2 replies; 22+ messages in thread
From: Alex Vong @ 2018-09-04 20:07 UTC (permalink / raw)
  To: Christopher Lemmer Webber; +Cc: guix-devel

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

Is master FTBFS because of this update? I get the following error when
running make:


======================================================================
Updating ./doc/version.texi
  MAKEINFO doc/guix.info
Updating ./doc/version-fr.texi
  MAKEINFO doc/guix.fr.info
  CXX      nix/nix-daemon/guix_daemon-nix-daemon.o
  CXX      nix/nix-daemon/guix_daemon-guix-daemon.o
  CXX      nix/libstore/libstore_a-gc.o
  CXX      nix/libstore/libstore_a-globals.o
  CXX      nix/libstore/libstore_a-misc.o
  CXX      nix/libstore/libstore_a-references.o
  CXX      nix/libstore/libstore_a-store-api.o
  CXX      nix/libstore/libstore_a-optimise-store.o
  CXX      nix/libstore/libstore_a-local-store.o
  CXX      nix/libstore/libstore_a-build.o
  CXX      nix/libstore/libstore_a-pathlocks.o
  CXX      nix/libstore/libstore_a-derivations.o
  CXX      nix/libstore/libstore_a-builtins.o
  CXX      nix/libstore/libstore_a-sqlite.o
  AR       libstore.a
ar: `u' modifier ignored since `D' is the default (see `U')
  CXX      nix/libutil/libutil_a-archive.o
  CXX      nix/libutil/libutil_a-affinity.o
  CXX      nix/libutil/libutil_a-serialise.o
  CXX      nix/libutil/libutil_a-util.o
  CXX      nix/libutil/libutil_a-hash.o
  CXX      nix/libutil/libutil_a-gcrypt-hash.o
  AR       libutil.a
ar: `u' modifier ignored since `D' is the default (see `U')
  CXX      nix/boost/format/libformat_a-free_funcs.o
  CXX      nix/boost/format/libformat_a-parsing.o
  CXX      nix/boost/format/libformat_a-format_implementation.o
  AR       libformat.a
ar: `u' modifier ignored since `D' is the default (see `U')
  CXXLD    guix-daemon
/usr/bin/ld: nix/nix-daemon/guix_daemon-guix-daemon.o: in function `main':
/home/alexvong1995/scm/guix/nix/nix-daemon/guix-daemon.cc:434: undefined reference to `gcry_check_version'
/usr/bin/ld: /home/alexvong1995/scm/guix/nix/nix-daemon/guix-daemon.cc:442: undefined reference to `gcry_control'
/usr/bin/ld: libutil.a(libutil_a-hash.o): in function `nix::HashSink::currentHash()':
/home/alexvong1995/scm/guix/./nix/libutil/gcrypt-hash.hh:35: undefined reference to `gcry_md_copy'
/usr/bin/ld: /home/alexvong1995/scm/guix/./nix/libutil/gcrypt-hash.hh:35: undefined reference to `gcry_md_copy'
/usr/bin/ld: /home/alexvong1995/scm/guix/./nix/libutil/gcrypt-hash.hh:35: undefined reference to `gcry_md_copy'
/usr/bin/ld: /home/alexvong1995/scm/guix/./nix/libutil/gcrypt-hash.hh:35: undefined reference to `gcry_md_copy'
/usr/bin/ld: libutil.a(libutil_a-gcrypt-hash.o): in function `guix_hash_init':
/home/alexvong1995/scm/guix/nix/libutil/gcrypt-hash.cc:31: undefined reference to `gcry_md_open'
/usr/bin/ld: libutil.a(libutil_a-gcrypt-hash.o): in function `guix_hash_final':
/home/alexvong1995/scm/guix/nix/libutil/gcrypt-hash.cc:46: undefined reference to `gcry_md_get_algo_dlen'
/usr/bin/ld: /home/alexvong1995/scm/guix/nix/libutil/gcrypt-hash.cc:45: undefined reference to `gcry_md_read'
/usr/bin/ld: /home/alexvong1995/scm/guix/nix/libutil/gcrypt-hash.cc:47: undefined reference to `gcry_md_close'
/usr/bin/ld: libutil.a(libutil_a-gcrypt-hash.o): in function `guix_hash_update':
/home/alexvong1995/scm/guix/nix/libutil/gcrypt-hash.cc:38: undefined reference to `gcry_md_write'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:3422: guix-daemon] Error 1
make[2]: Leaving directory '/home/alexvong1995/scm/guix'
make[1]: *** [Makefile:4549: all-recursive] Error 1
make[1]: Leaving directory '/home/alexvong1995/scm/guix'
make: *** [Makefile:3200: all] Error 2
======================================================================


Christopher Lemmer Webber <cwebber@dustycloud.org> writes:

> Ludovic Courtès writes:
>
>> Hello Guix!
>>
>> Coming soon: Guix will no longer provide its own crypto modules and will
>> instead depend on Guile-Gcrypt:
>>
>>   https://issues.guix.info/issue/32606
>>
>> ‘guix pull’ will happily perform the transition.
>>
>> If you’re used to working on a Git checkout with “guix environment
>> guix”, you’ll have to add ‘guile-gcrypt’ to the environment.  If your
>> “guix” is too old and lacks the ‘guile-gcrypt’ package, you have a
>> chicken-and-egg problem that you can solve either by running ‘guix pull’
>> or by running this from your checkout:
>>
>>   $(make as-derivation)/bin/guix environment guix
>>
>> or:
>>
>>   $(make as-derivation)/bin/guix package -i guile-gcrypt
>>
>> Besides, our friends at openSuSE have already created a ‘guile-gcrypt’
>> package.  :-)
>>
>> Ludo’.
>
> Woohoo!  Really nice to see that package put to good use!

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Heads-up: New dependency on Guile-Gcrypt
  2018-09-04 20:07   ` Alex Vong
@ 2018-09-04 20:14     ` Leo Famulari
  2018-09-04 21:33     ` Ludovic Courtès
  1 sibling, 0 replies; 22+ messages in thread
From: Leo Famulari @ 2018-09-04 20:14 UTC (permalink / raw)
  To: Alex Vong; +Cc: guix-devel

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

On Wed, Sep 05, 2018 at 04:07:41AM +0800, Alex Vong wrote:
> Is master FTBFS because of this update? I get the following error when
> running make:

It works for me after I did `make clean` and made sure that guile-gcrypt
was available.

Basically:

$ guix environment --pure guix --ad-hoc guile-gcrypt
$ make clean && ./configure --localstatedir=/var && make

What happens if you try something like that?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Heads-up: New dependency on Guile-Gcrypt
  2018-09-04 20:07   ` Alex Vong
  2018-09-04 20:14     ` Leo Famulari
@ 2018-09-04 21:33     ` Ludovic Courtès
  2018-09-05 23:24       ` Alex Vong
  1 sibling, 1 reply; 22+ messages in thread
From: Ludovic Courtès @ 2018-09-04 21:33 UTC (permalink / raw)
  To: Alex Vong; +Cc: guix-devel

Hi Alex,

Alex Vong <alexvong1995@gmail.com> skribis:

>   CXXLD    guix-daemon
> /usr/bin/ld: nix/nix-daemon/guix_daemon-guix-daemon.o: in function `main':
> /home/alexvong1995/scm/guix/nix/nix-daemon/guix-daemon.cc:434: undefined reference to `gcry_check_version'
> /usr/bin/ld: /home/alexvong1995/scm/guix/nix/nix-daemon/guix-daemon.cc:442: undefined reference to `gcry_control'

What does “grep LIBGCRYPT config.log” return?

‘nix/local.mk’ expects $(LIBGCRYPT_LIBS) to contain at least “-lgcrypt”,
but in your case this variable seems to be empty.

Ludo’.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Heads-up: New dependency on Guile-Gcrypt
@ 2018-09-05 11:19 Paul Garlick
  2018-09-05 20:58 ` Ludovic Courtès
  0 siblings, 1 reply; 22+ messages in thread
From: Paul Garlick @ 2018-09-05 11:19 UTC (permalink / raw)
  To: ludo; +Cc: guix-devel

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

Hi Ludo,

> ‘guix pull’ will happily perform the transition.

For me, I have an older Guix (16th May) that fails to install guile-
gcrypt.  As root:

$ guix --version
guix (GNU Guix) 6f84dc4314cd84550d9fc7e7afa11c495edc45a5

When I try 'guix pull' there is an attempt to build guile-gcrypt
locally that fails with the message './configure:  No such file or
directory'.  I can see that the build procedure moves from the 'unpack'
phase straight to the 'patch-usr-bin-file' phase with no 'bootstrap'
phase in between.

Aha, another chicken-and-egg, I thought; my older Guix does not have a
'bootstrap' phase.  However, I can see that the commit for adding the
new phase was made on 11th March, so perhaps 'guix pull' is failing for
a different reason.

Maybe there is a workaround for this scenario.  WDYT?

Best regards,

Paul.

[-- Attachment #2: Type: text/html, Size: 1119 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Heads-up: New dependency on Guile-Gcrypt
  2018-09-05 11:19 Heads-up: New dependency on Guile-Gcrypt Paul Garlick
@ 2018-09-05 20:58 ` Ludovic Courtès
  2018-09-06  9:24   ` Paul Garlick
  2018-09-06 10:06   ` Ludovic Courtès
  0 siblings, 2 replies; 22+ messages in thread
From: Ludovic Courtès @ 2018-09-05 20:58 UTC (permalink / raw)
  To: Paul Garlick; +Cc: guix-devel

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

Hi Paul,

Paul Garlick <pgarlick@tourbillion-technology.com> skribis:

>> ‘guix pull’ will happily perform the transition.
>
> For me, I have an older Guix (16th May) that fails to install guile-
> gcrypt.  As root:
>
> $ guix --version
> guix (GNU Guix) 6f84dc4314cd84550d9fc7e7afa11c495edc45a5
>
> When I try 'guix pull' there is an attempt to build guile-gcrypt
> locally that fails with the message './configure:  No such file or
> directory'.  I can see that the build procedure moves from the 'unpack'
> phase straight to the 'patch-usr-bin-file' phase with no 'bootstrap'
> phase in between.

Hmm…

> Aha, another chicken-and-egg, I thought; my older Guix does not have a
> 'bootstrap' phase.  However, I can see that the commit for adding the
> new phase was made on 11th March, so perhaps 'guix pull' is failing for
> a different reason.

Indeed, that may well be the reason.  Can you try to apply the patch
below in a local branch, and then run “make as-derivation”?

TIA, and apologies for the breakage!

Ludo’.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 1039 bytes --]

diff --git a/build-aux/build-self.scm b/build-aux/build-self.scm
index f472724f1..f91b43987 100644
--- a/build-aux/build-self.scm
+++ b/build-aux/build-self.scm
@@ -216,6 +216,16 @@ person's version identifier."
                    "1gir7ifknbmbvjlql5j6wzk7bkb5lnmq80q59ngz43hhpclrk5k3"))
                  (file-name (string-append name "-" version ".tar.gz"))))
        (build-system gnu-build-system)
+       (arguments
+        ;; The 'bootstrap' phase appeared in 'core-updates', which was merged
+        ;; into 'master' ca. June 2018.
+        '(#:phases (modify-phases %standard-phases
+                     (delete 'bootstrap)
+                     (add-before 'configure 'bootstrap
+                       (lambda _
+                         (unless (zero? (system* "autoreconf" "-vfi"))
+                           (error "autoreconf failed"))
+                         #t)))))
        (native-inputs
         `(("pkg-config" ,(specification->package "pkg-config"))
           ("autoconf" ,(specification->package "autoconf"))

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* Re: Heads-up: New dependency on Guile-Gcrypt
  2018-09-04 21:33     ` Ludovic Courtès
@ 2018-09-05 23:24       ` Alex Vong
  2018-09-06  9:21         ` Ludovic Courtès
  0 siblings, 1 reply; 22+ messages in thread
From: Alex Vong @ 2018-09-05 23:24 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

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

Hello everyone,

I think I figure out why it is failing! Firstly, I am building on debian
testing, so the issue may not appear when building guix within
guix. Secondly, I run 'git clean -fdx && git reset --hard' and install
guile-gcrypt before I build, so dirty build dir and missing deps
shouldn't be cause.

ludo@gnu.org (Ludovic Courtès) writes:

> Hi Alex,
>
> Alex Vong <alexvong1995@gmail.com> skribis:
>
>>   CXXLD    guix-daemon
>> /usr/bin/ld: nix/nix-daemon/guix_daemon-guix-daemon.o: in function `main':
>> /home/alexvong1995/scm/guix/nix/nix-daemon/guix-daemon.cc:434:
>> undefined reference to `gcry_check_version'
>> /usr/bin/ld:
>> /home/alexvong1995/scm/guix/nix/nix-daemon/guix-daemon.cc:442:
>> undefined reference to `gcry_control'
>
> What does “grep LIBGCRYPT config.log” return?
>
It returns:

======================================================================
ac_cv_path_LIBGCRYPT_CONFIG=/usr/bin/libgcrypt-config
LIBGCRYPT='libgcrypt'
LIBGCRYPT_CFLAGS=''
LIBGCRYPT_CONFIG='/usr/bin/libgcrypt-config'
LIBGCRYPT_LIBDIR=''
LIBGCRYPT_LIBS='-L -lgcrypt'
LIBGCRYPT_PREFIX='no'
======================================================================

I think the problem is in '-L -lgcrypt'. Here '-lgcrypt' is interpreted
as a dir instead of a flag. To check this is indeed the case, I run
'make V=1'. Indeed, the command causing the failure is:

======================================================================
g++ -Wall -std=c++11 -g -O2   -o guix-daemon nix/nix-daemon/guix_daemon-nix-daemon.o nix/nix-daemon/guix_daemon-guix-daemon.o libstore.a libutil.a libformat.a -lz -lsqlite3 -L -lgcrypt -lbz2 
======================================================================

And after the I remove the '-L' flag, it compiles! However, I don't know
what is the root cause of this problem. Is there a bug in configure.ac /
Makefile.am or a bug in autotools itself?

> ‘nix/local.mk’ expects $(LIBGCRYPT_LIBS) to contain at least “-lgcrypt”,
> but in your case this variable seems to be empty.
>
> Ludo’.

Cheers,
Alex

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Heads-up: New dependency on Guile-Gcrypt
  2018-09-05 23:24       ` Alex Vong
@ 2018-09-06  9:21         ` Ludovic Courtès
  0 siblings, 0 replies; 22+ messages in thread
From: Ludovic Courtès @ 2018-09-06  9:21 UTC (permalink / raw)
  To: Alex Vong; +Cc: guix-devel

Hi,

Alex Vong <alexvong1995@gmail.com> skribis:

> It returns:
>
> ======================================================================
> ac_cv_path_LIBGCRYPT_CONFIG=/usr/bin/libgcrypt-config
> LIBGCRYPT='libgcrypt'
> LIBGCRYPT_CFLAGS=''
> LIBGCRYPT_CONFIG='/usr/bin/libgcrypt-config'
> LIBGCRYPT_LIBDIR=''
> LIBGCRYPT_LIBS='-L -lgcrypt'
> LIBGCRYPT_PREFIX='no'
> ======================================================================
>
> I think the problem is in '-L -lgcrypt'. Here '-lgcrypt' is interpreted
> as a dir instead of a flag.

Indeed.  I believe 888b64038db00c73467a05320c7c7f03070e5621 fixes it.

Thanks!

Ludo’.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Heads-up: New dependency on Guile-Gcrypt
  2018-09-05 20:58 ` Ludovic Courtès
@ 2018-09-06  9:24   ` Paul Garlick
  2018-09-06 10:06   ` Ludovic Courtès
  1 sibling, 0 replies; 22+ messages in thread
From: Paul Garlick @ 2018-09-06  9:24 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

On Wed, 2018-09-05 at 22:58 +0200, Ludovic Courtès wrote:
> 
> Indeed, that may well be the reason.  Can you try to apply the patch
> below in a local branch, and then run “make as-derivation”?
> 

Hi Ludo,

Many thanks.  I have applied the patch in a new branch.

$ git describe
v0.15.0-1390-gca71942

However, 'make as-derivation' is not working yet.  Do I need an ad-hoc
environment to run this command?  

So far, I have tried using the system (Centos 7) make but this fails
since system guile (v2.0.9) is not installed.

Best regards,

Paul.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Heads-up: New dependency on Guile-Gcrypt
  2018-09-05 20:58 ` Ludovic Courtès
  2018-09-06  9:24   ` Paul Garlick
@ 2018-09-06 10:06   ` Ludovic Courtès
  2018-09-06 11:58     ` Paul Garlick
  2018-09-06 21:14     ` Paul Garlick
  1 sibling, 2 replies; 22+ messages in thread
From: Ludovic Courtès @ 2018-09-06 10:06 UTC (permalink / raw)
  To: Paul Garlick; +Cc: guix-devel

Hi,

ludo@gnu.org (Ludovic Courtès) skribis:

> Indeed, that may well be the reason.  Can you try to apply the patch
> below in a local branch, and then run “make as-derivation”?

I was able to reproduce the bug by myself, by running:

  guix pull --commit=6f84dc4314cd84550d9fc7e7afa11c495edc45a5

and then:

  guix pull

I could then confirm that the patch fixed the problem by applying it
locally and running “guix pull --url=$PWD” from that old Guix.

Pushed as 3ffcad7df3ab8947010814f61b32ce14ea80e780, thanks!

Ludo’.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Heads-up: New dependency on Guile-Gcrypt
  2018-09-06 10:06   ` Ludovic Courtès
@ 2018-09-06 11:58     ` Paul Garlick
  2018-09-06 21:08       ` Ludovic Courtès
  2018-09-06 21:14     ` Paul Garlick
  1 sibling, 1 reply; 22+ messages in thread
From: Paul Garlick @ 2018-09-06 11:58 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

> 
> Pushed as 3ffcad7df3ab8947010814f61b32ce14ea80e780, thanks!
> 

Hi Ludo,

I tried a 'guix pull' as root and this time it completes.  However,
there were warnings generated:

WARNING: compilation of /gnu/store/38553wfz0jwlgbw13pk99xl79pbfx58d-
guile-2.2.3/bin/guild failed

and

Failed to autoload make-session in (gnutls)

I think the GUILE_LOAD_PATH variable needed to be set before running
'guix pull'

Now all the guix commands I have tried generate:

ERROR: In procedure scm-error:
no code for module (gcrypt hash)

How best to recover?  Ideally I would undo the 'guix pull' and re-do
the command with GUILE_LOAD_PATH set.

Best regards,

Paul.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Heads-up: New dependency on Guile-Gcrypt
  2018-09-06 11:58     ` Paul Garlick
@ 2018-09-06 21:08       ` Ludovic Courtès
  2018-09-10  9:34         ` Pjotr Prins
  0 siblings, 1 reply; 22+ messages in thread
From: Ludovic Courtès @ 2018-09-06 21:08 UTC (permalink / raw)
  To: Paul Garlick; +Cc: guix-devel

Hi Paul,

Paul Garlick <pgarlick@tourbillion-technology.com> skribis:

> I tried a 'guix pull' as root and this time it completes.  However,
> there were warnings generated:

Could you paste complete commands and outputs?  That would help
determine the context of the warning/error messages you mention.

> Now all the guix commands I have tried generate:
>
> ERROR: In procedure scm-error:
> no code for module (gcrypt hash)

Since you’re upgrading from a very old checkout, note that you’re also
switching to the new “guix pull”, which populates
~/.config/guix/current.

To be sure you’re using the just-pulled ‘guix’ command, could you run:

  export PATH="$HOME/.config/guix/current/bin:$PATH"
  hash guix
  guix --version

?  What’s the output of this?

Thanks in advance,
Ludo’.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Heads-up: New dependency on Guile-Gcrypt
  2018-09-06 10:06   ` Ludovic Courtès
  2018-09-06 11:58     ` Paul Garlick
@ 2018-09-06 21:14     ` Paul Garlick
  1 sibling, 0 replies; 22+ messages in thread
From: Paul Garlick @ 2018-09-06 21:14 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

Hi Ludo,

Success! I have been able to upgrade the root Guix installation.

The steps I have taken were:

i) remove the 'latest' symlink
ii) re-create the symlink to point to the previous installation
iii) use 'guix gc --delete' to delete the guile-gcrypt package
components
iv) run 'GUILE_LOAD_PATH=/root/.guix-profile/share/guile/site/2.2 guix
pull'
v) run
'GUILE_LOAD_COMPILED_PATH=/gnu/store/3yvsd7w79a8rl42rxfg0xqzh9s14f3si-
guile-gcrypt-0.1.0/lib/guile/2.2/site-ccache guix package --upgrade'

This time the '... guix pull' command did not generate the '
Failed to autoload make-session in (gnutls)' errors.  In retrospect, I
think the only missing element from the first attempt was the
GUILE_LOAD_PATH variable.

The last piece of the jigsaw was setting GUILE_LOAD_COMPILED_PATH so
that the gcrypt module could be found.  This was required for all of
the guix commands that I tried.

Now:

$ guix package --list-installed
guix    0.15.0-
3.3d43017        out     /gnu/store/sa9xj13i0568xajsjh78g3pnlsww8x8g-
guix-0.15.0-3.3d43017
...

Best regards,

Paul.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Heads-up: New dependency on Guile-Gcrypt
  2018-09-06 21:08       ` Ludovic Courtès
@ 2018-09-10  9:34         ` Pjotr Prins
  2018-09-10 11:15           ` Paul Garlick
  0 siblings, 1 reply; 22+ messages in thread
From: Pjotr Prins @ 2018-09-10  9:34 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel, Paul Garlick

Guix does not expose Guile load paths in etc/profile nor
--search-paths. This makes it a bit trickier to solve

** ERROR: In procedure scm-error: no code for module (gcrypt hash)

Guix is built with Guile and Guile has trouble finding the gcrypt
package. One fix is to install guix in a profile and setting the LOAD
PATHS, e.g.:

: guix package -i guix -p ~/opt/guix

: GUILE_LOAD_PATH=~/opt/guix/share/guile/site/2.2/
: GUILE_LOAD_COMPILED_PATH=~/opt/guix/share/guile/site/2.2/


On Thu, Sep 06, 2018 at 11:08:24PM +0200, Ludovic Courtès wrote:
> Hi Paul,
> 
> Paul Garlick <pgarlick@tourbillion-technology.com> skribis:
> 
> > I tried a 'guix pull' as root and this time it completes.  However,
> > there were warnings generated:
> 
> Could you paste complete commands and outputs?  That would help
> determine the context of the warning/error messages you mention.
> 
> > Now all the guix commands I have tried generate:
> >
> > ERROR: In procedure scm-error:
> > no code for module (gcrypt hash)
> 
> Since you’re upgrading from a very old checkout, note that you’re also
> switching to the new “guix pull”, which populates
> ~/.config/guix/current.
> 
> To be sure you’re using the just-pulled ‘guix’ command, could you run:
> 
>   export PATH="$HOME/.config/guix/current/bin:$PATH"
>   hash guix
>   guix --version
> 
> ?  What’s the output of this?
> 
> Thanks in advance,
> Ludo’.
> 

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Heads-up: New dependency on Guile-Gcrypt
  2018-09-10  9:34         ` Pjotr Prins
@ 2018-09-10 11:15           ` Paul Garlick
  2018-09-10 20:45             ` Ludovic Courtès
  0 siblings, 1 reply; 22+ messages in thread
From: Paul Garlick @ 2018-09-10 11:15 UTC (permalink / raw)
  To: Pjotr Prins, Ludovic Courtès; +Cc: guix-devel

Hi Pjotr,

Thank you.

> Guix is built with Guile and Guile has trouble finding the gcrypt
> package.  

Having successfully upgraded my root and user Guix installations I now
find that my development installation is unable to locate guile-gcrypt:

$ ./pre-inst-env guix --version
ERROR: In procedure scm-error:
no code for module (gcrypt hash)

If I use my root guix profile, in a simlar way to your suggestion, it
works:

$ sudo GUILE_LOAD_PATH=/root/.guix-profile/share/guile/site/2.2 ./pre-
inst-env guix --version
guix (GNU Guix) 0.15.0.1558-b0632

Is there a best way to notify the ./pre-inst-env commands about guile-
gcrypt?  Using sudo seems like the wrong approach.  Would installing
guile-gcrypt as the development user suffice?

Best regards,

Paul. 

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Heads-up: New dependency on Guile-Gcrypt
  2018-09-10 11:15           ` Paul Garlick
@ 2018-09-10 20:45             ` Ludovic Courtès
  2018-09-11  9:54               ` Paul Garlick
  0 siblings, 1 reply; 22+ messages in thread
From: Ludovic Courtès @ 2018-09-10 20:45 UTC (permalink / raw)
  To: Paul Garlick; +Cc: guix-devel

Hello,

Paul Garlick <pgarlick@tourbillion-technology.com> skribis:

> Is there a best way to notify the ./pre-inst-env commands about guile-
> gcrypt?  Using sudo seems like the wrong approach.  Would installing
> guile-gcrypt as the development user suffice?

‘guix pull’ and ‘make as-derivation’ (which is really like ‘guix pull
--url=$PWD’) take care of bootstrapping (modulo the bug that you
reported, Paul, and that was fixed in
3ffcad7df3ab8947010814f61b32ce14ea80e780), so normally the tricks I
posted should work:

  https://lists.gnu.org/archive/html/guix-devel/2018-09/msg00031.html

Or am I missing something?

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Heads-up: New dependency on Guile-Gcrypt
  2018-09-10 20:45             ` Ludovic Courtès
@ 2018-09-11  9:54               ` Paul Garlick
  2018-09-12 17:14                 ` Ludovic Courtès
  0 siblings, 1 reply; 22+ messages in thread
From: Paul Garlick @ 2018-09-11  9:54 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

Hi Ludo,

> Or am I missing something?
> 

No, I don't think so.  Everything is working again after your bug fix.
 

I have just needed to introduce a couple of concepts in order to use
the ./pre-inst-env commands in the git checkout.  Firstly, I use a
development environment created by:

$ guix environment --ad-hoc guile gnutls guile-gcrypt guile-json nss-
certs

This adds the guile-gcrypt dependency and prevents the 'no code for
module (gcrypt hash)' error.

Then, for working on a new package ('my-new-package'), I create a new
environment:

$ ./pre-inst-env guix environment --pure my-new-package --ad-hoc guile-
gcrypt

Lastly, to build the package I need to define GUILE_LOAD_PATH:

$ GUILE_LOAD_PATH=$GUIX_ENVIRONMENT/share/guile/site/2.2 ./pre-inst-env 
guix build -K my-new-package

An alternative would perhaps be to install guile-gcrypt in the user
profile (or a separate profile as suggested by Pjotr).  Then use
GUILE_LOAD_PATH=/home/paul/.guix-profile/share/guile/site/2.2.

Best regards,

Paul.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Heads-up: New dependency on Guile-Gcrypt
  2018-09-11  9:54               ` Paul Garlick
@ 2018-09-12 17:14                 ` Ludovic Courtès
  2018-09-14 19:17                   ` Thorsten Wilms
  0 siblings, 1 reply; 22+ messages in thread
From: Ludovic Courtès @ 2018-09-12 17:14 UTC (permalink / raw)
  To: Paul Garlick; +Cc: guix-devel

Hello,

Paul Garlick <pgarlick@tourbillion-technology.com> skribis:

> I have just needed to introduce a couple of concepts in order to use
> the ./pre-inst-env commands in the git checkout.  Firstly, I use a
> development environment created by:

Once you have run ‘guix pull’, the ‘guile-gcrypt’ package is known and
it’s an input to the ‘guix’ package.  Thus, from there on, simply
running:

  guix environment guix

should give you an environment that contains guile-gcrypt, guile-json,
guile, and the whole shebang.  In that environment you should be able to
hack on Guix itself.

Does that make sense?

In anyway, if you found a way out, that’s good.  :-)

Ludo’.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Heads-up: New dependency on Guile-Gcrypt
  2018-09-12 17:14                 ` Ludovic Courtès
@ 2018-09-14 19:17                   ` Thorsten Wilms
  2018-09-27  7:45                     ` Ricardo Wurmus
  0 siblings, 1 reply; 22+ messages in thread
From: Thorsten Wilms @ 2018-09-14 19:17 UTC (permalink / raw)
  To: guix-devel

On 12.09.2018 19:14, Ludovic Courtès wrote:
> Once you have run ‘guix pull’, the ‘guile-gcrypt’ package is known and
> it’s an input to the ‘guix’ package.  Thus, from there on, simply
> running:
> 
>    guix environment guix
> 
> should give you an environment that contains guile-gcrypt, guile-json,
> guile, and the whole shebang.  In that environment you should be able to
> hack on Guix itself.

Well, I `guix pull`ed twice today, still get:
"no code for module (gcrypt pk-crypto)"

I also did `sudo guix pull` and updated all packages for both roles. 
Foreign distro (Ubuntu 18.04, Unity Edition).

For whatever it may be worth, within the environment:
---
$: env | grep GUI
GUIX_ENVIRONMENT=/gnu/store/2w5kxhmkq4zkamsgx1b40vr3ii1z4dxb-profile
GUILE_LOAD_COMPILED_PATH=/gnu/store/2w5kxhmkq4zkamsgx1b40vr3ii1z4dxb-profile/lib/guile/2.2/site-ccache:/gnu/store/2w5kxhmkq4zkamsgx1b40vr3ii1z4dxb-profile/share/guile/site/2.2
GUIX_LOCPATH=/home/thorwil/.guix-profile/lib/locale
GUIX_PACKAGE_PATH=/media/hd/devel/guix/packages
GUILE_LOAD_PATH=/home/thorwil/.guix-profile/share/guile/site/2.2
---

-- 
Thorsten Wilms

thorwil's design for free software:
http://thorwil.wordpress.com/

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Heads-up: New dependency on Guile-Gcrypt
  2018-09-14 19:17                   ` Thorsten Wilms
@ 2018-09-27  7:45                     ` Ricardo Wurmus
  2018-09-27 11:36                       ` Thorsten Wilms
  0 siblings, 1 reply; 22+ messages in thread
From: Ricardo Wurmus @ 2018-09-27  7:45 UTC (permalink / raw)
  To: t_w_; +Cc: guix-devel


Hi Thorsten,

> On 12.09.2018 19:14, Ludovic Courtès wrote:
>> Once you have run ‘guix pull’, the ‘guile-gcrypt’ package is known and
>> it’s an input to the ‘guix’ package.  Thus, from there on, simply
>> running:
>>
>>    guix environment guix
>>
>> should give you an environment that contains guile-gcrypt, guile-json,
>> guile, and the whole shebang.  In that environment you should be able to
>> hack on Guix itself.
>
> Well, I `guix pull`ed twice today, still get:
> "no code for module (gcrypt pk-crypto)"
>
> I also did `sudo guix pull` and updated all packages for both
> roles. Foreign distro (Ubuntu 18.04, Unity Edition).

Note that “sudo guix pull” fetches a new version of Guix for the root
user only.

> For whatever it may be worth, within the environment:
> ---
> $: env | grep GUI
> GUIX_ENVIRONMENT=/gnu/store/2w5kxhmkq4zkamsgx1b40vr3ii1z4dxb-profile
> GUILE_LOAD_COMPILED_PATH=/gnu/store/2w5kxhmkq4zkamsgx1b40vr3ii1z4dxb-profile/lib/guile/2.2/site-ccache:/gnu/store/2w5kxhmkq4zkamsgx1b40vr3ii1z4dxb-profile/share/guile/site/2.2
> GUIX_LOCPATH=/home/thorwil/.guix-profile/lib/locale
> GUIX_PACKAGE_PATH=/media/hd/devel/guix/packages
> GUILE_LOAD_PATH=/home/thorwil/.guix-profile/share/guile/site/2.2
> ---

GUILE_LOAD_PATH should point to the environment profile.  Are you
perhaps overwriting GUILE_LOAD_PATH in ~/.bashrc?

--
Ricardo

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Heads-up: New dependency on Guile-Gcrypt
  2018-09-27  7:45                     ` Ricardo Wurmus
@ 2018-09-27 11:36                       ` Thorsten Wilms
  0 siblings, 0 replies; 22+ messages in thread
From: Thorsten Wilms @ 2018-09-27 11:36 UTC (permalink / raw)
  To: Guix-devel

On 27.09.2018 09:45, Ricardo Wurmus wrote:

>> I also did `sudo guix pull` and updated all packages for both
>> roles. Foreign distro (Ubuntu 18.04, Unity Edition).
> 
> Note that “sudo guix pull” fetches a new version of Guix for the root
> user only.

Yes, I made sure to update both as plain user and via sudo.

> GUILE_LOAD_PATH should point to the environment profile.  Are you
> perhaps overwriting GUILE_LOAD_PATH in ~/.bashrc?

I was until now. Finally moved the rest of exports to .bash_profile.

A few days ago, the problem went away, with the only relevant thing I 
did (knowingly) was a few rounds of guix pull and update spread over 
days. Sorry about forgetting to update this thread and many thanks for 
getting back on this!


-- 
Thorsten Wilms

thorwil's design for free software:
http://thorwil.wordpress.com/

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2018-09-27 11:39 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-05 11:19 Heads-up: New dependency on Guile-Gcrypt Paul Garlick
2018-09-05 20:58 ` Ludovic Courtès
2018-09-06  9:24   ` Paul Garlick
2018-09-06 10:06   ` Ludovic Courtès
2018-09-06 11:58     ` Paul Garlick
2018-09-06 21:08       ` Ludovic Courtès
2018-09-10  9:34         ` Pjotr Prins
2018-09-10 11:15           ` Paul Garlick
2018-09-10 20:45             ` Ludovic Courtès
2018-09-11  9:54               ` Paul Garlick
2018-09-12 17:14                 ` Ludovic Courtès
2018-09-14 19:17                   ` Thorsten Wilms
2018-09-27  7:45                     ` Ricardo Wurmus
2018-09-27 11:36                       ` Thorsten Wilms
2018-09-06 21:14     ` Paul Garlick
  -- strict thread matches above, loose matches on Subject: below --
2018-09-02 16:35 Ludovic Courtès
2018-09-03 10:36 ` Christopher Lemmer Webber
2018-09-04 20:07   ` Alex Vong
2018-09-04 20:14     ` Leo Famulari
2018-09-04 21:33     ` Ludovic Courtès
2018-09-05 23:24       ` Alex Vong
2018-09-06  9:21         ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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).