Description
I need to install pypcap with Python 2 on Mac.
It failed when I use source install: python2 setup.py install
pcap_ex.c:292:10: warning: 'pcap_compile_nopcap' is deprecated: use pcap_open_dead(), pcap_compile() and pcap_close() [-Wdeprecated-declarations]
return (pcap_compile_nopcap(snaplen, dlt, fp, str, optimize, netmask));
^
/usr/local/include/pcap/pcap.h:617:1: note: 'pcap_compile_nopcap' has been explicitly marked deprecated here
PCAP_DEPRECATED("use pcap_open_dead(), pcap_compile() and pcap_close()")
^
/usr/local/include/pcap/funcattrs.h:307:47: note: expanded from macro 'PCAP_DEPRECATED'
#define PCAP_DEPRECATED(msg) attribute((deprecated(msg)))
^
2 warnings generated.
/usr/bin/clang -bundle -undefined dynamic_lookup -arch i386 -arch x86_64 -g build/temp.macosx-10.6-intel-2.7/pcap.o build/temp.macosx-10.6-intel-2.7/pcap_ex.o -L/usr/local/lib -lpcap -o build/lib.macosx-10.6-intel-2.7/pcap.so
ld: warning: The i386 architecture is deprecated for macOS (remove from the Xcode build setting: ARCHS)
ld: warning: ignoring file /usr/local/lib/libpcap.dylib, missing required architecture i386 in file /usr/local/lib/libpcap.dylib (2 slices)
ld: warning: ignoring file /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/libSystem.tbd, missing required architecture i386 in file /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/libSystem.tbd (3 slices)
ld: dynamic main executables must link with libSystem.dylib for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command '/usr/bin/clang' failed with exit status 1
It also failed when I use pip install: pip2 install pypcap
/usr/local/include/pcap/pcap.h:394:1: note: 'pcap_lookupdev' has been explicitly marked deprecated here
PCAP_DEPRECATED("use 'pcap_findalldevs' and use the first device")
^
/usr/local/include/pcap/funcattrs.h:307:47: note: expanded from macro 'PCAP_DEPRECATED'
#define PCAP_DEPRECATED(msg) attribute((deprecated(msg)))
^
pcap_ex.c:292:10: warning: 'pcap_compile_nopcap' is deprecated: use pcap_open_dead(), pcap_compile() and pcap_close() [-Wdeprecated-declarations]
return (pcap_compile_nopcap(snaplen, dlt, fp, str, optimize, netmask));
^
/usr/local/include/pcap/pcap.h:617:1: note: 'pcap_compile_nopcap' has been explicitly marked deprecated here
PCAP_DEPRECATED("use pcap_open_dead(), pcap_compile() and pcap_close()")
^
/usr/local/include/pcap/funcattrs.h:307:47: note: expanded from macro 'PCAP_DEPRECATED'
#define PCAP_DEPRECATED(msg) attribute((deprecated(msg)))
^
2 warnings generated.
creating build/lib.macosx-10.6-intel-2.7
/usr/bin/clang -bundle -undefined dynamic_lookup -arch i386 -arch x86_64 -g build/temp.macosx-10.6-intel-2.7/pcap.o build/temp.macosx-10.6-intel-2.7/pcap_ex.o -L/usr/local/lib -lpcap -o build/lib.macosx-10.6-intel-2.7/pcap.so
ld: warning: The i386 architecture is deprecated for macOS (remove from the Xcode build setting: ARCHS)
ld: warning: ignoring file /usr/local/lib/libpcap.dylib, missing required architecture i386 in file /usr/local/lib/libpcap.dylib (2 slices)
ld: warning: ignoring file /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/libSystem.tbd, missing required architecture i386 in file /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/libSystem.tbd (3 slices)
ld: dynamic main executables must link with libSystem.dylib for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command '/usr/bin/clang' failed with exit status 1