a1ien / libusb1-sys

MIT License
13 stars 10 forks source link

0.5.0 broke our CI #28

Open otavio opened 3 years ago

otavio commented 3 years ago

Error:

   running: "cc" "-Os" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "/target/x86_64-unknown-linux-gnu/release/build/libusb1-sys-fef9657771660830/out/include" "-I" "libusb/libusb" "-Wall" "-Wextra" "-DPRINTF_FORMAT(a, b)=" "-DENABLE_LOGGING=1" "-DOS_LINUX=1" "-DHAVE_ASM_TYPES_H=1" "-D_GNU_SOURCE=1" "-DHAVE_TIMERFD=1" "-DHAVE_EVENTFD=1" "-DHAVE_SYS_TIME_H=1" "-DHAVE_NFDS_T=1" "-DPLATFORM_POSIX=1" "-DHAVE_CLOCK_GETTIME=1" "-DDEFAULT_VISIBILITY=__attribute__((visibility(\"default\")))" "-o" "/target/x86_64-unknown-linux-gnu/release/build/libusb1-sys-fef9657771660830/out/libusb/libusb/os/linux_netlink.o" "-c" "libusb/libusb/os/linux_netlink.c"
  cargo:warning=In file included from libusb/libusb/os/linux_netlink.c:37:
  cargo:warning=/usr/include/linux/netlink.h:34: error: expected specifier-qualifier-list before 'sa_family_t'
  cargo:warning=libusb/libusb/os/linux_netlink.c: In function 'linux_netlink_start_event_monitor':
  cargo:warning=libusb/libusb/os/linux_netlink.c:95: error: unknown field 'nl_family' specified in initializer
  cargo:warning=libusb/libusb/os/linux_netlink.c:95: warning: excess elements in struct initializer
  cargo:warning=libusb/libusb/os/linux_netlink.c:95: warning: (near initialization for 'sa_nl')
  cargo:warning=libusb/libusb/os/linux_netlink.c:95: error: unknown field 'nl_groups' specified in initializer
  cargo:warning=libusb/libusb/os/linux_netlink.c:95: warning: excess elements in struct initializer
  cargo:warning=libusb/libusb/os/linux_netlink.c:95: warning: (near initialization for 'sa_nl')
  cargo:warning=libusb/libusb/os/linux_netlink.c: In function 'linux_netlink_read_message':
  cargo:warning=libusb/libusb/os/linux_netlink.c:313: error: 'struct sockaddr_nl' has no member named 'nl_groups'
  cargo:warning=libusb/libusb/os/linux_netlink.c:313: error: 'struct sockaddr_nl' has no member named 'nl_pid'
  cargo:warning=libusb/libusb/os/linux_netlink.c:314: error: 'struct sockaddr_nl' has no member named 'nl_groups'
  cargo:warning=libusb/libusb/os/linux_netlink.c:314: error: 'struct sockaddr_nl' has no member named 'nl_pid'
  exit code: 1

Any idea why?

a1ien commented 3 years ago

I have no idea. Can you try build libusb from ./configure && make

a1ien commented 3 years ago

Some interesting https://www.spinics.net/lists/netdev/msg171723.html Looks like bug came from this commit https://github.com/libusb/libusb/commit/aaff15d48d1b8555aabf012b06bf39bf8aa4768a#diff-a2ae0398f3555101d572c5c02de627b27517a5b1fb5655dfb896aa300159e0b9