hid icon indicating copy to clipboard operation
hid copied to clipboard

Compile error on ubuntu18

Open edulop91 opened this issue 5 years ago • 4 comments

# github.com/karalabe/hid
vendor/github.com/karalabe/hid/hid_enabled.go:23:11: fatal error: os/threads_posix.c: No such file or directory
  #include "os/threads_posix.c"
           ^~~~~~~~~~~~~~~~~~~~

Have been getting this on ubuntu18. CGO_ENABLED=1. libusb 1.0.0 + libusb1.0.0-dev installed.

Wondering what I'm missing

edulop91 avatar Nov 01 '19 21:11 edulop91

Vendoring does not hook C files.

filinvadim avatar Mar 04 '20 19:03 filinvadim

It is related to https://github.com/golang/go/issues/26366 . Any chance you could add dummy files into hidapi and libusb directories. Here are examples:

  • https://github.com/golang/go/issues/26366#issuecomment-606404010
  • https://github.com/go-gl/glfw/pull/258

Thanks

devfacet avatar Aug 06 '20 19:08 devfacet

~#31 should fix that.~

Edit: it doesn't.

dolmen avatar Jan 13 '22 20:01 dolmen

I have a fix for this issue on my fork: github.com/dolmen-go/hid.

dolmen avatar Feb 20 '22 20:02 dolmen