Giter Site home page Giter Site logo

FreeBSD 13.2 build failure about nyxt HOT 15 CLOSED

mutkach avatar mutkach commented on June 1, 2024
FreeBSD 13.2 build failure

from nyxt.

Comments (15)

shamazmazum avatar shamazmazum commented on June 1, 2024 2

@baulig You can build a fresh version of webkit for gtk3 using my port (but read README.md first):
https://github.com/shamazmazum/freebsd-ports/tree/master/www

But you need to rebuild all your ports for that :) You can do this with poudriere if you have time.

from nyxt.

aadcg avatar aadcg commented on June 1, 2024 1

Thanks. Could you try to apply the patch below at _build/nkeymaps/keymap.lisp and re-compile?

             (lambda (i)
               (str:replace-all
-               "M-" #+linux "Alt+" #+darwin "Option+" #+win32 "Alt+"
+               "M-" #-(or darwin win32) "Alt+" #+darwin "Option+" #+win32 "Alt+"
                (str:replace-all
-                "S-" #+linux "Super+" #+darwin "Command+" #+win32 "Win+"
+                "S-" #-(or darwin win32) "Super+" #+darwin "Command+" #+win32 "Win+"
                 (str:replace-all
-                 "s-" #+linux "Shift+" #+darwin "Shift+" #+win32 "Shift+"
+                 "s-" #-(or darwin win32) "Shift+" #+darwin "Shift+" #+win32 "Shift+"
                  (str:replace-all
-                  "C-" #+linux "Ctrl+" #+darwin "Ctrl+" #+win32 "Ctrl+"
+                  "C-" #-(or darwin win32) "Ctrl+" #+darwin "Ctrl+" #+win32 "Ctrl+"
                   i)))))

from nyxt.

aadcg avatar aadcg commented on June 1, 2024

@mutkach you're correct. The issue here is that you're building for FreeBSD and none of the reader macros matches it. Could you share the output of sbcl --non-interactive --eval '(print *features*)'?

I think what we should do here would be to have the reader macro match darwin and win32 and have a safe fallback otherwise.

from nyxt.

mutkach avatar mutkach commented on June 1, 2024

@mutkach you're correct. The issue here is that you're building for FreeBSD and none of the reader macros matches it. Could you share the output of sbcl --non-interactive --eval '(print *features*)'?

I think what we should do here would be to have the reader macro match darwin and win32 and have a safe fallback otherwise.

(:ASDF3.3 :ASDF3.2 :ASDF3.1 :ASDF3 :ASDF2 :ASDF :OS-UNIX
 :NON-BASE-CHARS-EXIST-P :ASDF-UNICODE :ARENA-ALLOCATOR :X86-64 :GENCGC :64-BIT
 :ANSI-CL :BSD :COMMON-LISP :ELF :FREEBSD :IEEE-FLOATING-POINT :LITTLE-ENDIAN
 :PACKAGE-LOCAL-NICKNAMES :SB-CORE-COMPRESSION :SB-LDB :SB-PACKAGE-LOCKS
 :SB-THREAD :SB-UNICODE :SBCL :UNIX)

from nyxt.

mutkach avatar mutkach commented on June 1, 2024

Thanks a lot! It works now!

from nyxt.

aadcg avatar aadcg commented on June 1, 2024

I'll push the fix to nkeymaps and update the git submodule in order to close the issue. The next release will feature this fix. Until then, please apply the patch above.

from nyxt.

mutkach avatar mutkach commented on June 1, 2024

Thanks a lot again, nyxt seem to work just fine. There are still some minor problems ahead - in that case will it be appropriate to open a new issue or should I proceed with this one, as these issues seem to be pretty specific to FreeBSD?

from nyxt.

aadcg avatar aadcg commented on June 1, 2024

Please report any further issues under this one.

from nyxt.

baulig avatar baulig commented on June 1, 2024

Just tried with the latest FreeBSD 14.0-RC3 and it builds fine with the above patch.

I'm getting some warnings on launch:

 ./nyxt
WARNING:
   Type initializer for class 'WebKitURISchemeResponse' (GType 'WEBKIT-URI-SCHEME-RESPONSE') is invalid: foreign symbol 'webkit_uri_scheme_response_get_type'
Nyxt version 4
<INFO> [21:34:09] Source location: #P"/usr/Workspace/External/nyxt/"
<WARN> [21:34:09] Warning: Error on separate thread: Can't create directory /usr/Workspace/External/nyxt/nyxt,
a file with the same name already exists.
<INFO> [21:34:09] GTK extensions directory: #P"/usr/Workspace/External/nyxt/libraries/web-extensions/"

(nyxt:83988): Gtk-CRITICAL **: 21:34:09.389: gtk_box_pack: assertion '_gtk_widget_get_parent (child) == NULL' failed
<INFO> [21:34:09] GTK extensions directory: #P"/usr/Workspace/External/nyxt/libraries/web-extensions/"
<INFO> [21:34:09] Loading #P"/usr/home/martin/.local/share/nyxt/history/default.lisp".
<INFO> [21:34:09] Restoring 1 buffer from history.
<INFO> [21:34:09] Loading #P"/usr/home/martin/.local/share/nyxt/auto-rules.lisp".
<WARN> [21:34:09] Warning: Error while routing "nyxt" resource: The alien function "webkit_uri_scheme_response_new" is undefined.
<WARN> [21:34:09] Warning: Error while routing "nyxt" resource: The alien function "webkit_uri_scheme_response_new" is undefined.
<INFO> [21:34:09] Failed to load URL nyxt:new in buffer 2026.
<WARN> [21:34:09] Warning: Error while routing "nyxt-resource" resource: The alien function "webkit_uri_scheme_response_new" is undefined.

It won't load the nyxt:new page, but I can enter an URL - such as for instance this GitHub issue page and it loads.

I suppose this is due to a version incompatibility with WebKit; FreeBSD 14 comes with webkit2-gtk3-2.34.6_8.

Still no luck with OpenBSD - but it's working fine in my GNU Guix VM with Flatpak.

from nyxt.

aadcg avatar aadcg commented on June 1, 2024

@baulig indeed using the latest WebKitGTK version is important for security concerns alone. Version 2.34.6 was release in February of 2022. The nyxt:new isn't loaded since the API to handle custom schemes landed on version 2.36. I'd suggest request updating the package for FreeBSD.

no luck with OpenBSD

I don't think there's any fundamental issue about compiling Nyxt for that platform granted that Nyxt's dependencies (SBCL or WebKitGTK) are up to date.

from nyxt.

baulig avatar baulig commented on June 1, 2024

@aadcg Does Nyxt support GTK 4 (preferably without Wayland because I'm using XMonad)?

FreeBSD 14-RC3 has a GTK4-version of WebKitGTK 2.38.3, only the GTK3 one is outdated.

Unfortunately, building WebKitGTK on any of the BSD's is quite a challenge - and the patches from the ports tree often won't apply anymore with even the next minor version.

After spending a couple hours trying to get various different versions to build - and always running into some obscure C++ issues - I copied the patches from the GTK4 version onto the GTK3 one.

That finally got me a webkit2-gtk3-2.38.3_9 package.

However, I must have done something wrong because after a full rebuild of Nyxt, it just hangs on startup.

[martin@rohan:nyxt % 1862] $ ./nyxt --system-info
Nyxt version: 4
Renderer: GI-GTK
Operating system kernel: FreeBSD 14.0-RC3
Lisp implementation: SBCL 2.3.8 (Dynamic space size: 3221159936)
Features: (:NYXT-GI-GTK :NYXT-GTK :NYXT-GI-GTK :NYXT-GTK :NYXT-4
 :CLIPBOARD-CONTENT-METHOD :SWANK :SLYNK :PLUMP-UTF-32 :PARENSCRIPT :NSYMBOLS
 :FSET-EXT-STRINGS :NAMED-READTABLES :GLOBAL-VARS :CL-FAD :LPARALLEL
 :21BIT-CHARS :CUSTOM-HASH-TABLE-NATIVE :CL-PPCRE-UNICODE :CL-UNICODE :CHUNGA
 :FLEXI-STREAMS :CL-PPCRE :WEBKIT2 :WEBKIT-2.38.3 :WEBKIT-2.38 :WEBKIT-2
 :WEBKIT2-CORS-ALLOWLIST :WEBKIT2-PASTE-PLAINTEXT :WEBKIT2-TRACKING
 :WEBKIT2-MUTE :WEBKIT2-EMOJI :WEBKIT2-MEDIA :WEBKIT2-SANDBOXING :GTK-3-22
 :GTK-3-20 :GTK-3-18 :GTK-3-16 :GTK-3-14 :GTK-3-12 :GTK-3-10 :GTK-3-8 :GTK-3-6
 :GTK-3-4 :GTK :GDK-3-22 :GDK-3-20 :GDK-3-18 :GDK-3-16 :GDK-3-14 :GDK-3-12
 :GDK-3-10 :GDK-3-8 :GDK-3-6 :GDK-3-4 :CAIRO-1-10 :CAIRO-1-12 :GDK-PIXBUF
 :CLOSER-MOP :GLIB-2-30 :GLIB-2-32 :GLIB-2-34 :GLIB-2-36 :GLIB-2-38 :GLIB-2-40
 :GLIB-2-42 :GLIB-2-44 :GLIB-2-46 :GLIB-2-48 :GLIB-2-50 :GLIB-2-52 :GLIB-2-54
 :GLIB-2-56 :GLIB-2-58 :GLIB :BORDEAUX-THREADS :LPARALLEL.WITH-CLTL2
 :LPARALLEL.WITH-CAS :LPARALLEL.WITH-STEALING-SCHEDULER :SPLIT-SEQUENCE
 CFFI-FEATURES:FLAT-NAMESPACE CFFI-FEATURES:X86-64 CFFI-FEATURES:UNIX :CFFI
 CFFI-SYS::FLAT-NAMESPACE ALEXANDRIA::SEQUENCE-EMPTYP :FAST-IO-SV :FAST-IO
 :CL-JSON-CLOS :CL-JSON :SBCL-USES-SB-ROTATE-BYTE CHIPZ-SYSTEM:GRAY-STREAMS
 :THREAD-SUPPORT :ASDF3.3 :ASDF3.2 :ASDF3.1 :ASDF3 :ASDF2 :ASDF :OS-UNIX
 :NON-BASE-CHARS-EXIST-P :ASDF-UNICODE :ARENA-ALLOCATOR :X86-64 :GENCGC :64-BIT
 :ANSI-CL :BSD :COMMON-LISP :ELF :FREEBSD :IEEE-FLOATING-POINT :LITTLE-ENDIAN
 :PACKAGE-LOCAL-NICKNAMES :SB-LDB :SB-PACKAGE-LOCKS :SB-THREAD :SB-UNICODE
 :SBCL :UNIX)

ASDF version: 3.3.1
ASDF registries: (NYXT-SOURCE-REGISTRY ENVIRONMENT-SOURCE-REGISTRY)
Critical dependencies: (/usr/Workspace/External/nyxt/_build/cl-cffi-gtk/gtk/cl-cffi-gtk.asd
 /usr/Workspace/External/nyxt/_build/cl-gobject-introspection/cl-gobject-introspection.asd
 /usr/Workspace/External/nyxt/_build/cl-webkit/webkit2/cl-webkit2.asd)

[martin@rohan:nyxt % 1863] $ ./nyxt --failsafe
Nyxt version 4
<INFO> [00:37:38] Source location: #P"/usr/Workspace/External/nyxt/"
<INFO> [00:37:38] Profile: "nofile"

At that point, I have to kill -9 it.

from nyxt.

aadcg avatar aadcg commented on June 1, 2024

Does Nyxt support GTK 4 (preferably without Wayland because I'm using XMonad)?

It doesn't and it may be a time-consuming task. See #3259.

@baulig contact the BSD maintainers, maybe they can help to update webkitgtk for GTK 3. Ideally, it should be bumped to the latest stable version - 2.42.2.

from nyxt.

aadcg avatar aadcg commented on June 1, 2024

However, I must have done something wrong because after a full rebuild of Nyxt, it just hangs on startup.

@baulig maybe you actually didn't do anything wrong. You're trying to run it on OpenBSD, not FreeBSD, correct?

Try to apply one of the patch below. It might actually work. Can you share the output of sbcl --non-interactive --eval '(print *features*)'?

modified   source/renderer/gtk.lisp
@@ -263,7 +263,7 @@ defmethod ffi-initialize
           ;; UIOP:QUIT with FINISH-OUTPUT = NIL in the first place.
           ;;
           ;; FIXME: This also can be true for other BSD systems.
-          (uiop:quit (slot-value browser 'nyxt::exit-code) #+freebsd nil)))
+          (uiop:quit (slot-value browser 'nyxt::exit-code) #+bsd nil)))
       #+darwin
       (progn
         (setf gtk-running-p t)
modified   source/renderer/gtk.lisp
@@ -263,7 +263,7 @@ defmethod ffi-initialize
           ;; UIOP:QUIT with FINISH-OUTPUT = NIL in the first place.
           ;;
           ;; FIXME: This also can be true for other BSD systems.
-          (uiop:quit (slot-value browser 'nyxt::exit-code) #+freebsd nil)))
+          (uiop:quit (slot-value browser 'nyxt::exit-code) nil)))
       #+darwin
       (progn
         (setf gtk-running-p t)

from nyxt.

baulig avatar baulig commented on June 1, 2024

This is on FreeBSD 14:

$ sbcl --non-interactive --eval '(print *features*)'
This is SBCL 2.3.8, 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.
;;; loading #P"/usr/local/lib/sbcl/asdf/asdf.lisp"

(:ASDF3.3 :ASDF3.2 :ASDF3.1 :ASDF3 :ASDF2 :ASDF :OS-UNIX
 :NON-BASE-CHARS-EXIST-P :ASDF-UNICODE :ARENA-ALLOCATOR :X86-64 :GENCGC :64-BIT
 :ANSI-CL :BSD :COMMON-LISP :ELF :FREEBSD :IEEE-FLOATING-POINT :LITTLE-ENDIAN
 :PACKAGE-LOCAL-NICKNAMES :SB-LDB :SB-PACKAGE-LOCKS :SB-THREAD :SB-UNICODE
 :SBCL :UNIX)

Does Nyxt support GTK 4 (preferably without Wayland because I'm using XMonad)?

It doesn't and it may be a time-consuming task. See #3259.

@baulig contact the BSD maintainers, maybe they can help to update webkitgtk for GTK 3. Ideally, it should be bumped to the latest stable version - 2.42.2.

Okay, looks like we need to get a working WebKit for GTK 3, then. Since I have just blindly picked the patches from the GTK 4 version, chances are that my webkit package is just broken.

from nyxt.

aadcg avatar aadcg commented on June 1, 2024

Supporting BSD systems isn't currently a priority for us. We can nonetheless help to figure things out if you get stuck. Please re-open if you give it another try. Thanks!

from nyxt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.