nyxt icon indicating copy to clipboard operation
nyxt copied to clipboard

Generate image from commit

Open aadcg opened this issue 2 years ago • 7 comments

I'd like to build Nyxt on commit cac685372 (from March 2021).

Generating the image, via the mechanism specified in guix.scm and nyxt-guix.el, should work but I get the error below.

I don't understand why is complains about cl-markup. We don't use it anymore, but since it's specified in guix.scm, it should work.

Here's how I set sly-lisp-implementations:

(sly-lisp-implementations '((sbcl-nyxt (lambda () (nyxt-make-guix-sbcl-for-nyxt
                                                "~/common-lisp/nyxt"
                                                :force t
                                                :preserve '("GDK_SCALE"
                                                            ;; "GDK_DPI_SCALE"
                                                            "GTK_IM_MODULE"
                                                            "QT_IM_MODULE"
                                                            "XMODIFIERS"
                                                            "CLUTTER_IM_MODULE")
                                                :no-grafts t
                                                :ad-hoc '("emacs"
                                                          "git"
                                                          "gnupg"
                                                          "guix"
                                                          "password-store"
                                                          "xdg-utils"))))))

CC @Ambrevar

This is SBCL 2.2.2, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.

SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses.  See the CREDITS and COPYING files in the
distribution for more information.
WARNING: redefining PERFORM (#<STANDARD-CLASS ASDF/BUNDLE:IMAGE-OP> #<STANDARD-CLASS ASDF/SYSTEM:SYSTEM>) in DEFMETHOD
WARNING: System definition file #P"/gnu/store/bx3y7726s7vqz9bhsqw51izkkpjpnbvz-cl-calispel-0.1-1.e9f2f9c/share/common-lisp/source/cl-calispel/calispel.asd" contains definition for system "calispel-test". Please only define "calispel" and secondary systems with a name starting with "calispel/" (e.g. "calispel/test") in that file.
WARNING: System definition file #P"/gnu/store/9jlcs9ghq0npm4c15mrp4wmg2lfgfkkb-cl-json-0.5-1.6dfebb9/share/common-lisp/source/cl-json/cl-json.asd" contains definition for system "cl-json.test". Please only define "cl-json" and secondary systems with a name starting with "cl-json/" (e.g. "cl-json/test") in that file.

debugger invoked on a ASDF/FIND-COMPONENT:MISSING-COMPONENT in thread
#<THREAD "main thread" RUNNING {1001818003}>:
  Component "cl-markup" not found

Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
  0: [RETRY                        ] Retry ASDF operation.
  1: [CLEAR-CONFIGURATION-AND-RETRY] Retry ASDF operation after resetting the
                                     configuration.
  2: [RETRY                        ] Retry EVAL of current toplevel form.
  3: [CONTINUE                     ] Ignore error and continue loading file "/gnu/store/19c09pw8bq4aaxrd24pczw5g5b1qxfxw-profile/bin/lisp-repl-core-dumper".
  4: [ABORT                        ] Abort loading file "/gnu/store/19c09pw8bq4aaxrd24pczw5g5b1qxfxw-profile/bin/lisp-repl-core-dumper".
  5:                                 Ignore runtime option --eval "(with-open-file (s \"/gnu/store/19c09pw8bq4aaxrd24pczw5g5b1qxfxw-profile/bin/lisp-repl-core-dumper\")
  (read-line s)
  (load s))".
  6:                                 Skip rest of --eval and --load options.
  7:                                 Skip to toplevel READ/EVAL/PRINT loop.
  8: [EXIT                         ] Exit SBCL (calling #'EXIT, killing the process).

((LAMBDA NIL :IN ASDF/SYSTEM:FIND-SYSTEM))
; File has been modified since compilation:
;   SYS:CONTRIB;ASDF;ASDF.LISP.NEWEST
; Using form offset instead of character position.
   error finding frame source: invalid feature expression: "#.(UIOP/UTILITY:SYMBOL-TEST-TO-FEATURE-EXPRESSION
   '#:COMPILER-ERROR-CONTEXT-%SOURCE '#:SB-C)"
   source: NIL
0] 
* 
Error generating image.
This is SBCL 2.2.2, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.

SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses.  See the CREDITS and COPYING files in the
distribution for more information.
WARNING: redefining PERFORM (#<STANDARD-CLASS ASDF/BUNDLE:IMAGE-OP> #<STANDARD-CLASS ASDF/SYSTEM:SYSTEM>) in DEFMETHOD
WARNING: System definition file #P"/gnu/store/bx3y7726s7vqz9bhsqw51izkkpjpnbvz-cl-calispel-0.1-1.e9f2f9c/share/common-lisp/source/cl-calispel/calispel.asd" contains definition for system "calispel-test". Please only define "calispel" and secondary systems with a name starting with "calispel/" (e.g. "calispel/test") in that file.
WARNING: System definition file #P"/gnu/store/9jlcs9ghq0npm4c15mrp4wmg2lfgfkkb-cl-json-0.5-1.6dfebb9/share/common-lisp/source/cl-json/cl-json.asd" contains definition for system "cl-json.test". Please only define "cl-json" and secondary systems with a name starting with "cl-json/" (e.g. "cl-json/test") in that file.

debugger invoked on a ASDF/FIND-COMPONENT:MISSING-COMPONENT in thread
#<THREAD "main thread" RUNNING {1001818003}>:
  Component "cl-markup" not found

Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
  0: [RETRY                        ] Retry ASDF operation.
  1: [CLEAR-CONFIGURATION-AND-RETRY] Retry ASDF operation after resetting the
                                     configuration.
  2: [RETRY                        ] Retry EVAL of current toplevel form.
  3: [CONTINUE                     ] Ignore error and continue loading file "/gnu/store/19c09pw8bq4aaxrd24pczw5g5b1qxfxw-profile/bin/lisp-repl-core-dumper".
  4: [ABORT                        ] Abort loading file "/gnu/store/19c09pw8bq4aaxrd24pczw5g5b1qxfxw-profile/bin/lisp-repl-core-dumper".
  5:                                 Ignore runtime option --eval "(with-open-file (s \"/gnu/store/19c09pw8bq4aaxrd24pczw5g5b1qxfxw-profile/bin/lisp-repl-core-dumper\")
  (read-line s)
  (load s))".
  6:                                 Skip rest of --eval and --load options.
  7:                                 Skip to toplevel READ/EVAL/PRINT loop.
  8: [EXIT                         ] Exit SBCL (calling #'EXIT, killing the process).

((LAMBDA NIL :IN ASDF/SYSTEM:FIND-SYSTEM))
; File has been modified since compilation:
;   SYS:CONTRIB;ASDF;ASDF.LISP.NEWEST
; Using form offset instead of character position.
   error finding frame source: invalid feature expression: "#.(UIOP/UTILITY:SYMBOL-TEST-TO-FEATURE-EXPRESSION
   '#:COMPILER-ERROR-CONTEXT-%SOURCE '#:SB-C)"
   source: NIL
0] 
* 
Error generating image.
This is SBCL 2.2.2, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.

SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses.  See the CREDITS and COPYING files in the
distribution for more information.
WARNING: redefining PERFORM (#<STANDARD-CLASS ASDF/BUNDLE:IMAGE-OP> #<STANDARD-CLASS ASDF/SYSTEM:SYSTEM>) in DEFMETHOD
WARNING: System definition file #P"/gnu/store/bx3y7726s7vqz9bhsqw51izkkpjpnbvz-cl-calispel-0.1-1.e9f2f9c/share/common-lisp/source/cl-calispel/calispel.asd" contains definition for system "calispel-test". Please only define "calispel" and secondary systems with a name starting with "calispel/" (e.g. "calispel/test") in that file.
WARNING: System definition file #P"/gnu/store/9jlcs9ghq0npm4c15mrp4wmg2lfgfkkb-cl-json-0.5-1.6dfebb9/share/common-lisp/source/cl-json/cl-json.asd" contains definition for system "cl-json.test". Please only define "cl-json" and secondary systems with a name starting with "cl-json/" (e.g. "cl-json/test") in that file.

debugger invoked on a ASDF/FIND-COMPONENT:MISSING-COMPONENT in thread
#<THREAD "main thread" RUNNING {1001818003}>:
  Component "cl-markup" not found

Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
  0: [RETRY                        ] Retry ASDF operation.
  1: [CLEAR-CONFIGURATION-AND-RETRY] Retry ASDF operation after resetting the
                                     configuration.
  2: [RETRY                        ] Retry EVAL of current toplevel form.
  3: [CONTINUE                     ] Ignore error and continue loading file "/gnu/store/19c09pw8bq4aaxrd24pczw5g5b1qxfxw-profile/bin/lisp-repl-core-dumper".
  4: [ABORT                        ] Abort loading file "/gnu/store/19c09pw8bq4aaxrd24pczw5g5b1qxfxw-profile/bin/lisp-repl-core-dumper".
  5:                                 Ignore runtime option --eval "(with-open-file (s \"/gnu/store/19c09pw8bq4aaxrd24pczw5g5b1qxfxw-profile/bin/lisp-repl-core-dumper\")
  (read-line s)
  (load s))".
  6:                                 Skip rest of --eval and --load options.
  7:                                 Skip to toplevel READ/EVAL/PRINT loop.
  8: [EXIT                         ] Exit SBCL (calling #'EXIT, killing the process).

((LAMBDA NIL :IN ASDF/SYSTEM:FIND-SYSTEM))
; File has been modified since compilation:
;   SYS:CONTRIB;ASDF;ASDF.LISP.NEWEST
; Using form offset instead of character position.
   error finding frame source: invalid feature expression: "#.(UIOP/UTILITY:SYMBOL-TEST-TO-FEATURE-EXPRESSION
   '#:COMPILER-ERROR-CONTEXT-%SOURCE '#:SB-C)"
   source: NIL
0] 
* 
Error generating image.
This is SBCL 2.2.2, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.

SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses.  See the CREDITS and COPYING files in the
distribution for more information.
WARNING: redefining PERFORM (#<STANDARD-CLASS ASDF/BUNDLE:IMAGE-OP> #<STANDARD-CLASS ASDF/SYSTEM:SYSTEM>) in DEFMETHOD
WARNING: System definition file #P"/gnu/store/bx3y7726s7vqz9bhsqw51izkkpjpnbvz-cl-calispel-0.1-1.e9f2f9c/share/common-lisp/source/cl-calispel/calispel.asd" contains definition for system "calispel-test". Please only define "calispel" and secondary systems with a name starting with "calispel/" (e.g. "calispel/test") in that file.
WARNING: System definition file #P"/gnu/store/9jlcs9ghq0npm4c15mrp4wmg2lfgfkkb-cl-json-0.5-1.6dfebb9/share/common-lisp/source/cl-json/cl-json.asd" contains definition for system "cl-json.test". Please only define "cl-json" and secondary systems with a name starting with "cl-json/" (e.g. "cl-json/test") in that file.

debugger invoked on a ASDF/FIND-COMPONENT:MISSING-COMPONENT in thread
#<THREAD "main thread" RUNNING {1001818003}>:
  Component "cl-markup" not found

Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
  0: [RETRY                        ] Retry ASDF operation.
  1: [CLEAR-CONFIGURATION-AND-RETRY] Retry ASDF operation after resetting the
                                     configuration.
  2: [RETRY                        ] Retry EVAL of current toplevel form.
  3: [CONTINUE                     ] Ignore error and continue loading file "/gnu/store/19c09pw8bq4aaxrd24pczw5g5b1qxfxw-profile/bin/lisp-repl-core-dumper".
  4: [ABORT                        ] Abort loading file "/gnu/store/19c09pw8bq4aaxrd24pczw5g5b1qxfxw-profile/bin/lisp-repl-core-dumper".
  5:                                 Ignore runtime option --eval "(with-open-file (s \"/gnu/store/19c09pw8bq4aaxrd24pczw5g5b1qxfxw-profile/bin/lisp-repl-core-dumper\")
  (read-line s)
  (load s))".
  6:                                 Skip rest of --eval and --load options.
  7:                                 Skip to toplevel READ/EVAL/PRINT loop.
  8: [EXIT                         ] Exit SBCL (calling #'EXIT, killing the process).

((LAMBDA NIL :IN ASDF/SYSTEM:FIND-SYSTEM))
; File has been modified since compilation:
;   SYS:CONTRIB;ASDF;ASDF.LISP.NEWEST
; Using form offset instead of character position.
   error finding frame source: invalid feature expression: "#.(UIOP/UTILITY:SYMBOL-TEST-TO-FEATURE-EXPRESSION
   '#:COMPILER-ERROR-CONTEXT-%SOURCE '#:SB-C)"
   source: NIL
0] 
* 
Error generating image.

aadcg avatar May 31 '22 13:05 aadcg

You are probably mixing a Lisp REPL image dump from master to load nyxt from https://github.com/atlas-engineer/nyxt/commit/cac685372458b14def1625c3068c03302b0a8642. You can't do this. You must use the Lisp REPL image dump corresponding to the commit to build nyxt.

But before digging, try to simply build nyxt with the .scm manifest:

guix shell --container -D -f build-scripts/nyxt.scm glib glib-networking gsettings-desktop-schemas git  -- make all NYXT_SUBMODULES=false

Ambrevar avatar Jun 01 '22 07:06 Ambrevar

You are probably mixing a Lisp REPL image dump from master to load nyxt from cac6853. You can't do this. You must use the Lisp REPL image dump corresponding to the commit to build nyxt.

That's clear. That's why I usually pass the :force keyword set to t and start a new connection.

(There's a minor mistake in the command you wrote. Notice that the file is called guix.scm, not nyxt.scm.)

$ guix shell --container -D -f ./build-scripts/guix.scm glib glib-networking gsettings-desktop-schemas git  -- make all NYXT_SUBMODULES=false

Backtrace:
In ice-9/boot-9.scm:
  1752:10 19 (with-exception-handler _ _ #:unwind? _ #:unwind-for-type _)
In guix/store.scm:
   659:37 18 (thunk)
   1298:8 17 (call-with-build-handler #<procedure 7fefe8f328a0 at guix/ui.scm:1169:2…> …)
In guix/status.scm:
    809:4 16 (call-with-status-report _ _)
In guix/scripts/environment.scm:
    320:4 15 (_)
In srfi/srfi-1.scm:
   673:15 14 (append-map _ _ . _)
   586:29 13 (map1 _)
   586:29 12 (map1 ((package ad-hoc-package "git") (package ad-hoc-package "gset…") …))
   586:29 11 (map1 ((package ad-hoc-package "gsettings-desktop-schemas") (package …) …))
   586:29 10 (map1 ((package ad-hoc-package "glib-networking") (package # "glib") # …))
   586:29  9 (map1 ((package ad-hoc-package "glib") (load package "./build-scrip…") …))
   586:17  8 (map1 ((load package "./build-scripts/guix.scm") (ad-hoc? . #t) (# . #) …))
In guix/scripts/environment.scm:
   310:29  7 (packages->outputs _ _)
In guix/profiles.scm:
   420:16  6 (package->development-manifest #<package nyxt@2-pre-release-5-590-gcac6…> …)
In guix/packages.scm:
  1308:25  5 (package-development-inputs _ _ #:target _)
  1507:16  4 (package->bag _ _ _ #:graft? _)
  1611:47  3 (thunk)
In /home/aadcg/common-lisp/nyxt/build-scripts/guix.scm:
   150:17  2 (native-inputs #<package nyxt@2-pre-release-5-590-gcac685372 /home/aadcg…>)
In ice-9/boot-9.scm:
  1685:16  1 (raise-exception _ #:continuable? _)
  1685:16  0 (raise-exception _ #:continuable? _)

ice-9/boot-9.scm:1685:16: In procedure raise-exception:
error: cl-prove: unbound variable

aadcg avatar Jun 01 '22 12:06 aadcg

guix.scm was renamed to nyxt.scm some time ago.

If you want complete reproducibility, you need a guix corresponding to the date of the Nyxt commit.

What happened here is that in Guix cl-prove was moved to lisp-check.scm. So either you can checkout a Guix from some time ago, or you can just patch the guix.scm file as follows:

             (gnu packages lisp)
+             (gnu packages lisp-check)
             (gnu packages lisp-xyz)

Ambrevar avatar Jun 02 '22 08:06 Ambrevar

Ah, that does make sense!

If you want complete reproducibility, you need a guix corresponding to the date of the Nyxt commit.

Indeed, I was thinking about this. Shouldn't we pin the Guix commit used in our images?

aadcg avatar Jun 02 '22 14:06 aadcg

Yeah, but it's unclear to me how this should be done.

Ambrevar avatar Jun 03 '22 06:06 Ambrevar

This is a specific build issue with Guix, not Nyxt.

jmercouris avatar Nov 08 '23 06:11 jmercouris

@jmercouris that is not correct. This is related to the official Nyxt development environment, which happens to be based on Guix.

aadcg avatar Nov 08 '23 07:11 aadcg