diamondburned / gotk4

Autogenerated GTK4 bindings for Go
GNU Affero General Public License v3.0
520 stars 20 forks source link

errors when trying to build with GH Actions #148

Closed abenz1267 closed 3 months ago

abenz1267 commented 3 months ago

Hi,

I'm currently trying to setup a GH Action to build the binary, but I'm running into various errors:

Error: ../../../go/pkg/mod/github.com/diamondburned/gotk4/pkg@v0.3.0/glib/v2/glib.go:23451:10: could not determine kind of name for C.GPathBuf
Error: ../../../go/pkg/mod/github.com/diamondburned/gotk4/pkg@v0.3.0/glib/v2/glib.go:13452:10: could not determine kind of name for C.g_bookmark_file_copy
Error: ../../../go/pkg/mod/github.com/diamondburned/gotk4/pkg@v0.3.0/glib/v2/glib.go:45:42: could not determine kind of name for C.g_bookmark_file_get_type
Error: ../../../go/pkg/mod/github.com/diamondburned/gotk4/pkg@v0.3.0/glib/v2/glib.go:15535:10: could not determine kind of name for C.g_date_time_new_from_unix_local_usec
Error: ../../../go/pkg/mod/github.com/diamondburned/gotk4/pkg@v0.3.0/glib/v2/glib.go:15585:10: could not determine kind of name for C.g_date_time_new_from_unix_utc_usec
Error: ../../../go/pkg/mod/github.com/diamondburned/gotk4/pkg@v0.3.0/glib/v2/glib.go:17060:10: could not determine kind of name for C.g_date_time_to_unix_usec
Error: ../../../go/pkg/mod/github.com/diamondburned/gotk4/pkg@v0.3.0/glib/v2/glib.go:48:42: could not determine kind of name for C.g_dir_get_type
Error: ../../../go/pkg/mod/github.com/diamondburned/gotk4/pkg@v0.3.0/glib/v2/glib.go:17177:4: could not determine kind of name for C.g_dir_unref
Error: ../../../go/pkg/mod/github.com/diamondburned/gotk4/pkg@v0.3.0/glib/v2/glib.go:50:42: could not determine kind of name for C.g_hmac_get_type
Error: ../../../go/pkg/mod/github.com/diamondburned/gotk4/pkg@v0.3.0/glib/v2/glib.go:9360:10: could not determine kind of name for C.g_log_writer_syslog
Error: ../../../go/pkg/mod/github.com/diamondburned/gotk4/pkg@v0.3.0/glib/v2/glib.go:23463:2: could not determine kind of name for C.g_path_buf_clear
Error: ../../../go/pkg/mod/github.com/diamondburned/gotk4/pkg@v0.3.0/glib/v2/glib.go:23483:10: could not determine kind of name for C.g_path_buf_clear_to_path
Error: ../../../go/pkg/mod/github.com/diamondburned/gotk4/pkg@v0.3.0/glib/v2/glib.go:23823:10: could not determine kind of name for C.g_path_buf_equal
Error: ../../../go/pkg/mod/github.com/diamondburned/gotk4/pkg@v0.3.0/glib/v2/glib.go:23513:10: could not determine kind of name for C.g_path_buf_free_to_path
Error: ../../../go/pkg/mod/github.com/diamondburned/gotk4/pkg@v0.3.0/glib/v2/glib.go:23537:10: could not determine kind of name for C.g_path_buf_init
Error: ../../../go/pkg/mod/github.com/diamondburned/gotk4/pkg@v0.3.0/glib/v2/glib.go:23567:10: could not determine kind of name for C.g_path_buf_init_from_path
Error: ../../../go/pkg/mod/github.com/diamondburned/gotk4/pkg@v0.3.0/glib/v2/glib.go:23609:10: could not determine kind of name for C.g_path_buf_pop
Error: ../../../go/pkg/mod/github.com/diamondburned/gotk4/pkg@v0.3.0/glib/v2/glib.go:23663:10: could not determine kind of name for C.g_path_buf_push
Error: ../../../go/pkg/mod/github.com/diamondburned/gotk4/pkg@v0.3.0/glib/v2/glib.go:23699:10: could not determine kind of name for C.g_path_buf_set_extension
Error: ../../../go/pkg/mod/github.com/diamondburned/gotk4/pkg@v0.3.0/glib/v2/glib.go:23756:10: could not determine kind of name for C.g_path_buf_set_filename
Error: ../../../go/pkg/mod/github.com/diamondburned/gotk4/pkg@v0.3.0/glib/v2/glib.go:23785:10: could not determine kind of name for C.g_path_buf_to_path
Error: ../../../go/pkg/mod/github.com/diamondburned/gotk4/pkg@v0.3.0/glib/v2/glib.go:60:42: could not determine kind of name for C.g_rand_get_type
Error: ../../../go/pkg/mod/github.com/diamondburned/gotk4/pkg@v0.3.0/glib/v2/glib.go:13088:10: could not determine kind of name for C.g_utf8_truncate_middle

I'm using the ubuntu-latest runner and goreleaser.

sudo apt-get install -y libgtk-4-dev libgirepository1.0-dev libglib2.0-dev should install the dependencies (if not present anyways...).

Anyone got any idea? Building on a VPS with ubuntu-latest works fine.

Regards

diamondburned commented 3 months ago

ubuntu-latest isn't new enough, it seems. You want to try ubuntu-24.04 or use gotk4-nix like Dissent does.

diamondburned commented 3 months ago

You can track the Actions image versions here: https://github.com/actions/runner-images?tab=readme-ov-file#available-images.

abenz1267 commented 3 months ago

Thank you a lot! Using the 24.04 beta runner worked. Just had to build gtk4-layer-shell from source.