trezor / trezord-go

:smiling_imp: Trezor Communication Daemon (written in Go)
GNU Lesser General Public License v3.0
246 stars 148 forks source link

Build fails on Linux #297

Closed andreas-hartmann closed 10 months ago

andreas-hartmann commented 1 year ago

Build fails on Arch Linux:

usb/lowlevel/libusb/libusb.go:405:10: cannot define new methods on non-local type *C.struct_libusb_endpoint_descriptor
usb/lowlevel/libusb/libusb.go:455:10: cannot define new methods on non-local type *C.struct_libusb_interface_descriptor
usb/lowlevel/libusb/libusb.go:510:10: cannot define new methods on non-local type *C.struct_libusb_interface
usb/lowlevel/libusb/libusb.go:557:10: cannot define new methods on non-local type *C.struct_libusb_config_descriptor
usb/lowlevel/libusb/libusb.go:615:10: cannot define new methods on non-local type *C.struct_libusb_ss_endpoint_companion_descriptor
usb/lowlevel/libusb/libusb.go:639:10: cannot define new methods on non-local type *C.struct_libusb_bos_dev_capability_descriptor
usb/lowlevel/libusb/libusb.go:662:10: cannot define new methods on non-local type *C.struct_libusb_bos_descriptor
usb/lowlevel/libusb/libusb.go:694:10: cannot define new methods on non-local type *C.struct_libusb_usb_2_0_extension_descriptor
usb/lowlevel/libusb/libusb.go:721:10: cannot define new methods on non-local type *C.struct_libusb_ss_usb_device_capability_descriptor
usb/lowlevel/libusb/libusb.go:749:10: cannot define new methods on non-local type *C.struct_libusb_container_id_descriptor
usb/lowlevel/libusb/libusb.go:796:10: cannot define new methods on non-local type *C.struct_libusb_device_descriptor
usb/lowlevel/libusb/libusb.go:866:10: cannot define new methods on non-local type *C.struct_libusb_transfer
usb/lowlevel/libusb/libusb.go:895:10: cannot define new methods on non-local type *C.struct_libusb_version

And build-release fails with:


  Try re-running cargo install with --locked
The command '/bin/sh -c cargo install apple-codesign' returned a non-zero code: 101
make[2]: *** [Makefile:47: .docker-image] Error 101
make[2]: Leaving directory '/home/andreas/Documents/Projects/trezord-go/release/macos'
make[1]: *** [Makefile:9: macos] Error 2
make[1]: Leaving directory '/home/andreas/Documents/Projects/trezord-go/release'
make: *** [Makefile:5: build-release] Error 2```
BrettCleary commented 1 year ago

I am experiencing the same usb/lowlevel/libusb/libusb.go errors building on Arch Linux

BrettCleary commented 1 year ago

I can confirm this error is occurring on go 1.21 but not on 1.20

salfter commented 12 months ago

Same issue with Gentoo Linux.

tsusanka commented 10 months ago

Should be fixed by https://github.com/trezor/trezord-go/pull/300.