This is our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

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's gravatar image

Water
6447
accept rate: 0%

edited 03 Jun '16, 01:33

grahamb's gravatar image

grahamb ♦
19.8k330206


This two lines from the setup shouldn't be required:

set  VISUALSTUDIOVERSION=12.0
set MSVC_VARIANT=MSVC2013EE

Cmake is having difficulties with your build environment, there are at least 2 issues shown, one with zlib and one with glib.

For zlib, can you confirm that E:\Wireshark_Plugin\SecVersion\wireshark\Wireshark-win64-libs contains the file zlib-1.2.8-ws.zip and the directory zlib-1.2.8-ws?

For glib can you confirm the same directory contain the file gtk+-bundle_2.24.23-3.39_win64ws.zip and the directory gtk2?

permanent link

answered 03 Jun '16, 01:39

grahamb's gravatar image

grahamb ♦
19.8k330206
accept rate: 22%

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

(31 Oct '16, 04:57) xaheen
1

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:

C:\Development - Top-level dir
C:\Development\wireshark - source code, preferably from a Git clone.
C:\Development\wsbuild32 - 32 bit build directory
C:\Development\wsbuild64 - 64 bit build directory

and after running the CMake generation step, the third party libraries will be installed in:

C:\Development\wireshark-win32-libs
C:\Development\wireshark-win64-libs

and the environment variable WIRESHARK_BASE_DIR is set to C:\Development or as appropriate for your top-level directory

(31 Oct '16, 05:21) grahamb ♦

@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! :/

(31 Oct '16, 06:17) xaheen

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.

(31 Oct '16, 06:46) grahamb ♦

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

(31 Oct '16, 07:03) xaheen
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×41
×15
×1

question asked: 03 Jun '16, 00:29

question was seen: 2,206 times

last updated: 31 Oct '16, 07:03

p​o​w​e​r​e​d by O​S​Q​A