nyxt icon indicating copy to clipboard operation
nyxt copied to clipboard

Build Fails - Pre-release-10 (electron)

Open logoraz opened this issue 6 months ago • 0 comments

Describe the bug When building Nyxt Pre-release-10 for the electron variant, build fails with the following error:

; compiling file "NYXT:SOURCE;RENDERER;ELECTRON.LISP.NEWEST" (written 23 JUN 2025 07:26:17 PM):
; 
; caught ERROR:
;   READ error during COMPILE-FILE:
;   
;     Symbol "ADBLOCKER-ELECTRON" not found in the ELECTRON package.
;   
;       Line: 90, Column: 64, File-Position: 3927
;   
;       Stream: #<SB-INT:FORM-TRACKING-STREAM for "file /home/logoraz/.local/share/common-lisp/bin/nyxt/source/renderer/electron.lisp" {1012B41703}>

Seems the git submodule for cl-electron pulls against commit dff9181, whereas, cl-electron latest is at 9eacb4e. Thus, proposed fix is to update git submodule commit for cl-electron to commit 9eacb4e.

When _build/cl-electron is replaced with latest, build succeeds, however starting nyxt hangs on the following error:

> [email protected] start
> electron /home/logoraz/.local/share/common-lisp/bin/nyxt/_build/cl-electron/source/server.js /run/user/1000/cl-electron/electron.socket protocol.registerSchemesAsPrivileged([{scheme:'nyxt',privileges:{}}, {scheme:'nyxt-resource',privileges:{secure:true}}, {scheme:'lisp',privileges:{supportFetchAPI:true,corsEnabled:true}}, {scheme:'view-source',privileges:{}}, {scheme:'gopher',privileges:{}}, {scheme:'gemini',privileges:{}}]);


(process:15684): Gtk-ERROR **: 19:51:33.308: GTK 2/3 symbols detected. Using GTK 2/3 and GTK 4 in the same process is not supported
/home/logoraz/.local/share/common-lisp/bin/nyxt/_build/cl-electron/node_modules/electron/dist/electron exited with signal SIGTRAP
^CUnhandled SB-SYS:INTERACTIVE-INTERRUPT in thread #<SB-THREAD:THREAD tid=15633 "main thread" RUNNING
                                                    {1003D38EE3}>:

This subsequent error running Nyxt after successful build is actually a known bug in Electron: https://github.com/electron/electron/issues/46538#issuecomment-2790356082

  • Suggested workaround: start electron with --gtk-version=3
    • or set app.commandLine.appendSwitch('gtk-version', '3'); in main script

I will investigate this workaround to see if I can get Pre-release-10 working...

Affected Linux distributions:

  • Debian 12 with Gnome 43
  • Debian 13 (Testing) with Gnome 48
  • Fedora 41 with Gnome 47
  • Fedora 42 with Gnome 48
  • openSUSE Tumbleweed with Gnome 48
  • Arch Linux with Gnome 48

Unaffected Linux distributions:

  • Ubuntu 25.04 with Gnome 48

Steps to reproduce the issue

$ mkdir -p /desired/path/to/build
$ git clone --recurse-submodules https://github.com/atlas-engineer/nyxt.git  /desired/path/to/build/nyxt
$ cd /path/to/build/nyxt/
$ make all NYXT_RENDERER=electron

Information

  • OS Name+Version: Fedora 42
  • Installation method (Flatpak, Guix, package manager, build from source): build from source
  • Output of Nyxt command show-system-information: N/A

logoraz avatar Jun 24 '25 03:06 logoraz