unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* Running shepherd as user: incompatible bytecode version
@ 2021-04-15 15:39 elaexuotee
  2021-04-15 22:19 ` Léo Le Bouter
  0 siblings, 1 reply; 3+ messages in thread
From: elaexuotee @ 2021-04-15 15:39 UTC (permalink / raw)
  To: help-guix

Hey Guix,

Reading https://guix.gnu.org/en/blog/2020/gnu-shepherd-user-services/, I was
inspired to start trying this out on my own.  However, I immediately ran into
this huge mess:

    $ shepherd
    ...
    ;;; WARNING: loading compiled file /run/current-system/profile/lib/guile/3.0/site-ccache/gnu/packages/xnee.go failed:
    ;;; In procedure load-thunk-from-memory: incompatible bytecode version
    ;;; WARNING: loading compiled file /run/current-system/profile/lib/guile/3.0/site-ccache/gnu/packages/zwave.go failed:
    ;;; In procedure load-thunk-from-memory: incompatible bytecode version
    ;;; WARNING: loading compiled file /run/current-system/profile/lib/guile/3.0/site-ccache/gnu/packages/zwave.go failed:
    ;;; In procedure load-thunk-from-memory: incompatible bytecode version

After about 20 seconds shepherd finally starts; however, the same thing happens
again when trying to start services:

    $ herd start fccache
    ... <same stderr as above>

Am I simply doing something incorrect? The /run/current-system/profile paths
seem mildly suspect, since the guile there is 3.0.5 but shepherd is running
3.0.2, apparently:

    $ command -v guile
    /run/current-system/profile/bin/guile

    $ guile --version
    guile (GNU Guile) 3.0.5

    $ command -v shepherd
    /run/current-system/profile/bin/shepherd

    $ command -v shepherd | xargs guix gc -R | grep guile
    /gnu/store/18hp7flyb3yid3yp49i6qcdq0sbi5l1n-guile-3.0.2

Just for good measure:

    $ guix describe
    Generation 48	Apr 15 2021 23:54:15	(current)
      guix a5bbd38
        repository URL: https://git.savannah.gnu.org/git/guix.git
        branch: master
        commit: a5bbd38fd131282e928144e869dcdf1e09259085


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

* Re: Running shepherd as user: incompatible bytecode version
  2021-04-15 15:39 Running shepherd as user: incompatible bytecode version elaexuotee
@ 2021-04-15 22:19 ` Léo Le Bouter
  2021-04-18 16:49   ` elaexuotee
  0 siblings, 1 reply; 3+ messages in thread
From: Léo Le Bouter @ 2021-04-15 22:19 UTC (permalink / raw)
  To: elaexuotee, help-guix

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

On Fri, 2021-04-16 at 00:39 +0900, elaexuotee@wilsonb.com wrote:
> Hey Guix,
> 
> Reading https://guix.gnu.org/en/blog/2020/gnu-shepherd-user-services/
> , I was
> inspired to start trying this out on my own.  However, I immediately
> ran into
> this huge mess:
> 
>     $ shepherd
>     ...
>     ;;; WARNING: loading compiled file /run/current-
> system/profile/lib/guile/3.0/site-ccache/gnu/packages/xnee.go failed:
>     ;;; In procedure load-thunk-from-memory: incompatible bytecode
> version
>     ;;; WARNING: loading compiled file /run/current-
> system/profile/lib/guile/3.0/site-ccache/gnu/packages/zwave.go
> failed:
>     ;;; In procedure load-thunk-from-memory: incompatible bytecode
> version
>     ;;; WARNING: loading compiled file /run/current-
> system/profile/lib/guile/3.0/site-ccache/gnu/packages/zwave.go
> failed:
>     ;;; In procedure load-thunk-from-memory: incompatible bytecode
> version
> 
> After about 20 seconds shepherd finally starts

[...]

I get the same issue, the shepherd package uses GNU Guile 3.0.2 and GNU
Guix provides GNU Guile 3.0.5 under the 'guile' package specification
name.

I am not sure this is the cause, since shepherd is wrapped to use GNU
Guile 3.0.2.

I am also still looking for a solution.

Léo

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: Running shepherd as user: incompatible bytecode version
  2021-04-15 22:19 ` Léo Le Bouter
@ 2021-04-18 16:49   ` elaexuotee
  0 siblings, 0 replies; 3+ messages in thread
From: elaexuotee @ 2021-04-18 16:49 UTC (permalink / raw)
  To: Léo Le Bouter; +Cc: help-guix

Léo Le Bouter <lle-bout@zaclys.net> wrote:
> I get the same issue, the shepherd package uses GNU Guile 3.0.2 and GNU
> Guix provides GNU Guile 3.0.5 under the 'guile' package specification
> name.
> 
> I am not sure this is the cause, since shepherd is wrapped to use GNU
> Guile 3.0.2.
> 
> I am also still looking for a solution.
> 
> Léo

Thanks for the quick sanity check.

I spent a little time looking into this. The problem seems to be that Shepherd
is executed from Guile 3.0.2 while its %load-compiled-path contains compiled
modules for 3.0.5.

This ultimately stems from the fact that the `guix' package has
`guile-3.0-latest' on its inputs while while `shepherd' has just `guile-3.0'.

Ideally, we'd just update Shepherd to use the same Guile as guix, but
unfortunately, Shepherd (currently, 0.8.1) fails several of its tests if you
naively try replacing the input. I have also been hitting unrelated build
obstacles trying to test building against master.

Anyway, if we must stick with Guile 3.0.2, then maybe it makes sense to include
something like a guile-module-union (from guix/self.scm) and shove this into
the %load-path and $load-compiled-path of the /bin/shepherd script. I haven't
looked too deeply into doing this yet.

Finally, as a quick workaround, you can call shepherd with an empty
%load-compiled-path to supress the warnings:

    $ GUILE_LOAD_COMPILED_PATH= shepherd

All the modules will still need to be run through the interpreter, though, so
startup time remains horrendously slow when using that fccache example.


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

end of thread, other threads:[~2021-04-18 17:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-15 15:39 Running shepherd as user: incompatible bytecode version elaexuotee
2021-04-15 22:19 ` Léo Le Bouter
2021-04-18 16:49   ` elaexuotee

unofficial mirror of help-guix@gnu.org 

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/guix-user/0 guix-user/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 guix-user guix-user/ https://yhetil.org/guix-user \
		help-guix@gnu.org
	public-inbox-index guix-user

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.gnu.guix.user
	nntp://news.gmane.io/gmane.comp.gnu.guix.user


AGPL code for this site: git clone http://ou63pmih66umazou.onion/public-inbox.git