I tried to compile wireshark source code with CMAKE,however failed.And I could not figure out the cause.Any suggestions from you are appreciated,thanks a lot.
environment setting is as below:---->
call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86_amd64
set WIRESHARK_BASE_DIR=E:\Wireshark_Plugin\SecVersion\wireshark-master
set WIRESHARK_CYGWIN_INSTALL_PATH=E:\Software\Cygwin\bin
set WIRESHARK_TARGET_PLATFORM=win64
set QT5_BASE_DIR=E:\Software\QT\5.6\msvc2013_64
set VISUALSTUDIOVERSION=12.0
set MSVC_VARIANT=MSVC2013EE
e:
cd E:\Wireshark_Plugin\SecVersion\wsbuild
cmake -DENABLE_CHM_GUIDES=on -G "Visual Studio 12 Win64" ..\wireshark-master
pause
COMPILE result is as below------>
-- Found python module asn2wrs: E:\Wireshark_Plugin\SecVersion\wireshark\tools\asn2wrs.py
-- Checking for c-compiler flag: /MP
-- Performing Test C__MP_VALID
-- Performing Test C__MP_VALID - Success
-- Checking for c-compiler flag: /Zo
-- Performing Test C__Zo_VALID
-- Performing Test C__Zo_VALID - Success
-- Checking for c-compiler flag: /w34295 /w34189
-- Performing Test C__w34295_w34189_VALID
-- Performing Test C__w34295_w34189_VALID - Success
-- Checking for c++-compiler flag: /MP
-- Performing Test CXX__MP_VALID
-- Performing Test CXX__MP_VALID - Success
-- Checking for c++-compiler flag: /Zo
-- Performing Test CXX__Zo_VALID
-- Performing Test CXX__Zo_VALID - Success
-- Checking for c++-compiler flag: /w34295 /w34189
-- Performing Test CXX__w34295_w34189_VALID
-- Performing Test CXX__w34295_w34189_VALID - Success
statuscheck linker flag - test linker flags: -Wl,--as-needed
-- Performing Test WS_LD_FLAG_VALID0
-- Performing Test WS_LD_FLAG_VALID0 - Failed
statuscheck linker flag - test linker flags: -pie
-- Performing Test WS_LD_FLAG_VALID1
-- Performing Test WS_LD_FLAG_VALID1 - Failed
CMake Error at CMakeLists.txt:766 (add_subdirectory):
add_subdirectory given source "
E:/Wireshark_Plugin/SecVersion/wireshark/Wireshark-win64-libs/zlib-1.2.8-ws" which is not an existing directory.
CMake Error at CMakeLists.txt:771 (set_target_properties): set_target_properties Can not find target to add properties to: zlib
CMake Error at CMakeLists.txt:773 (set_target_properties): set_target_properties Can not find target to add properties to: zlibstatic
-- Packagelist: AIRPCAP;CARES;GCRYPT;GEOIP;GLIB2;GMODULE2;GNUTLS;GTHREAD2;GTK2;Gettext;Git;KERBEROS;LEX;LIBSSH;LUA;M;PCAP;POD;PORTAUDIO;Perl;PythonInterp;Qt5Core;Qt5LinguistTools;Qt5Multimedia;Qt5PrintSupport;Qt5Svg;Qt5Widgets;Qt5WinExtras;SBC;SED;SH;SMI;WINSPARKLE;YACC;YAPP;ZLIB
-- Could NOT find AIRPCAP (missing: AIRPCAP_INCLUDE_DIR AIRPCAP_LIBRARY)
-- AIRPCAP NOT FOUND
-- Could NOT find CARES (missing: CARES_LIBRARY CARES_INCLUDE_DIR)
-- CARES NOT FOUND
-- Could NOT find GCRYPT (missing: GCRYPT_LIBRARY GCRYPT_INCLUDE_DIR) (Required is at least version "1.4.2")
-- GCRYPT NOT FOUND
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Checking for one of the modules 'geoip'
-- Could NOT find GEOIP (missing: GEOIP_LIBRARY GEOIP_INCLUDE_DIR)
-- GEOIP NOT FOUND
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Checking for one of the modules 'glib-2.0>=2.14.0'
CMake Error at E:/Software/CMake/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
Could NOT find GLIB2 (missing: GLIB2_LIBRARY GLIB2_MAIN_INCLUDE_DIR)
Call Stack (most recent call first):
E:/Software/CMake/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE)
cmake/modules/FindGLIB2.cmake:90 (find_package_handle_standard_args)
CMakeLists.txt:835 (find_package)
– Configuring incomplete, errors occurred!
asked 03 Jun ‘16, 00:29
Water
6●4●4●7
accept rate: 0%
edited 03 Jun ‘16, 01:33
grahamb ♦
19.8k●3●30●206
@grahamb I have the exact same Problem. I can congfirm that, zlib-1.2.8-ws.zip,zlib-1.2.8-ws and gtk+-bundle_2.24.23-3.39_win64ws.zip and the directory gtk2 are available in the indicated Directory. What could be the solution now?
The OP has a different directory layout from that recommended in the Developers Guide (and as used by myself), it's possible that may be causing the issues.
The recommended layout (you can modify the drive and top-level dir, but keep everything the same below that) is:
and after running the CMake generation step, the third party libraries will be installed in:
and the environment variable
WIRESHARK_BASE_DIR
is set toC:\Development
or as appropriate for your top-level directory@grahamb I have the exact same Directory Setup. I had 100% success with 64bit. but for some weird reason having issues with 32bit. "C:\Development\wireshark-win32-libs" has been generated and all the files that CMake is showing missing is there....I have no clue what to do now! :/
I think you need to start your own question posting the output of the CMake Generation step along with the environment variables you're using so we can help specifically there.
The issue is solved. I have restarted the Computer and started the whole process and it works just fine :D Thanks a lot for your Support and quick answers. @grahamb