unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* How to properly use channels? (my 'guix pull' throws error)
@ 2018-09-27  2:31 Hebi Li
  2018-10-02 10:07 ` Ludovic Courtès
  0 siblings, 1 reply; 8+ messages in thread
From: Hebi Li @ 2018-09-27  2:31 UTC (permalink / raw)
  To: help-guix


Hi guys,

I was trying to use Marius's channel [1] for Chromium. However,
following Marius's instruction, when my ~/.config/guix/channels.scm is
in place, 'guix pull' throws me this error:


--8<---------------cut here---------------start------------->8---
guix pull: error: failed to load '/home/hebi/.config/guix/channels.scm':
system/base/compile.scm:144:21: In procedure compile-file:
failed to create path for auto-compiled file
"/home/hebi/.config/guix/channels.scm"
--8<---------------cut here---------------end--------------->8---

My guix version is > 0.15:

--8<---------------cut here---------------start------------->8---
guix (GNU Guix) 0.15.0-3.3d43017
Copyright (C) 2018 the Guix authors
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
--8<---------------cut here---------------end--------------->8---

The channel feature should be available, as I have the file
~/.guix-profile/share/guile/site/2.2/guix/channels.scm. Is there
anything I did wrong when using channels?

[1] https://gitlab.com/mbakke/guix-chromium

-- 
Hebi

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

* Re: How to properly use channels? (my 'guix pull' throws error)
  2018-09-27  2:31 How to properly use channels? (my 'guix pull' throws error) Hebi Li
@ 2018-10-02 10:07 ` Ludovic Courtès
  2018-10-02 18:10   ` Hebi Li
  0 siblings, 1 reply; 8+ messages in thread
From: Ludovic Courtès @ 2018-10-02 10:07 UTC (permalink / raw)
  To: Hebi Li; +Cc: help-guix

Hello,

Hebi Li <lihebi.com@gmail.com> skribis:

> Hi guys,

s/guys/people/ :-)

> I was trying to use Marius's channel [1] for Chromium. However,
> following Marius's instruction, when my ~/.config/guix/channels.scm is
> in place, 'guix pull' throws me this error:
>
> guix pull: error: failed to load '/home/hebi/.config/guix/channels.scm':
> system/base/compile.scm:144:21: In procedure compile-file:
> failed to create path for auto-compiled file
> "/home/hebi/.config/guix/channels.scm"

Could it be that ~/.cache/guile/… is read-only or owned by a different
user?

As a test you could try to “rm -rf ~/.cache/guile”.  This is the place
where Guile stores object files resulting from auto-compilation.

HTH,
Ludo’.

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

* Re: How to properly use channels? (my 'guix pull' throws error)
  2018-10-02 10:07 ` Ludovic Courtès
@ 2018-10-02 18:10   ` Hebi Li
  2018-10-02 18:22     ` Ricardo Wurmus
  0 siblings, 1 reply; 8+ messages in thread
From: Hebi Li @ 2018-10-02 18:10 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: help-guix


Thanks, Ludovic.

On Tue, Oct 02 2018, Ludovic Courtès wrote:

> Hello,
>
> Hebi Li <lihebi.com@gmail.com> skribis:
>
>> Hi guys,
>
> s/guys/people/ :-)

Oh, cool :)

>> I was trying to use Marius's channel [1] for Chromium. However,
>> following Marius's instruction, when my ~/.config/guix/channels.scm is
>> in place, 'guix pull' throws me this error:
>>
>> guix pull: error: failed to load '/home/hebi/.config/guix/channels.scm':
>> system/base/compile.scm:144:21: In procedure compile-file:
>> failed to create path for auto-compiled file
>> "/home/hebi/.config/guix/channels.scm"
>
> Could it be that ~/.cache/guile/… is read-only or owned by a different
> user?
>
> As a test you could try to “rm -rf ~/.cache/guile”.  This is the place
> where Guile stores object files resulting from auto-compilation.

That is the problem, "~/.cache/guile" is owned by root. I don't know
why, but I think it is not supposed to be root, so maybe we need to fix
it somewhere or mention it in trouble shooting. Anyway removing it
solved the problem and guix pull is able to continue.

Then I encountered another problem. In channels.scm, I was using (branch
"master"), and got this error:

--8<---------------cut here---------------start------------->8---
Updating channel 'guix-chromium' from Git repository at
'https://gitlab.com/mbakke/guix-chromium.git'...
guix pull: error: Git error: cannot locate remote-tracking branch 'master'
--8<---------------cut here---------------end--------------->8---

Changing it to '(branch "origin/master")' solved the problem. I mention
this because I have seen '(branch "master")' in a couple of places, thus
was wondering whether it is supposed to be the correct way.

Next, guix pull is finally able to compile chromium.scm, but
unfortunately failed to finish. This might not be a problem of guix
itself. However the error was "no code for module (gcrypt hash)", so I
think it is related. I have installed both libgcrypt and
guile-gcrypt. The following is the full error message:

--8<---------------cut here---------------start------------->8---
[ 1/ 1] Compiling './chromium/chromium.scm'...
Backtrace:
In ice-9/boot-9.scm:
  2788:17 19 (resolve-interface (guix store) #:select _ #:hide _ # _ ?)
  2714:10 18 (_ (guix store) _ _ #:ensure _)
  2982:16 17 (try-module-autoload _ _)
   2312:4 16 (save-module-excursion #<procedure 982c60 at ice-9/boot?>)
  3002:22 15 (_)
In unknown file:
          14 (primitive-load-path "guix/store" #<procedure 735c20 at?>)
In guix/store.scm:
     20:0 13 (_)
In ice-9/boot-9.scm:
   2862:4 12 (define-module* _ #:filename _ #:pure _ #:version _ # _ ?)
  2875:24 11 (_)
   222:29 10 (map1 (((guix utils)) ((guix config)) ((guix #)) ((?)) ?))
   222:29  9 (map1 (((guix config)) ((guix memoization)) ((guix ?)) ?))
   222:29  8 (map1 (((guix memoization)) ((guix serialization)) (#) ?))
   222:29  7 (map1 (((guix serialization)) ((guix monads)) ((# #)) ?))
   222:29  6 (map1 (((guix monads)) ((guix base16)) ((guix #)) (#) ?))
   222:29  5 (map1 (((guix base16)) ((guix base32)) ((gcrypt #)) # ?))
   222:29  4 (map1 (((guix base32)) ((gcrypt hash)) ((guix #)) (#) ?))
   222:17  3 (map1 (((gcrypt hash)) ((guix profiling)) ((rnrs #)) # ?))
   2791:6  2 (resolve-interface _ #:select _ #:hide _ #:prefix _ # _ ?)
In unknown file:
           1 (scm-error misc-error #f "~A ~S" ("no code for modu?" ?) ?)
In ice-9/boot-9.scm:
   752:25  0 (dispatch-exception _ _ _)

ice-9/boot-9.scm:752:25: In procedure dispatch-exception:
no code for module (gcrypt hash)
builder for `/gnu/store/60blzvp2by5j8mkp2xyml42al703cdza-guix-chromium.drv' failed with exit code 1                                                                      
cannot build derivation `/gnu/store/vjf98q40yrpgqfp4wjpgk2brjhzlcyn2-guix-chromium.drv': 1 dependencies couldn't be built                                                
cannot build derivation `/gnu/store/cwnlydihlzn0z42lk00w9wa60vrsa6b3-profile.drv': 1 dependencies couldn't be built                                                      
guix pull: error: build failed: build of `/gnu/store/cwnlydihlzn0z42lk00w9wa60vrsa6b3-profile.drv' failed                                                                
hebi@antelope ~$ guix pull
Updating channel 'guix-chromium' from Git repository at 'https://gitlab.com/mbakke/guix-chromium.git'...                                                                 
guix pull: error: Git error: cannot locate remote-tracking branch 'master'
--8<---------------cut here---------------end--------------->8---




-- 
Hebi

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

* Re: How to properly use channels? (my 'guix pull' throws error)
  2018-10-02 18:10   ` Hebi Li
@ 2018-10-02 18:22     ` Ricardo Wurmus
  2018-10-02 19:16       ` Hebi Li
  0 siblings, 1 reply; 8+ messages in thread
From: Ricardo Wurmus @ 2018-10-02 18:22 UTC (permalink / raw)
  To: Hebi Li; +Cc: help-guix


Hebi Li <lihebi.com@gmail.com> writes:

> Next, guix pull is finally able to compile chromium.scm, but
> unfortunately failed to finish. This might not be a problem of guix
> itself. However the error was "no code for module (gcrypt hash)", so I
> think it is related. I have installed both libgcrypt and
> guile-gcrypt. The following is the full error message: […]

AFAIK this defect has been fixed a couple of days ago.  Unfortunately,
you need to upgrade Guix with “guix pull” but without channels.  Once
upgraded you can use channels again.

--
Ricardo

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

* Re: How to properly use channels? (my 'guix pull' throws error)
  2018-10-02 18:22     ` Ricardo Wurmus
@ 2018-10-02 19:16       ` Hebi Li
  2018-10-02 19:42         ` Ricardo Wurmus
  0 siblings, 1 reply; 8+ messages in thread
From: Hebi Li @ 2018-10-02 19:16 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: help-guix

Hi Ricardo,

On Tue, Oct 02 2018, Ricardo Wurmus wrote:

> AFAIK this defect has been fixed a couple of days ago.  Unfortunately,
> you need to upgrade Guix with “guix pull” but without channels.  Once
> upgraded you can use channels again.
>

I actually ran "guix pull" right before I tried Ludovic's suggestion
earlier today. Anyway I pulled again, and did a full system upgrade
(guix package -u) and also reconfigure (sudo -E guix system reconfigure
config.scm), and even a reboot.  The "guix pull" command is still
complaining "no code for module (gcrypt hash)".

However, it succeeded when I tried the latest guix source [1], and ran
with ./pre-inst-env [2]. This time, "./pre-inst-env guix pull" did
finish compiling the package successfully:

        New in this revision:
          2 new packages: chromium, gn

But, I have no idea how to build and install the newly retrieved
chromium package. Seems that both "guix" and "./pre-inst-env guix" do
not see the new package (i.e. "(./pre-inst-env) guix install chromium"
complains no chromium package, no chromium is listed by
"(./pre-inst-env) guix package --list-avaiable").

Thus, I'm confused of what is the effect of the command "./pre-inst-env
guix pull". The document [2] is saying:

        Note that ./pre-inst-env guix pull does not upgrade the local source
        tree; it simply updates the ~/.config/guix/current symlink (see Invoking
        guix pull). Run git pull instead if you want to upgrade your local
        source tree.

I thought ~/.config/guix/current symlink *is* the local source tree, and
this document says both "./pre-inst-env guix pull" and "guix pull"
upgrade it.


[1] https://www.gnu.org/software/guix/manual/en/html_node/Building-from-Git.html
[2] https://www.gnu.org/software/guix/manual/en/html_node/Running-Guix-Before-It-Is-Installed.html


-- 
Hebi

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

* Re: How to properly use channels? (my 'guix pull' throws error)
  2018-10-02 19:16       ` Hebi Li
@ 2018-10-02 19:42         ` Ricardo Wurmus
  2018-10-02 20:11           ` Hebi Li
  0 siblings, 1 reply; 8+ messages in thread
From: Ricardo Wurmus @ 2018-10-02 19:42 UTC (permalink / raw)
  To: Hebi Li; +Cc: help-guix

Hi,

> On Tue, Oct 02 2018, Ricardo Wurmus wrote:
>
>> AFAIK this defect has been fixed a couple of days ago.  Unfortunately,
>> you need to upgrade Guix with “guix pull” but without channels.  Once
>> upgraded you can use channels again.
>>
>
> I actually ran "guix pull" right before I tried Ludovic's suggestion
> earlier today. Anyway I pulled again, and did a full system upgrade
> (guix package -u) and also reconfigure (sudo -E guix system reconfigure
> config.scm), and even a reboot.  The "guix pull" command is still
> complaining "no code for module (gcrypt hash)".

Could you please tell us which “guix” you are using?  “guix pull”
installs a new Guix to ~/.config/guix/current/bin.  Are you using Guix
from that directory?

> I thought ~/.config/guix/current symlink *is* the local source tree, and
> this document says both "./pre-inst-env guix pull" and "guix pull"
> upgrade it.

~/.config/guix is merely where “guix pull” installs new versions of
Guix.  The source tree is wherever you run Guix via “pre-inst-env”.

--
Ricardo

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

* Re: How to properly use channels? (my 'guix pull' throws error)
  2018-10-02 19:42         ` Ricardo Wurmus
@ 2018-10-02 20:11           ` Hebi Li
  2018-10-02 20:19             ` Ricardo Wurmus
  0 siblings, 1 reply; 8+ messages in thread
From: Hebi Li @ 2018-10-02 20:11 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: help-guix

On Tue, Oct 02 2018, Ricardo Wurmus wrote:

>> On Tue, Oct 02 2018, Ricardo Wurmus wrote:
>>
>>> AFAIK this defect has been fixed a couple of days ago.  Unfortunately,
>>> you need to upgrade Guix with “guix pull” but without channels.  Once
>>> upgraded you can use channels again.
>>>
>>
>> I actually ran "guix pull" right before I tried Ludovic's suggestion
>> earlier today. Anyway I pulled again, and did a full system upgrade
>> (guix package -u) and also reconfigure (sudo -E guix system reconfigure
>> config.scm), and even a reboot.  The "guix pull" command is still
>> complaining "no code for module (gcrypt hash)".
>
> Could you please tell us which “guix” you are using?  “guix pull”
> installs a new Guix to ~/.config/guix/current/bin.  Are you using Guix
> from that directory?

Now I see the problem. I'm using ~/.guix-profile/bin/guix. Using
~/.config/guix/current/bin/guix, I'm able to build the chromium
package.

So does this mean that, I should put this path
(~/.config/guix/current/bin) before (~/.guix-profile/bin) in $PATH?
Otherwise it will appear that "guix pull" does not upgrade "guix".

What is the purpose of ~/.guix-profile/bin/guix then? Since it is
symbolic linked to /gnu/store/xxx-guix, it is only updated after "guix
package -u"?


>> I thought ~/.config/guix/current symlink *is* the local source tree, and
>> this document says both "./pre-inst-env guix pull" and "guix pull"
>> upgrade it.
>
> ~/.config/guix is merely where “guix pull” installs new versions of
> Guix.  The source tree is wherever you run Guix via “pre-inst-env”.
>

I see. Thanks!


-- 
Hebi

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

* Re: How to properly use channels? (my 'guix pull' throws error)
  2018-10-02 20:11           ` Hebi Li
@ 2018-10-02 20:19             ` Ricardo Wurmus
  0 siblings, 0 replies; 8+ messages in thread
From: Ricardo Wurmus @ 2018-10-02 20:19 UTC (permalink / raw)
  To: Hebi Li; +Cc: help-guix

Hi,

>> Could you please tell us which “guix” you are using?  “guix pull”
>> installs a new Guix to ~/.config/guix/current/bin.  Are you using Guix
>> from that directory?
>
> Now I see the problem. I'm using ~/.guix-profile/bin/guix. Using
> ~/.config/guix/current/bin/guix, I'm able to build the chromium
> package.
>
> So does this mean that, I should put this path
> (~/.config/guix/current/bin) before (~/.guix-profile/bin) in $PATH?
> Otherwise it will appear that "guix pull" does not upgrade "guix".

Yes, this is correct.  “guix pull” does print a message suggesting this
(at least the first time), but it is easily overlooked.

> What is the purpose of ~/.guix-profile/bin/guix then? Since it is
> symbolic linked to /gnu/store/xxx-guix, it is only updated after "guix
> package -u"?

This is how the binary installation method works; it provides a
pre-populated profile containing a fully working Guix.  This was a good
idea at a time when “guix pull” would only install some Guile modules
that the system-wide “guix” command would find and load, but it can be a
bit confusing now that the “guix pull” has changed.

Maybe the binary install method needs changing.  A discussion about this
has been started elsewhere on guix-devel, but it hasn’t been concluded
yet.

--
Ricardo

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

end of thread, other threads:[~2018-10-02 20:27 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-27  2:31 How to properly use channels? (my 'guix pull' throws error) Hebi Li
2018-10-02 10:07 ` Ludovic Courtès
2018-10-02 18:10   ` Hebi Li
2018-10-02 18:22     ` Ricardo Wurmus
2018-10-02 19:16       ` Hebi Li
2018-10-02 19:42         ` Ricardo Wurmus
2018-10-02 20:11           ` Hebi Li
2018-10-02 20:19             ` Ricardo Wurmus

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