trezor / trezord-go

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

'libusb_set_debug' is deprecated: use libusb_set_option instead #225

Closed SunflowerFieldsForever closed 2 years ago

SunflowerFieldsForever commented 3 years ago

I'm attempting to install the Trezor Bridge per the instructions in the README.md, but encountered an error on the go build step:

[delaney@DMO ~]$ go build github.com/trezor/trezord-go
# github.com/trezor/trezord-go/usb/lowlevel/libusb
cgo-gcc-prolog: In function ‘_cgo_0328dca10925_Cfunc_libusb_set_debug’:
cgo-gcc-prolog:1186:2: warning: ‘libusb_set_debug’ is deprecated: Use libusb_set_option instead [-Wdeprecated-declarations]
In file included from go/src/github.com/trezor/trezord-go/usb/lowlevel/libusb/libusb.go:70:
go/src/github.com/trezor/trezord-go/usb/lowlevel/libusb/c/core.c:2107:19: note: declared here
 2107 | void API_EXPORTED libusb_set_debug(libusb_context *ctx, int level)
      |                   ^~~~~~~~~~~~~~~~

I've tried to start over, but the error now appears on go get command too:

[delaney@DMO ~]$ go clean
[delaney@DMO ~]$ go get github.com/trezor/trezord-go
# github.com/trezor/trezord-go/usb/lowlevel/libusb
cgo-gcc-prolog: In function ‘_cgo_0328dca10925_Cfunc_libusb_set_debug’:
cgo-gcc-prolog:1186:2: warning: ‘libusb_set_debug’ is deprecated: Use libusb_set_option instead [-Wdeprecated-declarations]
In file included from go/src/github.com/trezor/trezord-go/usb/lowlevel/libusb/libusb.go:70:
go/src/github.com/trezor/trezord-go/usb/lowlevel/libusb/c/core.c:2107:19: note: declared here
 2107 | void API_EXPORTED libusb_set_debug(libusb_context *ctx, int level)
      |                   ^~~~~~~~~~~~~~~~

I have udev installed, and my go version is: go version go1.16 linux/amd64

I'm not a go user, so any help would be appreciated.

prusnak commented 3 years ago

That's a warning, not an error.

The build should still produce an executable binary (named trezord-go)

igor-hnizdo commented 2 years ago

Fixed. We never actually used that function anywhere so I just deleted it from go code