# problem compiling tshark statically

I've been banging my head against this for 2 weeks. I'm not a developer, but I can generally use things pretty well. I'm running into this error while trying to compile wireshark statically -

tje210:/wireshark/build $cmake .. (lots of output...) -- Found PCAP: /usr/lib/x86_64-linux-gnu/libpcap.a -- Looking for pcap_lib_version -- Looking for pcap_lib_version - not found CMake Error at cmake/modules/FindPCAP.cmake:212 (message): You need libpcap 0.8 or later Call Stack (most recent call first): CMakeLists.txt:1162 (find_package) CMakeLists.txt:1211 (ws_find_package) (end output) How do I give cmake what it wants? The problem doesn't happen when I have these options - option(ENABLE_STATIC "Build Wireshark libraries statically" ON) option(USE_STATIC "Always link statically with external libraries" ON) set to OFF. edit retag close merge delete ## 1 Answer Sort by » oldest newest most voted This is the check in FindPCAP.cmake:  # We check whether pcap_lib_version is defined in the pcap header, # using it as a proxy for all the 0.8 API's. if not, we fail. # check_symbol_exists( pcap_lib_version${PCAP_INCLUDE_DIR}/pcap.h HAVE_PCAP_LIB_VERSION )
if( NOT HAVE_PCAP_LIB_VERSION )
message(FATAL_ERROR "You need libpcap 0.8 or later")
endif( NOT HAVE_PCAP_LIB_VERSION )


Either the build can't find pcap.h or the version you have doesn't have:

PCAP_API const char *pcap_lib_version(void);


(PCAP_LIB_VERSION(3PCAP)
From pcap.h:

/*
* Version number of the current version of the pcap file format.
*
* NOTE: this is *NOT* the version number of the libpcap library.
* To fetch the version information for the version of libpcap
* you're using, use pcap_lib_version().
*/
#define PCAP_VERSION_MAJOR 2
#define PCAP_VERSION_MINOR 4


more