gotk4 icon indicating copy to clipboard operation
gotk4 copied to clipboard

could not determine kind of name for C.g_date_time_new_from_unix_local_usec

Open squeaktoy opened this issue 1 year ago • 12 comments

OS: Gentoo Linux Kernel: Linux version 6.6.41-gentoo-dist C Compiler: GNU GCC 13.3.1 Go compiler: go version go1.22.6 linux/amd64 glib package info:

dev-libs/glib-2.78.6::gentoo was built with the following:
USE="dbus elf mime static-libs xattr -debug -gtk-doc (-selinux) -sysprof -systemtap -test -utils" ABI_X86="32 (64) (-x32)"
FEATURES="userfetch protect-owned unmerge-logs network-sandbox assume-digests qa-unresolved-soname-deps sfperms xattr usersync news sandbox ipc-sandbox binpkg-docompress fixlafiles preserve-libs splitdebug binpkg-logs merge-wait unknown-features-warn binpkg-dostrip config-protect-if-modified distlocks ebuild-locks userpriv parallel-fetch unmerge-orphans fail-clean multilib-strict pid-sandbox usersandbox pkgdir-index-trusted buildpkg-live strict merge-sync"

gtk4 package info:

gui-libs/gtk-4.14.4-r1::gentoo was built with the following:
USE="X gstreamer introspection wayland (-aqua) -broadway -cloudproviders -colord -cups -examples -sysprof -test (-vulkan)" ABI_X86="(64)" CPU_FLAGS_X86="f16c"

After running go install -v libdb.so/dissent@latest, I got the following output:

github.com/diamondburned/gotk4/pkg/glib/v2
# github.com/diamondburned/gotk4/pkg/glib/v2
go/pkg/mod/github.com/diamondburned/gotk4/[email protected]/glib/v2/glib.go:15535:10: could not determine kind of name for C.g_date_time_new_from_unix_local_usec
go/pkg/mod/github.com/diamondburned/gotk4/[email protected]/glib/v2/glib.go:15585:10: could not determine kind of name for C.g_date_time_new_from_unix_utc_usec
go/pkg/mod/github.com/diamondburned/gotk4/[email protected]/glib/v2/glib.go:17060:10: could not determine kind of name for C.g_date_time_to_unix_usec
go/pkg/mod/github.com/diamondburned/gotk4/[email protected]/glib/v2/glib.go:48:42: could not determine kind of name for C.g_dir_get_type
go/pkg/mod/github.com/diamondburned/gotk4/[email protected]/glib/v2/glib.go:17177:4: could not determine kind of name for C.g_dir_unref
go/pkg/mod/github.com/diamondburned/gotk4/[email protected]/glib/v2/glib.go:50:42: could not determine kind of name for C.g_hmac_get_type
go/pkg/mod/github.com/diamondburned/gotk4/[email protected]/glib/v2/glib.go:9360:10: could not determine kind of name for C.g_log_writer_syslog
go/pkg/mod/github.com/diamondburned/gotk4/[email protected]/glib/v2/glib.go:60:42: could not determine kind of name for C.g_rand_get_type

squeaktoy avatar Aug 13 '24 18:08 squeaktoy

What GLib and GTK versions do you have?

diamondburned avatar Aug 14 '24 03:08 diamondburned

https://github.com/diamondburned/gotk4/pull/145 might've bumped it a bit too high...

diamondburned avatar Aug 14 '24 03:08 diamondburned

Same issue on Gentoo box

JarzaClay avatar Aug 26 '24 11:08 JarzaClay

Same on OpenSuse Leap 15.6:

go: downloading github.com/diamondburned/gotk4/pkg v0.3.1
go: downloading golang.org/x/sync v0.8.0
go: downloading github.com/KarpelesLab/weak v0.1.1
go: downloading go4.org/unsafe/assume-no-moving-gc v0.0.0-20231121144256-b99613f794b6
# github.com/diamondburned/gotk4/pkg/glib/v2
../../go/pkg/mod/github.com/diamondburned/gotk4/[email protected]/glib/v2/glib.go:15535:10: could not determine kind of name for C.g_date_time_new_from_unix_local_usec
../../go/pkg/mod/github.com/diamondburned/gotk4/[email protected]/glib/v2/glib.go:15585:10: could not determine kind of name for C.g_date_time_new_from_unix_utc_usec
../../go/pkg/mod/github.com/diamondburned/gotk4/[email protected]/glib/v2/glib.go:17060:10: could not determine kind of name for C.g_date_time_to_unix_usec
../../go/pkg/mod/github.com/diamondburned/gotk4/[email protected]/glib/v2/glib.go:48:42: could not determine kind of name for C.g_dir_get_type
../../go/pkg/mod/github.com/diamondburned/gotk4/[email protected]/glib/v2/glib.go:17177:4: could not determine kind of name for C.g_dir_unref
../../go/pkg/mod/github.com/diamondburned/gotk4/[email protected]/glib/v2/glib.go:50:42: could not determine kind of name for C.g_hmac_get_type
../../go/pkg/mod/github.com/diamondburned/gotk4/[email protected]/glib/v2/glib.go:9360:10: could not determine kind of name for C.g_log_writer_syslog
../../go/pkg/mod/github.com/diamondburned/gotk4/[email protected]/glib/v2/glib.go:60:42: could not determine kind of name for C.g_rand_get_type

Kernel: 6.4.0-150600.23.17-default Go: go version go1.23.1 linux/amd64 GTK: gtk4-devel 4.12.4-150600.3.3.1 GLib: libglib-2_0-0 2.78.6-150600.4.3.1

bzx0 avatar Sep 24 '24 16:09 bzx0

If this is seriously affecting your application, please consider downgrading gotk4/pkg to pkg/v0.2.2.

diamondburned avatar Sep 25 '24 04:09 diamondburned

If this is seriously affecting your application, please consider downgrading gotk4/pkg to pkg/v0.2.2.

I think we are all trying to use dissent, which uses gotk4 v0.3.1. Any solutions that are not downgrading dissent?

0xIO32 avatar Sep 29 '24 16:09 0xIO32

If this is seriously affecting your application, please consider downgrading gotk4/pkg to pkg/v0.2.2.

I think we are all trying to use dissent, which uses gotk4 v0.3.1. Any solutions that are not downgrading dissent?

can you use the prebuilt?

diamondburned avatar Sep 30 '24 02:09 diamondburned

If this is seriously affecting your application, please consider downgrading gotk4/pkg to pkg/v0.2.2.

Thanks, this is a working solution for me.

bzx0 avatar Sep 30 '24 04:09 bzx0

If this is seriously affecting your application, please consider downgrading gotk4/pkg to pkg/v0.2.2.

I think we are all trying to use dissent, which uses gotk4 v0.3.1. Any solutions that are not downgrading dissent?

can you use the prebuilt?

I like having the binaries optimized for my cpu with "-O3" and thin-lto. And ofc I trust source code just more than binaries.

And if it doesn't compile because there are symbols missing, there is always the possibility of the application crashing in runtime. (Thats an assumption, I am not a C dev)

0xIO32 avatar Oct 01 '24 16:10 0xIO32

And if it doesn't compile because there are symbols missing, there is always the possibility of the application crashing in runtime. (Thats an assumption, I am not a C dev)

Dissent doesn't use any of these symbols, so you're fine.

diamondburned avatar Oct 01 '24 17:10 diamondburned

And if it doesn't compile because there are symbols missing, there is always the possibility of the application crashing in runtime. (Thats an assumption, I am not a C dev)

Dissent doesn't use any of these symbols, so you're fine.

Why does dissent require such a high glib version then? (to compile)

0xIO32 avatar Oct 01 '24 17:10 0xIO32

And if it doesn't compile because there are symbols missing, there is always the possibility of the application crashing in runtime. (Thats an assumption, I am not a C dev)

Dissent doesn't use any of these symbols, so you're fine.

Why does dissent require such a high glib version then? (to compile)

Because gotk4 is generated off the higher GLib version and Dissent requires that version.

You can downgrade gotk4 within Dissent and it'll probably work. I'm hesitant to provide more help if you're not familiar with Go development, but some of that is needed to build Go applications.

diamondburned avatar Oct 02 '24 12:10 diamondburned