all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Setting up a development environment for guile-g-golf based software in KDE
@ 2022-09-02 10:25 Jérémy Korwin-Zmijowski
  2022-09-02 11:36 ` Ricardo Wurmus
  2022-09-02 18:30 ` Luis Felipe
  0 siblings, 2 replies; 7+ messages in thread
From: Jérémy Korwin-Zmijowski @ 2022-09-02 10:25 UTC (permalink / raw)
  To: Help Guix

Dear Guixters,

I want to build a GUI for Gnome (using guile-g-golf (and gtk)).

When under Gnome my small "Hello World" (from the manual example script) 
window shows up.

When under KDE (Plasma) nothing shows up but errors in the terminal :

    $ guix shell guile gtk guile-g-golf -- ./hello-world
    (guile:10978): GLib-GObject-WARNING **: 12:19:06.388: cannot
    register existing type 'GdkPixbuf'
    (guile:10978): GLib-GObject-CRITICAL **: 12:19:06.388:
    g_type_add_interface_static: assertion 'G_TYPE_IS_INSTANTIATABLE
    (instance_type)' failed
    (guile:10978): GLib-GObject-CRITICAL **: 12:19:06.388:
    g_type_add_interface_static: assertion 'G_TYPE_IS_INSTANTIATABLE
    (instance_type)' failed
    (guile:10978): GLib-CRITICAL **: 12:19:06.388: g_once_init_leave:
    assertion 'result != 0' failed

Naive intuition: for KDE I need to add some dependencies to my 
development environment - I don't know about yet - haha

I am new to GUI universe so don't hesitate to question the obvious.

Cheers,

-- 
Jérémy Korwin-Zmijowski

GPG: 036B 4D54 B7B4 D6C8 DA62 2746 700F 5E0C CBB2 E2D1

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Setting up a development environment for guile-g-golf based software in KDE
  2022-09-02 10:25 Setting up a development environment for guile-g-golf based software in KDE Jérémy Korwin-Zmijowski
@ 2022-09-02 11:36 ` Ricardo Wurmus
  2022-09-02 20:08   ` Jérémy Korwin-Zmijowski
  2022-09-02 18:30 ` Luis Felipe
  1 sibling, 1 reply; 7+ messages in thread
From: Ricardo Wurmus @ 2022-09-02 11:36 UTC (permalink / raw)
  To: Jérémy Korwin-Zmijowski; +Cc: help-guix


Jérémy Korwin-Zmijowski <jeremy@korwin-zmijowski.fr> writes:

> I want to build a GUI for Gnome (using guile-g-golf (and gtk)).
>
> When under Gnome my small "Hello World" (from the manual example
> script) window shows up.
>
> When under KDE (Plasma) nothing shows up but errors in the terminal :
>
>    $ guix shell guile gtk guile-g-golf -- ./hello-world
>    (guile:10978): GLib-GObject-WARNING **: 12:19:06.388: cannot
>    register existing type 'GdkPixbuf'
>    (guile:10978): GLib-GObject-CRITICAL **: 12:19:06.388:
>    g_type_add_interface_static: assertion 'G_TYPE_IS_INSTANTIATABLE
>    (instance_type)' failed
>    (guile:10978): GLib-GObject-CRITICAL **: 12:19:06.388:
>    g_type_add_interface_static: assertion 'G_TYPE_IS_INSTANTIATABLE
>    (instance_type)' failed
>    (guile:10978): GLib-CRITICAL **: 12:19:06.388: g_once_init_leave:
>    assertion 'result != 0' failed

When using g-golf make sure to disable grafts:

  guix shell --pure --no-grafts \
    guile guile-g-golf gtk@4

The same problem was found in guile-gi first:

  https://github.com/spk121/guile-gi/issues/96

-- 
Ricardo


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Setting up a development environment for guile-g-golf based software in KDE
  2022-09-02 10:25 Setting up a development environment for guile-g-golf based software in KDE Jérémy Korwin-Zmijowski
  2022-09-02 11:36 ` Ricardo Wurmus
@ 2022-09-02 18:30 ` Luis Felipe
  2022-09-03  1:13   ` Luis Felipe
  1 sibling, 1 reply; 7+ messages in thread
From: Luis Felipe @ 2022-09-02 18:30 UTC (permalink / raw)
  To: Jérémy Korwin-Zmijowski; +Cc: Help Guix


[-- Attachment #1.1: Type: text/plain, Size: 2222 bytes --]

Hi Jérémy,


On Friday, September 2nd, 2022 at 10:25, Jérémy Korwin-Zmijowski <jeremy@korwin-zmijowski.fr> wrote:

> Dear Guixters,
> 

> I want to build a GUI for Gnome (using guile-g-golf (and gtk)).
> 

> When under Gnome my small "Hello World" (from the manual example script)
> window shows up.
> 

> When under KDE (Plasma) nothing shows up but errors in the terminal :

In my case (guix 16a6cbe), the example doesn't work at all, regardless of the desktop environment or whether I use a pure environment or container without grafts.

I wonder if g-golf really works with GTK 4 (the guix package depends on gtk+, which is GTK+ 3)? It's a similar situation with guile-gi...

Also, the "Hello World" example in the documentation is written usin GTK+ API as far as I can see. For example, it uses GtkWidget.show(), which was removed in GTK 4, as far as I know, because widgets now show themselves by default.

I see that I can launch the program in a pure environment or container if I add gtk+ instead gtk. So, given the following program

;; Load Gtk
(use-modules (g-golf))
(gi-import "Gtk")

;; When the application is launched..
(define (activate app)
  ;; - Create a new window and a new button
  (let ((window (make <gtk-application-window>
                  #:title "Hello"
                  #:application app))
        (button (make <gtk-button>
                  #:label "Hello, World!")))
    ;; - Which closes the window when clicked
    (connect button
             'clicked
             (lambda (b)
               (close window)))
    ;; (set-child window button)  ; FIXME: Unbound variable: set-child
    (show window)))

;; Create a new application
(let ((app (make <gtk-application>
             #:application-id "org.example.GtkApplication")))
  (connect app 'activate activate)
  ;; Run the application
  (run app 0 '()))

I run it as Ricardo indicates

  guix shell --pure --no-grafts guile gtk+ guile-g-golf

and it works. Although I see this warning:

(guile:2): dbind-WARNING **: 18:16:30.514: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-hqCQ04xgN8: No such file or directory

Anyways, just my 2¢ :)

[-- Attachment #1.2: publickey - luis.felipe.la@protonmail.com - 0x12DE1598.asc --]
[-- Type: application/pgp-keys, Size: 1722 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 509 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Setting up a development environment for guile-g-golf based software in KDE
  2022-09-02 11:36 ` Ricardo Wurmus
@ 2022-09-02 20:08   ` Jérémy Korwin-Zmijowski
  0 siblings, 0 replies; 7+ messages in thread
From: Jérémy Korwin-Zmijowski @ 2022-09-02 20:08 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: help-guix

Hi Ricardo !

Thank you so much for your help. It worked like a charm.

You save my weekend hahaha

See you !


Le 02/09/2022 à 13:36, Ricardo Wurmus a écrit :
> Jérémy Korwin-Zmijowski<jeremy@korwin-zmijowski.fr>  writes:
>
>> I want to build a GUI for Gnome (using guile-g-golf (and gtk)).
>>
>> When under Gnome my small "Hello World" (from the manual example
>> script) window shows up.
>>
>> When under KDE (Plasma) nothing shows up but errors in the terminal :
>>
>>     $ guix shell guile gtk guile-g-golf -- ./hello-world
>>     (guile:10978): GLib-GObject-WARNING **: 12:19:06.388: cannot
>>     register existing type 'GdkPixbuf'
>>     (guile:10978): GLib-GObject-CRITICAL **: 12:19:06.388:
>>     g_type_add_interface_static: assertion 'G_TYPE_IS_INSTANTIATABLE
>>     (instance_type)' failed
>>     (guile:10978): GLib-GObject-CRITICAL **: 12:19:06.388:
>>     g_type_add_interface_static: assertion 'G_TYPE_IS_INSTANTIATABLE
>>     (instance_type)' failed
>>     (guile:10978): GLib-CRITICAL **: 12:19:06.388: g_once_init_leave:
>>     assertion 'result != 0' failed
> When using g-golf make sure to disable grafts:
>
>    guix shell --pure --no-grafts \
>      guile guile-g-golf gtk@4
>
> The same problem was found in guile-gi first:
>
>    https://github.com/spk121/guile-gi/issues/96
>
-- 
Jérémy Korwin-Zmijowski

GPG: 036B 4D54 B7B4 D6C8 DA62 2746 700F 5E0C CBB2 E2D1

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Setting up a development environment for guile-g-golf based software in KDE
  2022-09-02 18:30 ` Luis Felipe
@ 2022-09-03  1:13   ` Luis Felipe
  2022-09-03 10:29     ` Ricardo Wurmus
  0 siblings, 1 reply; 7+ messages in thread
From: Luis Felipe @ 2022-09-03  1:13 UTC (permalink / raw)
  To: Luis Felipe; +Cc: Jérémy Korwin-Zmijowski, Help Guix


[-- Attachment #1.1: Type: text/plain, Size: 467 bytes --]

On Friday, September 2nd, 2022 at 18:30, Luis Felipe <luis.felipe.la@protonmail.com> wrote:

> In my case (guix 16a6cbe), the example doesn't work at all, regardless of the desktop environment or whether I use a pure environment or container without grafts.

Hmm, I changed "gtk" to "gtk@4" and now it runs. Which is weird.

I noticed, though, that there are several GLib-GIO-CRITICAL errors related to dbus. Adding "dbus" to the package list make them go away.

[-- Attachment #1.2: publickey - luis.felipe.la@protonmail.com - 0x12DE1598.asc --]
[-- Type: application/pgp-keys, Size: 1722 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 509 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Setting up a development environment for guile-g-golf based software in KDE
  2022-09-03  1:13   ` Luis Felipe
@ 2022-09-03 10:29     ` Ricardo Wurmus
  2022-09-03 20:24       ` Luis Felipe
  0 siblings, 1 reply; 7+ messages in thread
From: Ricardo Wurmus @ 2022-09-03 10:29 UTC (permalink / raw)
  To: Luis Felipe; +Cc: Jérémy Korwin-Zmijowski, help-guix


Luis Felipe <luis.felipe.la@protonmail.com> writes:

> [[PGP Signed Part:Undecided]]
> On Friday, September 2nd, 2022 at 18:30, Luis Felipe <luis.felipe.la@protonmail.com> wrote:
>
>> In my case (guix 16a6cbe), the example doesn't work at all,
>> regardless of the desktop environment or whether I use a pure
>> environment or container without grafts.
>
> Hmm, I changed "gtk" to "gtk@4" and now it runs. Which is weird.
>
> I noticed, though, that there are several GLib-GIO-CRITICAL errors related to dbus. Adding "dbus" to the package list make them go away.

I had to run the guile-gi example under “dbus-launch” to make the errors
disappear.  guile-gi works fine with grafts and GTK4; g-golf requires
grafts to be disabled because it doesn’t address problems with gobject
introspection that is triggered by the presence of grafts.

-- 
Ricardo


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Setting up a development environment for guile-g-golf based software in KDE
  2022-09-03 10:29     ` Ricardo Wurmus
@ 2022-09-03 20:24       ` Luis Felipe
  0 siblings, 0 replies; 7+ messages in thread
From: Luis Felipe @ 2022-09-03 20:24 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: Jérémy Korwin-Zmijowski, help-guix


[-- Attachment #1.1: Type: text/plain, Size: 423 bytes --]

On Saturday, September 3rd, 2022 at 10:29, Ricardo Wurmus <rekado@elephly.net> wrote:

> I had to run the guile-gi example under “dbus-launch” to make the errors
> disappear. guile-gi works fine with grafts and GTK4; g-golf requires
> grafts to be disabled because it doesn’t address problems with gobject
> introspection that is triggered by the presence of grafts.

Didn't know about dbus-launch, thanks :)

[-- Attachment #1.2: publickey - luis.felipe.la@protonmail.com - 0x12DE1598.asc --]
[-- Type: application/pgp-keys, Size: 1722 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 509 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-09-03 20:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-02 10:25 Setting up a development environment for guile-g-golf based software in KDE Jérémy Korwin-Zmijowski
2022-09-02 11:36 ` Ricardo Wurmus
2022-09-02 20:08   ` Jérémy Korwin-Zmijowski
2022-09-02 18:30 ` Luis Felipe
2022-09-03  1:13   ` Luis Felipe
2022-09-03 10:29     ` Ricardo Wurmus
2022-09-03 20:24       ` Luis Felipe

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.