help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: guix system docker-image : missing root file system and 'incompatibl


From: Bonface M. K.
Subject: Re: guix system docker-image : missing root file system and 'incompatible bytecode kind'
Date: Tue, 10 Nov 2020 04:42:24 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

Hi!

edk@beaver-labs.com writes:

> Dear Guix,
>
> At the request of a client, I am trying to create a docker image for a
> guix package I wrote.
>
> I pasted my operating-system declaration below. I try to run
> guix system docker-image denatting.scm
>

If you are creating a docker image for just a
package, why not just use `guix pack` on top of a
host image(like say alpine) or something similar?
I reckon it's more straightforward imho--- I've
had to do that before. Here are the docs:
https://github.com/genenetwork/genenetwork2/blob/testing/doc/docker-container.org.
 You
could just substitute the genenetwork2 package
with your package! ;)

HTH!

> If I remove the dummy root file system, I get the error:
>> /home/edouard/src/denatting/denatting.scm:36:0: error: missing root file 
>> system
>
> If I put a dummy root filesystem (I put '/dev/vda1' there arbitrarily,
> the field is mandatory and I have no idea what block device is available
> under docker, I was under the impression that virtualized operating
> system did not neeed a root file system), I can create an image and load
> it but when I invoke docker run I get the error message I also
> pasted below "In procedure load-thunk-from-memory: incompatible bytecode
> kind" and the service does not start.
>
> What I don't understand is that if I use `guix pack` I can get a docker
> image with my software installed. However I must then run
> docker run denatting:latest denat
> to run the server.
>
> My goal here is to create a shepherd service so that the client just has
> to run
> docker run denatting:latest
> without habing to specify a command, and with shepherd monitoring the
> server and restarting it when it crashes.
>
> Any help would be appreciated,
>
> Thanks in advance,
>
> Edouard.
>
> -------denatting.scm---8<-----
> (define-module (denatting)
>   #:use-module (gnu system)
>   #:use-module (gnu system file-systems)
>   #:use-module (gnu bootloader)
>   #:use-module (gnu bootloader grub)
>   #:use-module (gnu services)
>   #:use-module (gnu services base)
>   #:use-module (gnu services shepherd)
>   #:use-module (beaver packages scheme-xyz)
>   ;#:use-module (oop goops)
>   #:use-module (guix gexp)
>   ;#:use-module (guix records)
>   ;#:use-module (ice-9 match)
>   #:export (denatting-service))
>
> (define denatting-service
>   (lambda (_)
>     (list
>      (shepherd-service
>       (provision '(denatting))
>       (documentation "Denatting web server")
>       (respawn? #t)
>       (start #~((make-forkexec-constructor
>                  (list "denat")
>                  #:log-file "/var/log/denatting.log")))
>       (stop #~((make-kill-destructor)))))))
>
> (define denatting-service-type
>   (service-type
>    (name 'denatting)
>    (extensions
>     (list (service-extension shepherd-root-service-type denatting-service)))
>    (default-value #f)))
>
>
> (operating-system
>  (host-name "denatting")
>  (timezone "Europe/Paris")
>  (bootloader (bootloader-configuration
>               (bootloader grub-bootloader)))
>  (packages (append (list
>                     gerbil-denatting)
>                    %base-packages))
> ;; (file-systems %base-file-systems)
>   (file-systems (append (list
>                          (file-system
>                           (mount-point "/")
>                           (device "/dev/vda1")
>                           (type "ext4")))
>                         %base-file-systems))
>  (services (append (list
>                     (service denatting-service-type))
>                    %base-services)))
> ----------------Error message I get with the dummy file system---8<----
> ;;; WARNING: loading compiled file 
> /gnu/store/08da6i38fzn9g36gyq443k03f84nk8rk-module-import-compiled/guix/build/utils.go
>  failed:
> ;;; In procedure load-thunk-from-memory: incompatible bytecode kind
> ;;; WARNING: loading compiled file 
> /gnu/store/xfrwjx47iwv8pnn6ml22fj6jnm2jmdjm-module-import-compiled/gnu/build/activation.go
>  failed
> :
> ;;; In procedure load-thunk-from-memory: incompatible bytecode kind
> ;;; WARNING: loading compiled file 
> /gnu/store/xfrwjx47iwv8pnn6ml22fj6jnm2jmdjm-module-import-compiled/gnu/system/accounts.go
>  failed:
> ;;; In procedure load-thunk-from-memory: incompatible bytecode kind
> ;;; WARNING: loading compiled file 
> /gnu/store/xfrwjx47iwv8pnn6ml22fj6jnm2jmdjm-module-import-compiled/guix/records.go
>  failed:
> ;;; In procedure load-thunk-from-memory: incompatible bytecode kind
> ;;; WARNING: loading compiled file 
> /gnu/store/xfrwjx47iwv8pnn6ml22fj6jnm2jmdjm-module-import-compiled/gnu/build/accounts.go
>  failed:
> ;;; In procedure load-thunk-from-memory: incompatible bytecode kind
> ;;; WARNING: loading compiled file 
> /gnu/store/xfrwjx47iwv8pnn6ml22fj6jnm2jmdjm-module-import-compiled/guix/combinators.go
>  failed:
> ;;; In procedure load-thunk-from-memory: incompatible bytecode kind
> ;;; WARNING: loading compiled file 
> /gnu/store/xfrwjx47iwv8pnn6ml22fj6jnm2jmdjm-module-import-compiled/gnu/build/linux-boot.go
>  failed
> :
> ;;; In procedure load-thunk-from-memory: incompatible bytecode kind
> ;;; WARNING: loading compiled file 
> /gnu/store/xfrwjx47iwv8pnn6ml22fj6jnm2jmdjm-module-import-compiled/guix/build/syscalls.go
>  failed:
> ;;; In procedure load-thunk-from-memory: incompatible bytecode kind
> ;;; WARNING: loading compiled file 
> /gnu/store/xfrwjx47iwv8pnn6ml22fj6jnm2jmdjm-module-import-compiled/gnu/build/linux-modules.go
>  fai
> led:
> ;;; In procedure load-thunk-from-memory: incompatible bytecode kind
> ;;; WARNING: loading compiled file 
> /gnu/store/xfrwjx47iwv8pnn6ml22fj6jnm2jmdjm-module-import-compiled/guix/elf.go
>  failed:
> ;;; In procedure load-thunk-from-memory: incompatible bytecode kind
> ;;; WARNING: loading compiled file 
> /gnu/store/xfrwjx47iwv8pnn6ml22fj6jnm2jmdjm-module-import-compiled/guix/glob.go
>  failed:
> ;;; In procedure load-thunk-from-memory: incompatible bytecode kind
> ;;; WARNING: loading compiled file 
> /gnu/store/xfrwjx47iwv8pnn6ml22fj6jnm2jmdjm-module-import-compiled/guix/build/union.go
>  failed:
> ;;; In procedure load-thunk-from-memory: incompatible bytecode kind
> ;;; Failed to autoload call-with-gzip-input-port in (zlib):
> ;;; missing interface for module (zlib)
> ;;; Failed to autoload call-with-gzip-input-port in (zlib):
> ;;; missing interface for module (zlib)
> ;;; Failed to autoload call-with-gzip-input-port in (zlib):
> ;;; missing interface for module (zlib)
> ;;; Failed to autoload call-with-gzip-input-port in (zlib):
> ;;; missing interface for module (zlib)
> ;;; WARNING: loading compiled file 
> /gnu/store/xfrwjx47iwv8pnn6ml22fj6jnm2jmdjm-module-import-compiled/gnu/build/file-systems.go
>  fail
> ed:
> ;;; In procedure load-thunk-from-memory: incompatible bytecode kind
> ;;; WARNING: loading compiled file 
> /gnu/store/xfrwjx47iwv8pnn6ml22fj6jnm2jmdjm-module-import-compiled/gnu/system/uuid.go
>  failed:
> ;;; In procedure load-thunk-from-memory: incompatible bytecode kind
> ;;; WARNING: loading compiled file 
> /gnu/store/xfrwjx47iwv8pnn6ml22fj6jnm2jmdjm-module-import-compiled/gnu/system/file-systems.go
>  fai
> led:
> ;;; In procedure load-thunk-from-memory: incompatible bytecode kind
> ;;; WARNING: loading compiled file 
> /gnu/store/xfrwjx47iwv8pnn6ml22fj6jnm2jmdjm-module-import-compiled/guix/diagnostics.go
>  failed:
> ;;; In procedure load-thunk-from-memory: incompatible bytecode kind
> ;;; WARNING: loading compiled file 
> /gnu/store/xfrwjx47iwv8pnn6ml22fj6jnm2jmdjm-module-import-compiled/guix/colors.go
>  failed:
> ;;; In procedure load-thunk-from-memory: incompatible bytecode kind
> ;;; WARNING: loading compiled file 
> /gnu/store/xfrwjx47iwv8pnn6ml22fj6jnm2jmdjm-module-import-compiled/guix/memoization.go
>  failed:
> ;;; In procedure load-thunk-from-memory: incompatible bytecode kind
> ;;; WARNING: loading compiled file 
> /gnu/store/xfrwjx47iwv8pnn6ml22fj6jnm2jmdjm-module-import-compiled/guix/profiling.goPlease
>  wait while gathering entropy to generate the key pair;
> this may take time...
> error in finalization thread: Success
> failed to start service 'file-systems'
> failed to start service 'user-file-systems'
> failed to start service 'root-file-system'
> failed to start service 'user-processes'
> failed to start service 'host-name'
> failed to start service 'user-homes'
> failed to start service 'nscd'
> failed to start service 'udev'
> failed to start service 'guix-daemon'
> failed to start service 'urandom-seed'
> failed to start service 'syslogd'
> failed to start service 'loopback'
> failed to start service 'virtual-terminal'
> failed to start service 'denatting'
> failed to start service 'mcron'
> ^CBacktrace:
>            2 (primitive-load "/gnu/store/n8dw1ybmfj3y15h5ax1ddcx1kmp?")
> In shepherd.scm:
>    353:22  1 (main . _)
> In shepherd/system.scm:
>     78:10  0 (_ _)
>
> shepherd/system.scm:78:10: In procedure reboot: Operation not permitted: 
> RB_AUTOBOOT
> ------------------guix describe----------8<----
> Génération 3    30 oct. 2020 21:57:15   (actuelle)
>   beaverlabs d878892
>     URL du dépôt : https://gitlab.com/edouardklein/guix
>     branche: beaverlabs
>     commit : d8788927c7e8b29702adb971bf1ffbc3235fba22
>   guix 94c38d5
>     URL du dépôt : https://git.savannah.gnu.org/git/guix.git
>     branche: master
>     commit : 94c38d54c9f061ffa0ccfe4be498c8e1b3c2a709
>
>

-- 
Bonface M. K. <https://www.bonfacemunyoki.com>
Chief Emacs Bazu / Rieng ya software sare
Mchochezi of: <https://upbookclub.com> / Twitter: @BonfaceKilz
GPG Key: D4F09EB110177E03C28E2FE1F5BBAE1E0392253F

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]