tfuxu / floodit

Flood the board
https://flathub.org/apps/io.github.tfuxu.floodit
GNU General Public License v3.0
6 stars 5 forks source link

Unable to build with meson #26

Open BlueManCZ opened 1 week ago

BlueManCZ commented 1 week ago

Is there an existing issue for this?

Describe your issue

Hello, I'm trying to build the project with Meson, but it fails with the error could not determine kind of name for.... Could this be related to the version of GLib I'm using (2.78.6)? I've included the full build log with package versions below.

ninja: Entering directory `builddir'
[0/1] Regenerating build files.
The Meson build system
Version: 1.5.2
Source dir: /tmp/floodit
Build dir: /tmp/floodit/builddir
Build type: native build
Project name: floodit
Project version: 1.1.0
Host machine cpu family: x86_64
Host machine cpu: x86_64
Program git found: YES (/usr/bin/git)
Dependency glib-2.0 found: YES 2.78.6 (cached)
Dependency gtk4 found: YES 4.14.4 (cached)
Dependency libadwaita-1 found: YES 1.5.2 (cached)
Program go found: YES (/usr/bin/go)
Configuring constants.go using configuration
Program blueprint-compiler found: YES (/usr/bin/blueprint-compiler)
Configuring io.github.tfuxu.floodit.desktop.in using configuration
Program msgfmt found: YES (/usr/bin/msgfmt)
Program desktop-file-validate found: YES (/usr/bin/desktop-file-validate)
Found pkg-config: YES (/usr/bin/pkg-config) 2.3.0
Dependency gio-2.0 found: YES 2.78.6 (cached)
Program /usr/bin/glib-compile-resources found: YES (/usr/bin/glib-compile-resources)
Configuring io.github.tfuxu.floodit.metainfo.xml.in using configuration
../data/meson.build:40: WARNING: The variable(s) 'TRANSLATE_URL', 'VCS_BROWSER_URL' in the input file 'data/io.github.tfuxu.floodit.metainfo.xml.in.in' are not present in the given configuration data.
Program appstreamcli found: YES (/usr/bin/appstreamcli)
Configuring io.github.tfuxu.floodit.Devel.gschema.xml using configuration
Program glib-compile-schemas found: YES (/usr/bin/glib-compile-schemas)
Program msginit found: YES (/usr/bin/msginit)
Program msgmerge found: YES (/usr/bin/msgmerge)
Program xgettext found: YES (/usr/bin/xgettext)
Dependency gio-2.0 found: YES 2.78.6 (cached)
Program /usr/bin/glib-compile-schemas found: YES (/usr/bin/glib-compile-schemas)
Program gtk4-update-icon-cache found: NO
Program gtk-update-icon-cache found: YES (/usr/bin/gtk-update-icon-cache)
Program update-desktop-database found: YES (/usr/bin/update-desktop-database)
Build targets in project: 9

floodit 1.1.0

  User defined options
    buildtype: debug
    prefix   : /tmp/floodit/builddir

Found ninja-1.12.1 at /usr/bin/ninja
Cleaning... 0 files.
[0/8] Generating go-build with a custom command
go: downloading github.com/diamondburned/gotk4-adwaita/pkg v0.0.0-20240712143708-824c3ce8a5f4
go: downloading github.com/diamondburned/gotk4/pkg v0.3.1
go: downloading golang.org/x/sync v0.8.0
go: downloading go4.org/unsafe/assume-no-moving-gc v0.0.0-20231121144256-b99613f794b6
go: downloading github.com/KarpelesLab/weak v0.1.1
internal/byteorder
internal/goarch
internal/race
internal/unsafeheader
internal/goos
internal/asan
math/bits
internal/godebugs
internal/goexperiment
internal/itoa
unicode/utf8
internal/profilerecord
cmp
internal/msan
internal/coverage/rtcov
unicode
sync/atomic
internal/runtime/atomic
internal/cpu
internal/runtime/syscall
log/internal
github.com/diamondburned/gotk4/pkg/cairo/swizzle
encoding
image/color
runtime/internal/math
runtime/internal/sys
unicode/utf16
internal/abi
log/slog/internal
github.com/tfuxu/floodit/src/constants
internal/chacha8rand
internal/runtime/exithook
internal/bytealg
math
internal/stringslite
runtime
iter
sync
internal/reflectlite
slices
internal/testlog
github.com/diamondburned/gotk4/pkg/core/slab
internal/bisect
log/slog/internal/buffer
github.com/KarpelesLab/weak
errors
sort
runtime/cgo
internal/oserror
path
io
strconv
syscall
internal/godebug
math/rand
bytes
strings
hash
github.com/tfuxu/floodit/src/backend
reflect
hash/crc32
bufio
internal/syscall/execenv
time
internal/syscall/unix
image
image/internal/imageutil
image/draw
context
io/fs
internal/poll
internal/filepathlite
os
internal/fmtsort
encoding/binary
encoding/base64
go4.org/unsafe/assume-no-moving-gc
path/filepath
fmt
github.com/tfuxu/floodit/src/backend/utils
runtime/debug
github.com/diamondburned/gotk4/pkg/core/closure
log
text/tabwriter
encoding/json
compress/flate
github.com/diamondburned/gotk4/pkg/core/gextras
github.com/diamondburned/gotk4/pkg/core/gbox
github.com/diamondburned/gotk4/pkg/core/gdebug
golang.org/x/sync/singleflight
compress/gzip
runtime/pprof
log/slog
github.com/diamondburned/gotk4/pkg/core/intern
github.com/diamondburned/gotk4/pkg/core/glib
github.com/diamondburned/gotk4/pkg/core/gcancel
github.com/diamondburned/gotk4/pkg/core/gerror
github.com/diamondburned/gotk4/pkg/cairo
github.com/diamondburned/gotk4/pkg/graphene
github.com/diamondburned/gotk4/pkg/glib/v2
# github.com/diamondburned/gotk4/pkg/glib/v2
/home/ivo/go/pkg/mod/github.com/diamondburned/gotk4/pkg@v0.3.1/glib/v2/glib.go:15535:10: could not determine kind of name for C.g_date_time_new_from_unix_local_usec
/home/ivo/go/pkg/mod/github.com/diamondburned/gotk4/pkg@v0.3.1/glib/v2/glib.go:15585:10: could not determine kind of name for C.g_date_time_new_from_unix_utc_usec
/home/ivo/go/pkg/mod/github.com/diamondburned/gotk4/pkg@v0.3.1/glib/v2/glib.go:17060:10: could not determine kind of name for C.g_date_time_to_unix_usec
/home/ivo/go/pkg/mod/github.com/diamondburned/gotk4/pkg@v0.3.1/glib/v2/glib.go:48:42: could not determine kind of name for C.g_dir_get_type
/home/ivo/go/pkg/mod/github.com/diamondburned/gotk4/pkg@v0.3.1/glib/v2/glib.go:17177:4: could not determine kind of name for C.g_dir_unref
/home/ivo/go/pkg/mod/github.com/diamondburned/gotk4/pkg@v0.3.1/glib/v2/glib.go:50:42: could not determine kind of name for C.g_hmac_get_type
/home/ivo/go/pkg/mod/github.com/diamondburned/gotk4/pkg@v0.3.1/glib/v2/glib.go:9360:10: could not determine kind of name for C.g_log_writer_syslog
/home/ivo/go/pkg/mod/github.com/diamondburned/gotk4/pkg@v0.3.1/glib/v2/glib.go:60:42: could not determine kind of name for C.g_rand_get_type
[5/8] Generating data/floodit_gresource with a custom command
FAILED: floodit
/usr/bin/go build -v -o floodit /tmp/floodit/src
ninja: build stopped: subcommand failed.
tfuxu commented 6 days ago

This is because you have too new GLib. Gotk4 is unfortunately still a static binding, so this happens commonly on bleeding-edge distros.

My recommendation for you is to either create a VM with Fedora or Debian and compile project here, or (something that I do) install Distrobox and set up a container with a distro of your choice.