运行“ make”时,wireshark中发生错误

时间:2019-03-04 11:20:12

标签: linux makefile centos wireshark

我正在尝试在计算机中编译Wireshark,但是运行make命令时发生了错误。 我的系统是centos7,内核是3.10.0-957.1.3.el7.x86_64。我从官方网站的下载URL下载Wireshark的源代码版本3.0.0

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

我已经通过yum安装了cmake3

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

然后我运行cmake3,输出为

-- 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

我认为所有必需的软件包都已安装,因此我没有安装其余的可选软件包。然后我运行make,错误输出为

...
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

我不知道这怎么会发生,并且在编译Wireshark时我无法在Google上找到有关该问题的信息。你有什么建议吗? 顺便说一句,我不是母语人士,希望您能理解我的语法:)

0 个答案:

没有答案