Hello David,

On 12.04.25 05:07, David Pirotte wrote:
Hello Zelphir,

Yesterday I decided to give g-golf a try. Unfortunately I did not get
very far at all. I tried running the hello world example, and it
already crashed:
You can't run the upstream version of the g-golf distributed examples
in guix, due to a known problem (in guix, this has nothing to do with
guile nor g-golf itself), they must be wrapped so they are being run in
an 'appropriate way' (that is using the --no-graft guix shell command).

I guess --no-grafts is not sufficient, and I need to use it, and additionally install one of the two packages you mentioned. Merely adding --no-grafts still results in the error:

~~~~
GLib-GObject:ERROR:../glib-2.82.1/gobject/gbinding.c:874:g_binding_class_init: 
assertion failed: (gobject_notify_signal_id != 0)
Bail 
out!GLib-GObject:ERROR:../glib-2.82.1/gobject/gbinding.c:874:g_binding_class_init:
 assertion failed: (gobject_notify_signal_id != 0)
~~~~

Guix now two separate g-golf examples packages:

        g-golf-gtk-4-examples
        g-golf-adw-1-examples

You should install those package and run them from your profile bin
dir (iiuc, not a guix user).

I installed those 2 packages and tried running like before, which results in a new, different error, but I am not sure what it means to "run from my profile bin dir", so I did not take any steps towards that:

~~~~
guix shell: checking the environment variables visible from shell '/bin/bash'...
guix shell: All is good!  The shell gets correct environment variables.
;;; note: source file /home/user/dev/guile/gui/g-golf/example-01/main.scm
;;;       newer than compiled 
/home/user/.cache/guile/ccache/3.0-LE-8-4.6/home/user/dev/guile/gui/g-golf/example-01/main.scm.go
;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
;;;       or pass the --no-auto-compile argument to disable.
;;; compiling /home/user/dev/guile/gui/g-golf/example-01/main.scm
;;; WARNING: compilation of /home/user/dev/guile/gui/g-golf/example-01/main.scm 
failed:
;;; GError: (73 0 "Typelib file for namespace 'Gtk', version '4.0' not found")
Backtrace:
           5 (primitive-load "/home/user/dev/guile/gui/g-golf/exampl…")
In ice-9/eval.scm:
   721:20  4 (primitive-eval (eval-when (expand load eval) (# (…)) …))
In ice-9/psyntax.scm:
  1229:36  3 (expand-top-sequence (#<syntax:main.scm:26:0 (eval-wh…>) …)
  1221:19  2 (parse _ (("placeholder" placeholder)) ((top) #(# # …)) …)
   259:10  1 (parse _ (("placeholder" placeholder)) ((top) #(# # …)) …)
In g-golf/gi/repository.scm:
    100:2  0 (g-irepository-require _ #:version _ #:repository _)

g-golf/gi/repository.scm:100:2: In procedure g-irepository-require:
GError: (73 0 "Typelib file for namespace 'Gtk', version '4.0' not found")
make: *** [Makefile:19: run] Error 1
~~~~

Can you explain further, how to do the "run from my profile bin dir" part?


To see and learn how to wrap your own g-golf app, in guix, you may do
(I am quoting a sentence of the package description):

        Run @command{guix edit g-golf-gtk-4-examples} for inspiration
        how to wrap G-Golf applications when writing a Guix package.

What does it mean to "wrap" G-Golf applications?

All I want to do is run the code, and see some GUI shown on my screen. (And then be able to change things in the code, run it again, seeing the changed GUI, etc. Development workflow.) Is that already requiring to "wrap" it?

If the developed program runs on another machine that has Guix installed, then I am already satisfied (for now). I have not thought about shipping or something like that at all yet. Even less about making the developed program another guix package.

Cheers,
David

--
repositories:https://notabug.org/ZelphirKaltstahl,https://codeberg.org/ZelphirKaltstahl

Reply via email to