homewsn / whsniff

Whsniff is a command line utility that interfaces TI CC2531 USB dongle with Wireshark for capturing and displaying IEEE 802.15.4 traffic at 2.4 GHz.
GNU General Public License v2.0
131 stars 33 forks source link

Unable to make on Mac #5

Closed iStitch07 closed 4 years ago

iStitch07 commented 4 years ago

Houston, we have a problem )

Unable to make make on MacOs 10.14.6 (18G1012)

When I just try to make, I receive error

Book:whsniff-1.1 istitch07$ make
mkdir -p obj
cc  -c src/whsniff.c -o obj/whsniff.o -I.
src/whsniff.c:19:10: fatal error: 'endian.h' file not found
#include <endian.h>                     /* htole16, htole32, le32toh */
         ^~~~~~~~~~
1 error generated.
make: *** [obj/whsniff.o] Error 1

When I change include path to #include <machine/endian.h>, I receive other error

Book:whsniff-1.1 istitch07$ make
cc  -c src/whsniff.c -o obj/whsniff.o -I.
src/whsniff.c:103:12: warning: implicit declaration of function 'le16toh' is invalid in C99 [-Wimplicit-function-declaration]
        usb_len = le16toh(usb_header->le_usb_len);
                  ^
src/whsniff.c:124:36: warning: implicit declaration of function 'le32toh' is invalid in C99 [-Wimplicit-function-declaration]
                timestamp_us = (timestamp_tick + le32toh(usb_data_header->le_timestamp)) / 32;
                                                 ^
src/whsniff.c:149:12: warning: implicit declaration of function 'htole16' is invalid in C99 [-Wimplicit-function-declaration]
                le_fcs = htole16(fcs);
                         ^
src/whsniff.c:235:2: warning: 'libusb_set_debug' is deprecated [-Wdeprecated-declarations]
        libusb_set_debug(NULL, 3);
        ^
/usr/local/include/libusb-1.0/libusb.h:1324:1: note: 'libusb_set_debug' has been explicitly marked deprecated here
LIBUSB_DEPRECATED_FOR(libusb_set_option)
^
/usr/local/include/libusb-1.0/libusb.h:89:49: note: expanded from macro 'LIBUSB_DEPRECATED_FOR'
#define LIBUSB_DEPRECATED_FOR(f) __attribute__((deprecated))
                                                ^
4 warnings generated.
cc  -o whsniff obj/whsniff.o  -lusb-1.0 -lrt
ld: library not found for -lrt
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [whsniff] Error 1

libusb installed: libusb 1.0.23 is already installed and up-to-date

Can you help?

homewsn commented 4 years ago

I am sorry, MacOS support was included after the version 1.1 release. Please use the version 1.2 that I just released. Note that you can always get the actual sources using git clone https://github.com/homewsn/whsniff.git.