diamondburned / dissent

Tiny native Discord app
https://flathub.org/apps/details/so.libdb.dissent
GNU General Public License v3.0
1.27k stars 40 forks source link

Unable to build latest due to libspelling #313

Open txtsd opened 2 days ago

txtsd commented 2 days ago

Here's a log:

==> Starting build()...
go: downloading github.com/diamondburned/gotkit v0.0.0-20240817140251-aa2fb5bc486d
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 github.com/diamondburned/adaptive v0.0.2-0.20221227093656-fa139be203a8
go: downloading github.com/ianlancetaylor/cgosymbolizer v0.0.0-20240326020559-581a3f7c677f
go: downloading github.com/pkg/errors v0.9.1
go: downloading github.com/leonelquinteros/gotext v1.6.0
go: downloading github.com/yalue/merged_fs v1.3.0
go: downloading github.com/lmittmann/tint v1.0.4
go: downloading github.com/mattn/go-isatty v0.0.20
go: downloading github.com/diamondburned/arikawa/v3 v3.4.0
go: downloading github.com/diamondburned/chatkit v0.0.0-20240614105536-5788b19145bc
go: downloading github.com/diamondburned/ningen/v3 v3.0.1-0.20240808103805-f1a24c0da3d8
go: downloading libdb.so/ctxt v0.0.0-20240229093153-2db38a5d3c12
go: downloading golang.org/x/sys v0.22.0
go: downloading golang.org/x/time v0.6.0
go: downloading github.com/gorilla/websocket v1.5.3
go: downloading github.com/dustin/go-humanize v1.0.1
go: downloading github.com/yuin/goldmark v1.7.1
go: downloading github.com/sahilm/fuzzy v0.1.1
go: downloading github.com/gofrs/flock v0.12.1
go: downloading golang.org/x/sync v0.7.0
go: downloading github.com/KarpelesLab/weak v0.1.1
go: downloading go4.org/unsafe/assume-no-moving-gc v0.0.0-20231121144256-b99613f794b6
go: downloading github.com/gorilla/schema v1.4.1
go: downloading go4.org v0.0.0-20230225012048-214862532bf5
go: downloading libdb.so/go-emoji v0.0.0-20240508073816-39776eee41ac
go: downloading github.com/alecthomas/chroma v0.10.0
go: downloading github.com/enescakir/emoji v1.0.0
go: downloading libdb.so/gotk4-sourceview/pkg v0.0.0-20240818070527-98263515a466
go: downloading libdb.so/gotk4-spelling/pkg v0.0.0-20240818082554-ee26db878626
go: downloading github.com/zalando/go-keyring v0.2.4
go: downloading golang.org/x/crypto v0.25.0
go: downloading github.com/twmb/murmur3 v1.1.8
go: downloading github.com/dlclark/regexp2 v1.11.0
go: downloading github.com/godbus/dbus/v5 v5.1.0
go: downloading github.com/puzpuzpuz/xsync/v3 v3.1.0
go: downloading golang.org/x/text v0.16.0
# libdb.so/gotk4-spelling/pkg/spelling
../go/pkg/mod/libdb.so/gotk4-spelling/pkg@v0.0.0-20240818082554-ee26db878626/spelling/spelling-language-info.go:73:13: could not determine kind of name for C.SpellingLanguageInfo
../go/pkg/mod/libdb.so/gotk4-spelling/pkg@v0.0.0-20240818082554-ee26db878626/spelling/spelling-language-info.go:127:10: could not determine kind of name for C.SpellingLanguageInfoClass
../go/pkg/mod/libdb.so/gotk4-spelling/pkg@v0.0.0-20240818082554-ee26db878626/spelling/spelling-language-info.go:78:10: could not determine kind of name for C.spelling_language_info_get_code
../go/pkg/mod/libdb.so/gotk4-spelling/pkg@v0.0.0-20240818082554-ee26db878626/spelling/spelling-language-info.go:94:10: could not determine kind of name for C.spelling_language_info_get_group
../go/pkg/mod/libdb.so/gotk4-spelling/pkg@v0.0.0-20240818082554-ee26db878626/spelling/spelling-language-info.go:110:10: could not determine kind of name for C.spelling_language_info_get_name
../go/pkg/mod/libdb.so/gotk4-spelling/pkg@v0.0.0-20240818082554-ee26db878626/spelling/spelling-language-info.go:20:36: could not determine kind of name for C.spelling_language_info_get_type
==> ERROR: A failure occurred in build().
    Aborting...
tfuxu commented 2 days ago

You probably have libspelling 0.4.0 installed, which introduced breaking changes to SpellingLanguage and SpellingLanguageInfo (the one that's making errors here). More info here: libspelling/NEWS

diamondburned commented 2 days ago

Unfortunately, upstream Nixpkgs libspelling is stuck on 0.2: https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/libraries/libspelling/default.nix.

If this is a big issue, it might be worth it to build with nogtksource.

mzivic7 commented 2 days ago

Here is a temporary fix: I noticed that arch's AUR dissent-bin (pre-built binary) gives me an error: dissent: error while loading shared libraries: libspelling-1.so.1: cannot open shared object file: No such file or directory So I searched for libspelling: sudo find /usr/lib -name "libspelling*" and found it in /usr/lib/libspelling-1.so.2.0.0 Since this dynamic library name has changed (at least on my system), i built old version (0.2.1) and placed it back to /usr/lib/libspelling-1.so.1 This way both versions are installed.

I haven't tested building, but it should work.

IMPORTANT: Check that in /usr/lib/ is not already libspelling-1.so.1 before copying old one, so it is not replaced. This builds and installs libspelling 0.2.1, might be missing some build dependencies.

git clone --branch 0.2.1 https://gitlab.gnome.org/GNOME/libspelling.git
cd libspelling
sudo pacman -S vala gi-docgen   # use your system package manager 
mkdir build
meson setup build
meson compile -C build
sudo cp build/lib/libspelling-1.so.1.0.0 /usr/lib/libspelling-1.so.1
# sudo pacman -Rcns valal gi-docgen
cd ..
rm -rf libspelling

Dont forget to delete this copied file /usr/lib/libspelling-1.so.1 after dissent gets updated.

diamondburned commented 18 hours ago

Whoops, seems like this feature is affecting almost everyone now @.@