crategus / cl-cffi-gtk

cl-cffi-gtk is a Lisp binding to the GTK+ 3 library.
http://www.crategus.com/books/cl-cffi-gtk
146 stars 33 forks source link

Add ARM architecture (for Raspberry Pi) #43

Open mobius-eng opened 7 years ago

mobius-eng commented 7 years ago

It's sort of "a bit" works on Raspberry Pi 3 with Ubuntu MATE 16.04. File "glib.misc.lisp" does not have ARM architecture to define G-SIZE C-type. I've made it :ULONG - everything compiles, but not sure if it is a correct value. It can create Gtk window (just running first frew examples from the tutorial), but it's not possible to set up the title and these wornings apear in REPL (or rather inferior-lisp buffer in Emacs):

(sbcl:7384): Gtk-WARNING **: Theme parsing error: gtk-main.css:69:33: Failed to import: Error opening file: No such file or directory

(sbcl:7384): GLib-GObject-CRITICAL **: g_value_transform: assertion 'G_IS_VALUE (src_value)' failed

(sbcl:7384): GLib-GObject-WARNING **: unable to set property 'type' of type 'GtkWindowType' from value of type '(null)'

Note: Ubuntu MATE 16.04 is built against Gtk2 (AFAIK). I've manually installed libgtk-3-0 and libgtk-3-dev, but the problem is still there.

vityok commented 6 years ago

The problem also exists while running on a default Raspbian:

cl-cffi-gtk version: 1.0.0
cl-cffi-gtk build date: 20:49 1/31/2018
GTK+ version: 3.14.5
GLIB version: 2.42.1
GDK-Pixbuf version: 2.31.1
Pango version: 1.36.8
Cairo version: 1.14.0
Machine type: armv7l
Machine version: BCM2835
Software type: Linux
Software version: 4.9.35-v7+
Lisp implementation type: Clozure Common Lisp
Lisp implementation version: Version 1.11.5/v1.11.5 (LinuxARM32)

and the system eventually crashes even with the most basic example.

The #33 maybe related.

Thovthe commented 2 years ago

There is some interest from downstream in Nyxt to have support for arm/aarch64/ARMv8. Currently people are having trouble compiling on that platform

Proposed solutions have been:

Moving cl-cffi-gtk to the currently maintained trivial-features. See here.

and

@luismbo has also suggested changing cl-cffi-gtk to use :uintptr and cited this observation from the nyxt compilation thread.
PS: I think ARM support is going to get more and more desirable over the coming years. There are already reasonably well regarded arm laptops with good linux support and more coming.