Ask Your Question

Revision history [back]

Error occured in wireshark when run "make"

I'm try to compile wireshark in my computer, but an error occurred when I run make command. My system is centos7, kernel is 3.10.0-957.1.3.el7.x86_64. I download the wireshark source code version 3.0.0 from official site download url:

https://1.as.dl.wireshark.org/src/wireshark-3.0.0.tar.xz

I have installed cmake3 by yum

Installed Packages
Name        : cmake3
Arch        : x86_64
Version     : 3.13.4
Release     : 1.el7
Size        : 22 M
Repo        : installed
From repo   : epel

Then I run cmake3, the output is

-- The following OPTIONAL packages have been found:

* Git
* GMODULE2
* Gettext
* LIBSSH (required version >= 0.6), Library for implementing SSH 
  clients, extcap remote SSH interfaces (sshdump, ciscodump)
* PCAP
* Systemd, System and Service Manager (libraries), Support for systemd journal extcap interface (sdjournal)
* GNUTLS (required version >= 3.2.0)
* KERBEROS
* CARES (required version >= 1.5.0), Library for asynchronous DNS requests, DNS name resolution for captures
* ZLIB
* LUA (required version >= 5.1)
* NL, Libraries for using the Netlink protocol on Linux,  Support for managing wireless 802.11 interfaces
* LibXml2
* PkgConfig
* CAP
* SETCAP
* POD
* DOXYGEN
* Asciidoctor (required version >= 1.5)
* XSLTPROC

-- The following REQUIRED packages have been found:

* GLIB2
* GTHREAD2
* GCRYPT (required version >= 1.4.2)
* LEX
* YACC
* Perl
* Python3 (required version >= 3.4)
* M
* Qt5Core
* Qt5LinguistTools
* Qt5Network (required version >= 5.9.2)
* Qt5Gui (required version >= 5.9.2)
* Qt5Multimedia
* Qt5PrintSupport
* Qt5Svg
* Qt5Widgets

-- The following OPTIONAL packages have not been found:

* MaxMindDB, C library for the MaxMind DB file format, Support for GeoIP lookup
* SMI
* LZ4, LZ4 is lossless compression algorithm used in some protocol (CQL...), LZ4 decompression in CQL and Kafka dissectors
* SNAPPY, A fast compressor/decompressor from Google, Snappy decompression in CQL and Kafka dissectors
* NGHTTP2, HTTP/2 C library and tools, Header decompression in HTTP2
* SBC, Bluetooth low-complexity, subband codec (SBC) decoder, Support for playing SBC codec in RTP player
* SPANDSP, a library of many DSP functions for telephony, Support for G.722 and G.726 codecs in RTP player
* BCG729, G.729 decoder, Support for G.729 codec in RTP player

I think REQUIRED package all installed, so I didnt install rest OPTIONAL package.Then I run make, the error output is

...
Scanning dependencies of target wireshark
[ 94%] Building C object CMakeFiles/wireshark.dir/capture_info.c.o
[ 94%] Building C object CMakeFiles/wireshark.dir/file.c.o
[ 94%] Building C object CMakeFiles/wireshark.dir/fileset.c.o    
[ 94%] Linking CXX executable run/wireshark
ui/qt/CMakeFiles/qtui.dir/capture_interfaces_dialog.cpp.o: In function `InterfaceTreeDelegate::~InterfaceTreeDelegate()':
/home/red/Sources/wireshark-3.0.0/ui/qt/capture_interfaces_dialog.cpp:1184: undefined reference to `vtable for InterfaceTreeDelegate'
ui/qt/CMakeFiles/qtui.dir/capture_interfaces_dialog.cpp.o: In function `CaptureInterfacesDialog::~CaptureInterfacesDialog()':
/home/red/Sources/wireshark-3.0.0/ui/qt/capture_interfaces_dialog.cpp:330: undefined reference to `vtable for CaptureInterfacesDialog'
ui/qt/CMakeFiles/qtui.dir/capture_interfaces_dialog.cpp.o: In function `CaptureInterfacesDialog::tr(char const*, char const*, int)':
/home/red/Sources/wireshark-3.0.0/ui/qt/capture_interfaces_dialog.h:57: undefined reference to `CaptureInterfacesDialog::staticMetaObject'
ui/qt/CMakeFiles/qtui.dir/capture_interfaces_dialog.cpp.o: In function `InterfaceTreeDelegate::InterfaceTreeDelegate(QObject*)':
/home/red/Sources/wireshark-3.0.0/ui/qt/capture_interfaces_dialog.cpp:1179: undefined reference to `vtable for InterfaceTreeDelegate'
ui/qt/CMakeFiles/qtui.dir/capture_interfaces_dialog.cpp.o: In function `CaptureInterfacesDialog::interfaceSelected()':
/home/red/Sources/wireshark-3.0.0/ui/qt/capture_interfaces_dialog.cpp:288: undefined reference to `CaptureInterfacesDialog::interfacesChanged()'
ui/qt/CMakeFiles/qtui.dir/capture_interfaces_dialog.cpp.o: In function `CaptureInterfacesDialog::CaptureInterfacesDialog(QWidget*)':
/home/red/Sources/wireshark-3.0.0/ui/qt/capture_interfaces_dialog.cpp:176: undefined reference to `vtable for CaptureInterfacesDialog'
ui/qt/CMakeFiles/qtui.dir/capture_interfaces_dialog.cpp.o: In function `CaptureInterfacesDialog::tr(char const*, char const*, int)':
/home/red/Sources/wireshark-3.0.0/ui/qt/capture_interfaces_dialog.h:57: undefined reference to `CaptureInterfacesDialog::staticMetaObject'
/home/red/Sources/wireshark-3.0.0/ui/qt/capture_interfaces_dialog.h:57: undefined reference to `CaptureInterfacesDialog::staticMetaObject'
/home/red/Sources/wireshark-3.0.0/ui/qt/capture_interfaces_dialog.h:57: undefined reference to `CaptureInterfacesDialog::staticMetaObject'
/home/red/Sources/wireshark-3.0.0/ui/qt/capture_interfaces_dialog.h:57: undefined reference to `CaptureInterfacesDialog::staticMetaObject'
/home/red/Sources/wireshark-3.0.0/ui/qt/capture_interfaces_dialog.h:57: undefined reference to `CaptureInterfacesDialog::staticMetaObject'   
ui/qt/CMakeFiles/qtui.dir/capture_interfaces_dialog.cpp.o:/home/red/Sources/wireshark-3.0.0/ui/qt/capture_interfaces_dialog.h:57: more undefined references to `CaptureInterfacesDialog::staticMetaObject' follow
ui/qt/CMakeFiles/qtui.dir/capture_interfaces_dialog.cpp.o: In function `CaptureInterfacesDialog::on_buttonBox_accepted()':
/home/red/Sources/wireshark-3.0.0/ui/qt/capture_interfaces_dialog.cpp:519: undefined reference to `CaptureInterfacesDialog::setFilterValid(bool, QString)'
ui/qt/CMakeFiles/qtui.dir/capture_interfaces_dialog.cpp.o: In function `CaptureInterfacesDialog::tr(char const*, char const*, int)':
/home/red/Sources/wireshark-3.0.0/ui/qt/capture_interfaces_dialog.h:57: undefined reference to `CaptureInterfacesDialog::staticMetaObject'
/home/red/Sources/wireshark-3.0.0/ui/qt/capture_interfaces_dialog.h:57: undefined reference to `CaptureInterfacesDialog::staticMetaObject'
/home/red/Sources/wireshark-3.0.0/ui/qt/capture_interfaces_dialog.h:57: undefined reference to `CaptureInterfacesDialog::staticMetaObject'
ui/qt/CMakeFiles/qtui.dir/capture_interfaces_dialog.cpp.o: In function `CaptureInterfacesDialog::refreshInterfaceList()':
/home/red/Sources/wireshark-3.0.0/ui/qt/capture_interfaces_dialog.cpp:763: undefined reference to `CaptureInterfacesDialog::interfaceListChanged()'
collect2: error: ld returned 1 exit status
make[2]: *** [run/wireshark] Error 1
make[1]: *** [CMakeFiles/wireshark.dir/all] Error 2
make: *** [all] Error 2

I have no idea how could this happen, and I can't google something about the problem while compiling wireshark. Do you have any suggestions? BTW, I'm not native speaker, hope you can understand my grammar :)