nexmon icon indicating copy to clipboard operation
nexmon copied to clipboard

Unable to build libpcap: LINUX_USB_MON_DEV undeclared

Open tranzmatt opened this issue 2 years ago • 1 comments

I'm getting the following error when building from my 20.04 box using the 11c NDK and the master branch of nexmon.

/home/Android/sdk/ndk/android-ndk-r11c/ndk-build NDK_APPLICATION_MK=`pwd`/Application.mk NDK_APP_OUT=. TARGET_PLATFORM=android-21
make[1]: Entering directory '/home/Android/Nexmon/nexmon/app/app/src/main/external/src/libpcap'
[armeabi] Compile thumb  : pcap <= pcap-usb-linux.c
././../../../../../../../utilities/libpcap/pcap-usb-linux.c: In function 'usb_findalldevs':
././../../../../../../../utilities/libpcap/pcap-usb-linux.c:282:29: error: 'LINUX_USB_MON_DEV' undeclared (first use in this function)
   pcap_strlcpy(usb_mon_dir, LINUX_USB_MON_DEV, sizeof usb_mon_dir);
                             ^
././../../../../../../../utilities/libpcap/pcap-usb-linux.c:282:29: note: each undeclared identifier is reported only once for each function it appears in
././../../../../../../../utilities/libpcap/pcap-usb-linux.c: In function 'usb_activate':
././../../../../../../../utilities/libpcap/pcap-usb-linux.c:641:42: error: 'LINUX_USB_MON_DEV' undeclared (first use in this function)
   pcap_snprintf(full_path, USB_LINE_LEN, LINUX_USB_MON_DEV"%d", handlep->bus_index);
                                          ^
././../../../../../../../utilities/libpcap/pcap-usb-linux.c:641:59: error: expected ')' before string constant
   pcap_snprintf(full_path, USB_LINE_LEN, LINUX_USB_MON_DEV"%d", handlep->bus_index);
                                                           ^
make[1]: *** [/home/Android/sdk/ndk/android-ndk-r11c/build/core/build-binary.mk:461: local/armeabi/objs/pcap/./__/__/__/__/__/__/__/utilities/libpcap/pcap-usb-linux.o] Error 1
make[1]: Leaving directory '/home/Android/Nexmon/nexmon/app/app/src/main/external/src/libpcap'
make: *** [Makefile:5: libs/armeabi/libpcap.a] Error 2

tranzmatt avatar Apr 29 '22 14:04 tranzmatt

I guess the patch from https://github.com/seemoo-lab/nexmon/issues/477#issuecomment-829212527 fixes this.

tranzmatt avatar Apr 29 '22 20:04 tranzmatt