GNU bug report logs - #21127
Problem with guix.el on hybrid systems.

Previous Next

Package: guix;

Reported by: Mathieu Lirzin <mthl <at> openmailbox.org>

Date: Fri, 24 Jul 2015 12:28:01 UTC

Severity: normal

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

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 21127 in the body.
You can then email your comments to 21127 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#21127; Package guix. (Fri, 24 Jul 2015 12:28:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Mathieu Lirzin <mthl <at> openmailbox.org>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Fri, 24 Jul 2015 12:28:02 GMT) Full text and rfc822 format available.

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

From: Mathieu Lirzin <mthl <at> openmailbox.org>
To: bug-guix <at> gnu.org
Subject: Problem with guix.el on hybrid systems.
Date: Fri, 24 Jul 2015 14:25:13 +0200
[Message part 1 (text/plain, inline)]
Hello Guix,

A long time ago I've noticed some problems with guix.el when installing
Guile from Guix.  My setup Guix 0.8.3 built from the tarball and
installed ontop of Debian 8 in the /usr/local prefix (nothing fancy :)).
At this state everything works fine, guix.el included!

First for Guix to be useful I change my paths to choose
"$HOME/.guix-profile/...", then I install Guile in my profile, and
eventually when I launch the emacs interface, Guix yells at me.

--8<---------------cut here---------------start------------->8---
Backtrace:
In guix/derivations.scm:
  19: 19 [#<procedure 13edac0 ()>]
In ice-9/boot-9.scm:
2951: 18 [define-module* (guix derivations) #:filename ...]
2926: 17 [resolve-imports (((srfi srfi-1)) ((srfi srfi-9)) ((srfi srfi-9 gnu)) ...)]
2864: 16 [resolve-interface (guix hash) #:select ...]
2789: 15 [#<procedure e19880 at ice-9/boot-9.scm:2777:4 (name #:optional autoload version #:key ensure)> # ...]
3065: 14 [try-module-autoload (guix hash) #f]
2401: 13 [save-module-excursion #<procedure 177b270 at ice-9/boot-9.scm:3066:17 ()>]
3085: 12 [#<procedure 177b270 at ice-9/boot-9.scm:3066:17 ()>]
In unknown file:
   ?: 11 [primitive-load-path "guix/hash" ...]
In guix/hash.scm:
  19: 10 [#<procedure 177f2e0 ()>]
In ice-9/boot-9.scm:
2951: 9 [define-module* (guix hash) #:filename ...]
2926: 8 [resolve-imports ((#) (#) (#) (#) ...)]
2864: 7 [resolve-interface (guix gcrypt) #:select ...]
2789: 6 [#<procedure e19880 at ice-9/boot-9.scm:2777:4 (name #:optional autoload version #:key ensure)> # ...]
3065: 5 [try-module-autoload (guix gcrypt) #f]
2401: 4 [save-module-excursion #<procedure 177b000 at ice-9/boot-9.scm:3066:17 ()>]
3085: 3 [#<procedure 177b000 at ice-9/boot-9.scm:3066:17 ()>]
In unknown file:
   ?: 2 [primitive-load-path "guix/gcrypt" ...]
In guix/gcrypt.scm:
  33: 1 [#<procedure 1784720 ()>]
In unknown file:
   ?: 0 [dynamic-link "libgcrypt"]

ERROR: In procedure dynamic-link:
ERROR: In procedure dynamic-link: file: "libgcrypt", message: "file not found"
--8<---------------cut here---------------end--------------->8---

what is happening is that Guix uses Guile installed from Guix but is
unable to dynamically link with the Libgcrypt from debian or even with
the Libgcrypt installed from guix in my profile.

So my current fix is to add (setq guix-guile-program "/usr/bin/guile")
to my .emacs file, then everything works fine.  But what should we do to
avoid such thing?  AIUI we could document it in
(info "(guix)Application Setup") or (info "(guix)Emacs Initial Setup"),
or even better fix it directly in the code (if possible).

Here is my attempt to fix the code with my naïve elisp programming.  I
would be happy to get better suggestion!

[0001-emacs-Fix-guix-guile-program.patch (text/x-diff, attachment)]
[Message part 3 (text/plain, inline)]
--
Mathieu Lirzin

Information forwarded to bug-guix <at> gnu.org:
bug#21127; Package guix. (Fri, 24 Jul 2015 20:32:01 GMT) Full text and rfc822 format available.

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

From: ludo <at> gnu.org (Ludovic Courtès)
To: Mathieu Lirzin <mthl <at> openmailbox.org>
Cc: 21127 <at> debbugs.gnu.org, Alex Kost <alezost <at> gmail.com>
Subject: Re: bug#21127: Problem with guix.el on hybrid systems.
Date: Fri, 24 Jul 2015 22:31:19 +0200
Mathieu Lirzin <mthl <at> openmailbox.org> skribis:

> From ca4360cc33f56dbfd1fa1367f68d3bd3d0d7c553 Mon Sep 17 00:00:00 2001
> From: Mathieu Lirzin <mthl <at> openmailbox.org>
> Date: Fri, 24 Jul 2015 12:59:20 +0200
> Subject: [PATCH] emacs: Fix guix-guile-program.
>
> * emacs/guix-backend.el: Move to ...
> * emacs/guix-backend.el.in: ... here.
>   (guix-guile-program): Default to the Guile used when building Guix to
>   avoid breaking guix.el when installing another Guile.
> * configure.ac: Adapt to it.
> * .gitignore: Likewise.

[...]

> +(defvar guix-guile-program "@GUILE@"

Sounds reasonable to me.

Alternately, I wonder if it would make sense to define that variable in
guix-init.el to avoid having an additional .in file.

Alex, WDYT?

Thanks,
Ludo'.




Information forwarded to bug-guix <at> gnu.org:
bug#21127; Package guix. (Sat, 25 Jul 2015 07:53:02 GMT) Full text and rfc822 format available.

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

From: Alex Kost <alezost <at> gmail.com>
To: ludo <at> gnu.org (Ludovic Courtès)
Cc: 21127 <at> debbugs.gnu.org, Mathieu Lirzin <mthl <at> openmailbox.org>
Subject: Re: bug#21127: Problem with guix.el on hybrid systems.
Date: Sat, 25 Jul 2015 10:52:17 +0300
Ludovic Courtès (2015-07-24 23:31 +0300) wrote:

> Mathieu Lirzin <mthl <at> openmailbox.org> skribis:
>
>> From ca4360cc33f56dbfd1fa1367f68d3bd3d0d7c553 Mon Sep 17 00:00:00 2001
>> From: Mathieu Lirzin <mthl <at> openmailbox.org>
>> Date: Fri, 24 Jul 2015 12:59:20 +0200
>> Subject: [PATCH] emacs: Fix guix-guile-program.
>>
>> * emacs/guix-backend.el: Move to ...
>> * emacs/guix-backend.el.in: ... here.
>>   (guix-guile-program): Default to the Guile used when building Guix to
>>   avoid breaking guix.el when installing another Guile.
>> * configure.ac: Adapt to it.
>> * .gitignore: Likewise.
>
> [...]
>
>> +(defvar guix-guile-program "@GUILE@"
>
> Sounds reasonable to me.
>
> Alternately, I wonder if it would make sense to define that variable in
> guix-init.el to avoid having an additional .in file.
>
> Alex, WDYT?

Mathieu, thanks for catching it!  I also think that it is better to
avoid converting "guix-backend.el" into ".in" file.

I had the same question with 'guix-load-path' variable when Emacs UI was
merging into Guix: this var was defined in "guix-backend.el" but it had
to depend on @prefix@, so I just put another "(defvar …)" into
"guix-init.el.in".  As you can see there are 2 definitions of
'guix-load-path':

- in "guix-backend.el" (with an old "configure"-independent value)

- and in "guix-init.el" (with the current default value).

So I suggest to do the same with 'guix-guile-program', i.e. to put

  (defvar guix-guile-program "@GUILE" …)

into "guix-init.el.in" and that's it.  Since "guix-init.el" is loaded
the first, "defvar" in "guix-backend.el" will not override the default
value.

-- 
Alex




Reply sent to ludo <at> gnu.org (Ludovic Courtès):
You have taken responsibility. (Fri, 11 Sep 2015 17:27:02 GMT) Full text and rfc822 format available.

Notification sent to Mathieu Lirzin <mthl <at> openmailbox.org>:
bug acknowledged by developer. (Fri, 11 Sep 2015 17:27:02 GMT) Full text and rfc822 format available.

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

From: ludo <at> gnu.org (Ludovic Courtès)
To: Mathieu Lirzin <mthl <at> openmailbox.org>
Cc: 21127-done <at> debbugs.gnu.org
Subject: Re: bug#21127: Problem with guix.el on hybrid systems.
Date: Fri, 11 Sep 2015 19:26:49 +0200
Mathieu Lirzin <mthl <at> openmailbox.org> skribis:

F> So my current fix is to add (setq guix-guile-program "/usr/bin/guile")
> to my .emacs file, then everything works fine.  But what should we do to
> avoid such thing?  AIUI we could document it in
> (info "(guix)Application Setup") or (info "(guix)Emacs Initial Setup"),
> or even better fix it directly in the code (if possible).
>
> Here is my attempt to fix the code with my naïve elisp programming.  I
> would be happy to get better suggestion!

This bug was fixed in 7061938, so closing it.

Thanks,
Ludo’.




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

This bug report was last modified 8 years and 200 days ago.

Previous Next


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