atlas-engineer / nyxt

Nyxt - the hacker's browser.
https://nyxt-browser.com/
9.64k stars 404 forks source link

Building Error on MacOS #3355

Closed jcguu95 closed 3 months ago

jcguu95 commented 3 months ago

Describe the bug

I'm on sbcl 2.4.2, macbook M2, and am trying to build nyxt using make all. And I got the following error.

; compiling file "/Users/jin/.+PLUGS/tilde-local/stow/common-lisp/.qlot-main/.qlot/local-projects/nyxt/_build/slime/swank/backend.lisp" (written 07 MAR 2024 10:41:25 PM):

; file: /Users/jin/.+PLUGS/tilde-local/stow/common-lisp/.qlot-main/.qlot/local-projects/nyxt/_build/slime/swank/backend.lisp
; in: DEFUN %UTF8-ENCODE
;     (SWANK/BACKEND::%UTF8-ENCODE (CODE-CHAR 65533) SWANK/BACKEND::BUFFER
;      SWANK/BACKEND::START SWANK/BACKEND::END)
; 
; note: deleting unreachable code
; 
; caught WARNING:
;   Constant
;     #\REPLACEMENT_CHARACTER conflicts with its asserted type
;     (UNSIGNED-BYTE 31).
;   See also:
;     The SBCL Manual, Node "Handling of Types"

; wrote /Users/jin/.cache/common-lisp/sbcl-2.4.2-macosx-arm64/Users/jin/.+PLUGS/tilde-local/stow/common-lisp/.qlot-main/.qlot/local-projects/nyxt/_build/slime/swank/backend-tmpAAURSO1.fasl
; compilation finished in 0:00:00.159
SLYNK's ASDF loader finished.
debugger invoked on a UIOP/LISP-BUILD:COMPILE-FILE-ERROR in thread
#<THREAD tid=259 "main thread" RUNNING {7005D20603}>:
  COMPILE-FILE-ERROR while
  compiling #<CL-SOURCE-FILE "swank" "backend" "backend">

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
                                     compiling #<CL-SOURCE-FILE "swank" "backend" "backend">.
  1: [ACCEPT                       ] Continue, treating
                                     compiling #<CL-SOURCE-FILE "swank" "backend" "backend">
                                     as having been successful.
  2:                                 Retry ASDF operation.
  3: [CLEAR-CONFIGURATION-AND-RETRY] Retry ASDF operation after resetting the
                                     configuration.
  4:                                 Retry ASDF operation.
  5:                                 Retry ASDF operation after resetting the
                                     configuration.
  6: [CONTINUE                     ] Ignore runtime option --eval #<(SIMPLE-ARRAY
                                                                     CHARACTER
                                                                     (1161)) (ros:run '((:eval"(ros:quicklisp)")(:eval "(require \"asdf\")")(:eval "(when (string= \"true\" \"true\") (setf asdf:*default-source-registries* (list (quote asdf/source-registry:environment-source-reg... {7005D1004F}>.
  7: [ABORT                        ] Skip rest of --eval and --load options.
  8:                                 Skip to toplevel READ/EVAL/PRINT loop.
  9: [EXIT                         ] Exit SBCL (calling #'EXIT, killing the process).

(UIOP/LISP-BUILD:CHECK-LISP-COMPILE-RESULTS NIL T T "~/asdf-action::format-action/" ((#<ASDF/LISP-ACTION:COMPILE-OP > . #<ASDF/LISP-ACTION:CL-SOURCE-FILE "swank" "backend" "backend">)))
   source: (ERROR 'COMPILE-FILE-ERROR :CONTEXT-FORMAT CONTEXT-FORMAT
                  :CONTEXT-ARGUMENTS CONTEXT-ARGUMENTS)
0] 

Precise recipe to reproduce the issue

cd local-projects
git clone https://github.com/atlas-engineer/nyxt
cd nyxt
# get into vim and change LISP to `ros run`, which is may way of calling sbcl 2.4.2
make all

Information

aadcg commented 3 months ago

Duplicate of #3352, closing in its favour. Note that it compiles without issues with version 2.4.1.

@jcguu95 is this the first time you're compiling it for macOS? Note that macOS support is WIP (#2989).

jcguu95 commented 3 months ago

I got another error message with sbcl/2.4.1 and sbcl/2.2.7.

By the way, anyway to make the error message clearer? I don't see why it fails.

Also, macOS support is WIP? There was a newsletter saying that a binary is ready..?

; compiling file "NYXT:SOURCE;CONFIGURATION.LISP.NEWEST" (written 07 MAR 2024 10:37:25 PM):

; file: NYXT:SOURCE;CONFIGURATION.LISP.NEWEST
; in: DEFUN SET-AS-DEFAULT-BROWSER
;     (DECLARE (IGNORE NYXT:NAME NYXT::TARGETS))
; 
; caught ERROR:
;   There is no function named DECLARE.  References to DECLARE in some contexts
;   (like starts of blocks) are unevaluated expressions, but here the expression is
;   being evaluated, which invokes undefined behaviour.

;     (NYXT:NAME "nyxt")
; 
; caught STYLE-WARNING:
;   The variable NAME is defined but never used.

;     (NYXT::TARGETS
;      (LIST (UIOP/CONFIGURATION:XDG-CONFIG-HOME "mimeapps.list")
;            (UIOP/CONFIGURATION:XDG-DATA-HOME "applications/mimeapps.list")))
; 
; caught STYLE-WARNING:
;   The variable TARGETS is defined but never used.

; wrote /Users/jin/.cache/common-lisp/sbcl-2.4.1-macosx-arm64/Users/jin/.+PLUGS/tilde-local/stow/common-lisp/.qlot-main/.qlot/local-projects/nyxt/source/configuration-tmpAAURSO1.fasl
; compilation finished in 0:00:00.095
SLYNK's ASDF loader finished.
debugger invoked on a UIOP/LISP-BUILD:COMPILE-FILE-ERROR in thread
#<THREAD "main thread" RUNNING {7005FA03A3}>:
  COMPILE-FILE-ERROR while
  compiling #<CL-SOURCE-FILE "nyxt" "Core" "configuration">

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
                                     compiling #<CL-SOURCE-FILE "nyxt" "Core" "configuration">.
  1: [ACCEPT                       ] Continue, treating
                                     compiling #<CL-SOURCE-FILE "nyxt" "Core" "configuration">
                                     as having been successful.
  2:                                 Retry ASDF operation.
  3: [CLEAR-CONFIGURATION-AND-RETRY] Retry ASDF operation after resetting the
                                     configuration.
  4:                                 Retry ASDF operation.
  5:                                 Retry ASDF operation after resetting the
                                     configuration.
  6: [CONTINUE                     ] Ignore runtime option --eval #<(SIMPLE-ARRAY
                                                                     CHARACTER
                                                                     (1161)) (ros:run '((:eval"(ros:quicklisp)")(:eval "(require \"asdf\")")(:eval "(when (string= \"true\" \"true\") (setf asdf:*default-source-registries* (list (quote asdf/source-registry:environment-source-reg... {7005F9004F}>.
  7: [ABORT                        ] Skip rest of --eval and --load options.
  8:                                 Skip to toplevel READ/EVAL/PRINT loop.
  9: [EXIT                         ] Exit SBCL (calling #'EXIT, killing the process).

(UIOP/LISP-BUILD:CHECK-LISP-COMPILE-RESULTS NIL T T "~/asdf-action::format-action/" ((#<ASDF/LISP-ACTION:COMPILE-OP > . #<ASDF/LISP-ACTION:CL-SOURCE-FILE "nyxt" "Core" "configuration">)))
   source: (ERROR 'COMPILE-FILE-ERROR :CONTEXT-FORMAT CONTEXT-FORMAT
                  :CONTEXT-ARGUMENTS CONTEXT-ARGUMENTS)
0] 
aadcg commented 3 months ago

Also, macOS support is WIP? There was a newsletter saying that a binary is ready..?

Can you please provide a reference? Nyxt did at some point run on macOS, but that was some years ago.


With regards to compiling Nyxt on macOS, note that Nyxt doesn't officially support it yet so it comes as no surprise that compilation errors are raised. Supporting macOS is a top priority at the moment, please hang tight.

jcguu95 commented 3 months ago
  1. Get Hyped: Nyxt 4.0 macOS + Windows
  2. Awesome! Thank you.