ericm / yup

Arch Linux AUR Helper with ncurses functionality and better searching and sorting
https://aur.archlinux.org/packages/yup
GNU General Public License v3.0
137 stars 7 forks source link

cgo compiler errors against go-alpm #46

Open focusaurus opened 3 months ago

focusaurus commented 3 months ago

Are you on latest version of yup?

Yes, I am trying to build from the aur. I've also tried the current master branch from github as well as the most recent tag

Steps to Reproduce the Problem

  1. git clone https://aur.archlinux.org/yup.git 1.cd yup && makepkg -si
# github.com/Jguer/go-alpm/v2
/home/plyons/go/pkg/mod/github.com/!jguer/go-alpm/v2@v2.0.6/db.go:148:103: cannot use _cgo0 (variable of type *_Ctype_struct___alpm_list_t) as *_Ctype_struct__alpm_list_t value in argument to _Cfunc_alpm_find_group_pkgs
/home/plyons/go/pkg/mod/github.com/!jguer/go-alpm/v2@v2.0.6/deps.go:22:75: cannot use _cgo0 (variable of type *_Ctype_struct___alpm_handle_t) as *_Ctype_struct__alpm_handle_t value in argument to _Cfunc_alpm_find_dbs_satisfier
/home/plyons/go/pkg/mod/github.com/!jguer/go-alpm/v2@v2.0.6/deps.go:22:75: cannot use _cgo1 (variable of type *_Ctype_struct___alpm_list_t) as *_Ctype_struct__alpm_list_t value in argument to _Cfunc_alpm_find_dbs_satisfier
/home/plyons/go/pkg/mod/github.com/!jguer/go-alpm/v2@v2.0.6/deps.go:38:78: cannot use _cgo0 (variable of type *_Ctype_struct___alpm_list_t) as *_Ctype_struct__alpm_list_t value in argument to _Cfunc_alpm_find_satisfier
/home/plyons/go/pkg/mod/github.com/!jguer/go-alpm/v2@v2.0.6/package.go:69:53: cannot use _cgo0 (variable of type *_Ctype_struct___alpm_list_t) as *_Ctype_struct__alpm_list_t value in argument to _Cfunc_alpm_list_count
/home/plyons/go/pkg/mod/github.com/!jguer/go-alpm/v2@v2.0.6/package.go:70:34: cannot use _cgo0 (variable of type *_Ctype_struct___alpm_list_t) as *_Ctype_struct__alpm_list_t value in argument to _Cfunc_alpm_list_msort
make: *** [Makefile:11: build] Error 1
==> ERROR: A failure occurred in prepare().
    Aborting...

Other Details

This only recently started happening with an arch system update.

gal commented 3 months ago

Works for me on latest master with go v1.22.1 Looks like it was an undisclosed dependency on debugedit for go-alpm

https://itsfoss.community/t/archlinux-problems-with-yay-after-system-upgrade/11818/9

focusaurus commented 3 months ago

That forum seems to be entirely about issues with yay and libalpm. I have debugedit installed and can't get yup to compile. yay is installed and working OK for me currently. It seems the combination of libalpm14 and yup doesn't want to build on my system with go 1.22.1, but its unclear to me if yay has anything to do with this or not.