unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* guix package: error: corrupt input while restoring archive from socket
@ 2017-07-20 12:39 Alex Vong
  2017-07-20 14:56 ` Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: Alex Vong @ 2017-07-20 12:39 UTC (permalink / raw)
  To: guix-devel

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

Hi guix,

I manage to break something after re-building guix using /var as
localstatedir. The whole story is available below, any help will be
appreciated!

I used to build guix from release tarball, install it to /usr/local/ and
run 'guix pull && guix package -u' to upgrade.

One day, 'guix pull' became too slow for me and I decided to switch to
'git pull'. So instead of running 'guix pull && guix package -u',
I chdir into the git repo and run
'git pull && make -j`nproc` && ./pre-inst-env guix package -u'.

After that change, I have 2 "instances" of guix. The 1st instance comes
from the release tarball, installed into /usr/local/. The 2nd instance
comes from the git repo, which is not installed anywhere. To summarize,
guix-demon is from the 1st instance and package definitions are from the
2nd instance.

Clearly, this approach is too complicated. Today, I try to simplify
things by removing the 1st instance of guix. I run 'make uninstall' to
remove the 1st instance of guix. Then, I run
'make distclean && clean -fdx && git reset --hard' to clean git repo
and run
'./bootstrap && ./configure --localstatedir=/var && make -j`nproc`'
to re-build.

After that, I move all guix-related files in /usr/local/var to /var and
adjust the .guix-profile symlink to point to the /var/... directory.

So far so good. The only problem left is how should I start
guix-daemon. Well, I first chdir into the git repo, run 'su -m' to gain
root privilege while preserving environment and finally starting the
daemon with './pre-inst-env guix-daemon ...'.

I feel like I am almost there. So with excitement, I chdir into the git
repo and run './pre-inst-env guix package -u'. To my disappointment, the
command fails with the following message:


alexvong1995@debian:~/scm/guix$ ./pre-inst-env guix package -u
substitute: Backtrace:
substitute:            1 (primitive-load "/home/alexvong1995/scm/guix/scripts/gu…")
substitute: In guix/ui.scm:
substitute:   1352:12  0 (run-guix-command _ . _)
substitute: 
substitute: guix/ui.scm:1352:12: In procedure run-guix-command:
substitute: guix/ui.scm:1352:12: Wrong type to apply: #<unknown-type (0x24f . 0x7f92ef1ebe08) @ 0x7f92ef7a1318>
guix package: error: corrupt input while restoring archive from socket


Does anybody know why?

Cheers,
Alex

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

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

* Re: guix package: error: corrupt input while restoring archive from socket
  2017-07-20 12:39 guix package: error: corrupt input while restoring archive from socket Alex Vong
@ 2017-07-20 14:56 ` Ludovic Courtès
  2017-07-20 15:54   ` Alex Vong
  0 siblings, 1 reply; 4+ messages in thread
From: Ludovic Courtès @ 2017-07-20 14:56 UTC (permalink / raw)
  To: Alex Vong; +Cc: guix-devel

Hello,

Alex Vong <alexvong1995@gmail.com> skribis:

> alexvong1995@debian:~/scm/guix$ ./pre-inst-env guix package -u
> substitute: Backtrace:
> substitute:            1 (primitive-load "/home/alexvong1995/scm/guix/scripts/gu…")
> substitute: In guix/ui.scm:
> substitute:   1352:12  0 (run-guix-command _ . _)
> substitute: 
> substitute: guix/ui.scm:1352:12: In procedure run-guix-command:
> substitute: guix/ui.scm:1352:12: Wrong type to apply: #<unknown-type (0x24f . 0x7f92ef1ebe08) @ 0x7f92ef7a1318>

This message is likely because Guix on the daemon side ends up loading
Guile-SSH-for-Guile-2.0 whereas it is running Guile 2.2.

Could you check if that is the case?

HTH!

Ludo’.

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

* Re: guix package: error: corrupt input while restoring archive from socket
  2017-07-20 14:56 ` Ludovic Courtès
@ 2017-07-20 15:54   ` Alex Vong
  2017-07-24  8:58     ` Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: Alex Vong @ 2017-07-20 15:54 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

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

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

> Hello,
>
> Alex Vong <alexvong1995@gmail.com> skribis:
>
>> alexvong1995@debian:~/scm/guix$ ./pre-inst-env guix package -u
>> substitute: Backtrace:
>> substitute: 1 (primitive-load
>> "/home/alexvong1995/scm/guix/scripts/gu…")
>> substitute: In guix/ui.scm:
>> substitute:   1352:12  0 (run-guix-command _ . _)
>> substitute: 
>> substitute: guix/ui.scm:1352:12: In procedure run-guix-command:
>> substitute: guix/ui.scm:1352:12: Wrong type to apply: #<unknown-type
>> (0x24f . 0x7f92ef1ebe08) @ 0x7f92ef7a1318>
>
> This message is likely because Guix on the daemon side ends up loading
> Guile-SSH-for-Guile-2.0 whereas it is running Guile 2.2.
>
> Could you check if that is the case?
>
Hmm, I don't remember installing guile-2.0-ssh. I don't think that's the
cause. But something similar might happen as I find out that I put
"$HOME/.guix-profile/share/guile/site/2.0/" into my
GUILE_LOAD_PATH. After removing it, I get a different error message:


alexvong1995@debian:~/scm/guix$ ./pre-inst-env guix package -u
substitute: ;;; Failed to autoload make-session in (gnutls):
substitute: ;;; ERROR: missing interface for module (gnutls)
substitute: Backtrace:
substitute:            1 (primitive-load "/home/alexvong1995/scm/guix/scripts/gu…")
substitute: In guix/ui.scm:
substitute:   1352:12  0 (run-guix-command _ . _)
substitute: 
substitute: guix/ui.scm:1352:12: In procedure run-guix-command:
substitute: guix/ui.scm:1352:12: In procedure module-lookup: Unbound variable: make-session
guix package: error: corrupt input while restoring archive from socket


Then I put back
"/gnu/store/m3yq3yknck7ibnav0503jjhr6rv6j1pa-gnutls-3.5.D/share/guile/site/2.0/"
into my GUILE_LOAD_PATH and I get back the old error message:


alexvong1995@debian:~/scm/guix$ ./pre-inst-env guix package -u
substitute: Backtrace:
substitute:            1 (primitive-load "/home/alexvong1995/scm/guix/scripts/gu…")
substitute: In guix/ui.scm:
substitute:   1352:12  0 (run-guix-command _ . _)
substitute: 
substitute: guix/ui.scm:1352:12: In procedure run-guix-command:
substitute: guix/ui.scm:1352:12: Wrong type to apply: #<unknown-type (0x24f . 0x7f4912175e08) @ 0x7f491272b318>
guix package: error: corrupt input while restoring archive from socket


However, if I run "guile -c '(use-modules (gnutls))'", then it will
succeed without any error. What's going on?


Thanks!


> HTH!
>
> Ludo’.

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

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

* Re: guix package: error: corrupt input while restoring archive from socket
  2017-07-20 15:54   ` Alex Vong
@ 2017-07-24  8:58     ` Ludovic Courtès
  0 siblings, 0 replies; 4+ messages in thread
From: Ludovic Courtès @ 2017-07-24  8:58 UTC (permalink / raw)
  To: Alex Vong; +Cc: guix-devel

Alex Vong <alexvong1995@gmail.com> skribis:

> ludo@gnu.org (Ludovic Courtès) writes:
>
>> Hello,
>>
>> Alex Vong <alexvong1995@gmail.com> skribis:
>>
>>> alexvong1995@debian:~/scm/guix$ ./pre-inst-env guix package -u
>>> substitute: Backtrace:
>>> substitute: 1 (primitive-load
>>> "/home/alexvong1995/scm/guix/scripts/gu…")
>>> substitute: In guix/ui.scm:
>>> substitute:   1352:12  0 (run-guix-command _ . _)
>>> substitute: 
>>> substitute: guix/ui.scm:1352:12: In procedure run-guix-command:
>>> substitute: guix/ui.scm:1352:12: Wrong type to apply: #<unknown-type
>>> (0x24f . 0x7f92ef1ebe08) @ 0x7f92ef7a1318>
>>
>> This message is likely because Guix on the daemon side ends up loading
>> Guile-SSH-for-Guile-2.0 whereas it is running Guile 2.2.
>>
>> Could you check if that is the case?
>>
> Hmm, I don't remember installing guile-2.0-ssh. I don't think that's the
> cause. But something similar might happen as I find out that I put
> "$HOME/.guix-profile/share/guile/site/2.0/" into my
> GUILE_LOAD_PATH. After removing it, I get a different error message:
>
>
> alexvong1995@debian:~/scm/guix$ ./pre-inst-env guix package -u
> substitute: ;;; Failed to autoload make-session in (gnutls):
> substitute: ;;; ERROR: missing interface for module (gnutls)
> substitute: Backtrace:
> substitute:            1 (primitive-load "/home/alexvong1995/scm/guix/scripts/gu…")
> substitute: In guix/ui.scm:
> substitute:   1352:12  0 (run-guix-command _ . _)
> substitute: 
> substitute: guix/ui.scm:1352:12: In procedure run-guix-command:
> substitute: guix/ui.scm:1352:12: In procedure module-lookup: Unbound variable: make-session
> guix package: error: corrupt input while restoring archive from socket
>
>
> Then I put back
> "/gnu/store/m3yq3yknck7ibnav0503jjhr6rv6j1pa-gnutls-3.5.D/share/guile/site/2.0/"
> into my GUILE_LOAD_PATH and I get back the old error message:
>
>
> alexvong1995@debian:~/scm/guix$ ./pre-inst-env guix package -u
> substitute: Backtrace:
> substitute:            1 (primitive-load "/home/alexvong1995/scm/guix/scripts/gu…")
> substitute: In guix/ui.scm:
> substitute:   1352:12  0 (run-guix-command _ . _)
> substitute: 
> substitute: guix/ui.scm:1352:12: In procedure run-guix-command:
> substitute: guix/ui.scm:1352:12: Wrong type to apply: #<unknown-type (0x24f . 0x7f4912175e08) @ 0x7f491272b318>
> guix package: error: corrupt input while restoring archive from socket
>
>
> However, if I run "guile -c '(use-modules (gnutls))'", then it will
> succeed without any error. What's going on?

Since you’re using Guile 2.2, you also need to install “guile2.2-gnutls”
instead of “gnutls”.  For Guile-SSH, you need “guile-ssh”.

If everything is correct, you should see
~/.guix-profile/share/guile/site/2.2/{gnutls,ssh/auth}.scm and
~/.guix-profile/lib/guile/2.2/site-ccache/{gnutls,ssh/auth}.go.

HTH!

Ludo’.

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

end of thread, other threads:[~2017-07-24  8:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-20 12:39 guix package: error: corrupt input while restoring archive from socket Alex Vong
2017-07-20 14:56 ` Ludovic Courtès
2017-07-20 15:54   ` Alex Vong
2017-07-24  8:58     ` 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).