Wireshark-dev: Re: [Wireshark-dev] Building with CMake on Win10 and VS2013 (win64)
From: Graham Bloice <graham.bloice@xxxxxxxxxxxxx>
Date: Wed, 30 Mar 2016 08:56:23 +0100


On 29 March 2016 at 20:14, Michael Mann <mmann78@xxxxxxxxxxxx> wrote:
I had gotten CMake to build on my setup a few months back, but it was a bit "quirky" (I had to keep deleting and regenerating the build directory because consecutive rebuilds would fail).
I tried again with a more recent version of master (maybe a week old at this point) and can't seem to get the setup to complete (following https://www.wireshark.org/docs/wsdg_html_chunked/ChSetupWin32.html) .  Attached is the log file generated, with terminal output below.  It feels like I'm just missing a simple build option in my setup, something to determine 64 vs 32 bit (or X86 vs X64), because I would think configuration would be smart enough to determine the endianness of Windows.
Vitals: Windows 10, VS2013 (Community Edition), trying to build 64-bit Wireshark.
 
c:\wireshark>mysetup.bat
c:\wireshark>set CYGWIN=nodosfilewarning
c:\wireshark>set WIRESHARK_BASE_DIR=C:\wireshark
c:\wireshark>set WIRESHARK_TARGET_PLATFORM=win64
c:\wireshark>set QT5_BASE_DIR=C:\Qt\5.5\msvc2013_64
c:\wireshark>set PLATFORM=x64
c:\wireshark>mkdir wsbuild64
c:\wireshark>cd wsbuild64
c:\wireshark\wsbuild64>..\mygenbuild.bat
c:\wireshark\wsbuild64>cmake -DPYTHON_EXECUTABLE=c:/Python27/python -DENABLE_CHM_GUIDES=on -G "Visual Studio 12 Win64" ..\..\wireshark
-- The C compiler identification is MSVC 18.0.40629.0
-- The CXX compiler identification is MSVC 18.0.40629.0
-- Check for working C compiler using: Visual Studio 12 2013 Win64
-- Check for working C compiler using: Visual Studio 12 2013 Win64 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler using: Visual Studio 12 2013 Win64
-- Check for working CXX compiler using: Visual Studio 12 2013 Win64 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Generating build using CMake 3.4.1
-- Building for win64 using Visual Studio 12 2013 Win64
Working in C:\wireshark\wireshark-win64-libs
Tag 2015-12-11 found. Skipping.
-- No custom file found in C:/wireshark
-- Configuration types: Debug;Release;MinSizeRel;RelWithDebInfo
-- CMAKE_C_FLAGS_RELWITHDEBINFO: /MD /Zi /O2 /Ob1 /D NDEBUG
-- CMAKE_CXX_FLAGS_RELWITHDEBINFO: /MD /Zi /O2 /Ob1 /D NDEBUG
-- V: 2.1.0, MaV: 2, MiV: 1, PL: 0, EV: .
-- Found PythonInterp: c:/Python27/python (found version "2.7.11")
-- Checking for c-compiler flag: /MP
-- Checking for c-compiler flag: /Zo
-- Checking for c-compiler flag: /w34295 /w34189
-- Checking for c++-compiler flag: /MP
-- Checking for c++-compiler flag: /Zo
-- Checking for c++-compiler flag: /w34295 /w34189
statuscheck linker flag - test linker flags: -Wl,--as-needed
statuscheck linker flag - test linker flags: -pie
-- Packagelist: AIRPCAP;CAP;CARES;GCRYPT;GEOIP;GLIB2;GMODULE2;GNUTLS;GTHREAD2;GTK2;Gettext;Git;HtmlViewer;KERBEROS;LEX;LIBSSH;LUA;M;PCAP;POD;PORTAUDIO;Perl;PythonInterp;Qt5Core;Qt5LinguistTools;Qt5Multimedia;Qt5PrintSupport;Qt5Svg;Qt5Widgets;Qt5WinExtras;SBC;SED;SETCAP;SH;SMI;WINSPARKLE;YACC;YAPP;ZLIB
-- AIRPCAP FOUND
-- AIRPCAP includes: C:/wireshark/wireshark-win64-libs/AirPcap_Devpack_4_1_0_1622/Airpcap_Devpack/include
-- AIRPCAP libs: C:/wireshark/wireshark-win64-libs/AirPcap_Devpack_4_1_0_1622/Airpcap_Devpack/lib/airpcap.lib
-- Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE)
-- Checking for one of the modules 'libcap'
-- Could NOT find CAP (missing:  CAP_LIBRARY CAP_INCLUDE_DIR)
-- CAP NOT FOUND
-- CARES FOUND
-- CARES includes: C:/wireshark/wireshark-win64-libs/c-ares-1.9.1-1-win64ws/include
-- CARES libs: C:/wireshark/wireshark-win64-libs/c-ares-1.9.1-1-win64ws/lib/libcares-2.lib
-- GCRYPT FOUND
-- GCRYPT includes: C:/wireshark/wireshark-win64-libs/gnutls-3.2.15-2.9-win64ws/include
-- GCRYPT libs: C:/wireshark/wireshark-win64-libs/gnutls-3.2.15-2.9-win64ws/bin/libgcrypt-20.lib;C:/wireshark/wireshark-win64-libs/gnutls-3.2.15-2.9-win64ws/bin/libgpg-error6-0.lib
-- Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE)
-- Checking for one of the modules 'geoip'
-- GEOIP FOUND
-- GEOIP includes: C:/wireshark/wireshark-win64-libs/GeoIP-1.6.6-win64ws/include
-- GEOIP libs: C:/wireshark/wireshark-win64-libs/GeoIP-1.6.6-win64ws/lib/libGeoIP-1.lib
-- Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE)
-- Checking for one of the modules 'glib-2.0>=2.14.0'
-- GLIB2 FOUND
-- GLIB2 includes: C:/wireshark/wireshark-win64-libs/gtk2/include/glib-2.0;C:/wireshark/wireshark-win64-libs/gtk2/lib/glib-2.0/include
-- GLIB2 libs: C:/wireshark/wireshark-win64-libs/gtk2/lib/glib-2.0.lib
-- Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE)
-- Checking for one of the modules 'gmodule-2.0'
-- GMODULE2 FOUND
-- GMODULE2 includes: C:/wireshark/wireshark-win64-libs/gtk2/include/glib-2.0
-- GMODULE2 libs: C:/wireshark/wireshark-win64-libs/gtk2/lib/gmodule-2.0.lib
-- Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE)
-- Checking for one of the modules 'gnutls'
-- GNUTLS FOUND
-- GNUTLS includes: C:/wireshark/wireshark-win64-libs/gnutls-3.2.15-2.9-win64ws/include
-- GNUTLS libs: C:/wireshark/wireshark-win64-libs/gnutls-3.2.15-2.9-win64ws/bin/libgnutls-28.lib
-- Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE)
-- Checking for one of the modules 'gthread-2.0'
-- GTHREAD2 FOUND
-- GTHREAD2 includes: C:/wireshark/wireshark-win64-libs/gtk2/include/glib-2.0/glib
-- GTHREAD2 libs: C:/wireshark/wireshark-win64-libs/gtk2/lib/glib-2.0.lib
-- GTK2 FOUND
-- GTK2 includes: C:/wireshark/wireshark-win64-libs/gtk2/include/gtk-2.0;C:/wireshark/wireshark-win64-libs/gtk2/include;C:/wireshark/wireshark-win64-libs/gtk2/include/freetype2;C:/wireshark/wireshark-win64-libs/gtk2/include/glib-2.0;C:/wireshark/wireshark-win64-libs/gtk2/lib/glib-2.0/include;C:/wireshark/wireshark-win64-libs/gtk2/include/atk-1.0;C:/wireshark/wireshark-win64-libs/gtk2/include/gdk-pixbuf-2.0;C:/wireshark/wireshark-win64-libs/gtk2/include/cairo;C:/wireshark/wireshark-win64-libs/gtk2/include/pango-1.0;C:/wireshark/wireshark-win64-libs/gtk2/lib/gtk-2.0/include
-- GTK2 libs: C:/wireshark/wireshark-win64-libs/gtk2/lib/glib-2.0.lib;C:/wireshark/wireshark-win64-libs/gtk2/lib/gobject-2.0.lib;C:/wireshark/wireshark-win64-libs/gtk2/lib/atk-1.0.lib;C:/wireshark/wireshark-win64-libs/gtk2/lib/gmodule-2.0.lib;C:/wireshark/wireshark-win64-libs/gtk2/lib/gdk_pixbuf-2.0.lib;C:/wireshark/wireshark-win64-libs/gtk2/lib/cairo.lib;C:/wireshark/wireshark-win64-libs/gtk2/lib/pango-1.0.lib;C:/wireshark/wireshark-win64-libs/gtk2/lib/pangocairo-1.0.lib;C:/wireshark/wireshark-win64-libs/gtk2/lib/gdk-win32-2.0.lib;C:/wireshark/wireshark-win64-libs/gtk2/lib/gtk-win32-2.0.lib
-- Could NOT find Gettext (missing:  GETTEXT_MSGMERGE_EXECUTABLE GETTEXT_MSGFMT_EXECUTABLE)
-- GETTEXT NOT FOUND
-- Git FOUND
-- Git includes:
-- Git libs:
-- HTML_VIEWER NOT FOUND
-- Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE)
-- Checking for one of the modules 'krb5;mit-krb5;heimdal-krb5'
-- KERBEROS FOUND
-- KERBEROS includes: C:/wireshark/wireshark-win64-libs/kfw-3-2-2-x64-ws/include
-- KERBEROS libs: C:/wireshark/wireshark-win64-libs/kfw-3-2-2-x64-ws/lib/krb5_64.lib
-- LEX FOUND
-- LEX includes:
-- LEX libs:
-- LEX executable: C:/cygwin64/bin/flex.exe
-- Could NOT find LIBSSH (missing:  LIBSSH_LIBRARIES LIBSSH_INCLUDE_DIRS LIBSSH_VERSION) (Required is at least version "0.6")
-- LIBSSH NOT FOUND
-- Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE)
-- Checking for one of the modules 'lua5.2;lua-5.2;lua52;lua5.1;lua-5.1;lua51;lua5.0;lua-5.0;lua50'
-- Checking for one of the modules 'lua<=5.2.99'
-- LUA FOUND
-- LUA includes: C:/wireshark/wireshark-win64-libs/lua5.2.3/include
-- LUA libs: C:/wireshark/wireshark-win64-libs/lua5.2.3/lua52.lib
-- Could NOT find M (missing:  M_LIBRARY M_INCLUDE_DIR)
-- M NOT FOUND
-- PCAP FOUND
-- PCAP includes: C:/wireshark/wireshark-win64-libs/WpdPack/Include
-- PCAP libs: C:/wireshark/wireshark-win64-libs/WpdPack/Lib/x64/wpcap.lib
-- POD FOUND
-- POD includes:
-- POD libs:
-- Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE)
-- Checking for one of the modules 'portaudio-2.0'
-- PORTAUDIO FOUND
-- PORTAUDIO includes: C:/wireshark/wireshark-win64-libs/portaudio_v19_2/include;C:/wireshark/wireshark-win64-libs/portaudio_v19_2/src/common;C:/wireshark/wireshark-win64-libs/portaudio_v19_2/src/os/win
-- PORTAUDIO libs:
-- PERL FOUND
-- Perl includes:
-- Perl libs:
-- Perl executable: C:/cygwin64/bin/perl.exe
-- Found PythonInterp: c:/Python27/python (found suitable version "2.7.11", minimum required is "2")
-- PYTHONINTERP FOUND
-- PythonInterp includes:
-- PythonInterp libs:
-- Qt5Core FOUND
-- Qt5Core includes: C:/Qt/5.5/msvc2013_64/include/;C:/Qt/5.5/msvc2013_64/include/QtCore;C:/Qt/5.5/msvc2013_64/.//mkspecs/win32-msvc2013
-- Qt5Core libs: Qt5::Core
-- Qt5Core definitions: -DQT_CORE_LIB
-- Qt5LinguistTools FOUND
-- Qt5LinguistTools includes:
-- Qt5LinguistTools libs:
-- Qt5Multimedia FOUND
-- Qt5Multimedia includes: C:/Qt/5.5/msvc2013_64/include/;C:/Qt/5.5/msvc2013_64/include/QtMultimedia;C:/Qt/5.5/msvc2013_64/include/QtNetwork;C:/Qt/5.5/msvc2013_64/include/QtCore;C:/Qt/5.5/msvc2013_64/.//mkspecs/win32-msvc2013;C:/Qt/5.5/msvc2013_64/include/QtGui
-- Qt5Multimedia libs: Qt5::Multimedia
-- Qt5Multimedia definitions: -DQT_MULTIMEDIA_LIB;-DQT_NETWORK_LIB;-DQT_CORE_LIB;-DQT_GUI_LIB
-- Qt5PrintSupport FOUND
-- Qt5PrintSupport includes: C:/Qt/5.5/msvc2013_64/include/;C:/Qt/5.5/msvc2013_64/include/QtPrintSupport;C:/Qt/5.5/msvc2013_64/include/QtWidgets;C:/Qt/5.5/msvc2013_64/include/QtGui;C:/Qt/5.5/msvc2013_64/include/QtCore;C:/Qt/5.5/msvc2013_64/.//mkspecs/win32-msvc2013
-- Qt5PrintSupport libs: Qt5::PrintSupport
-- Qt5PrintSupport definitions: -DQT_PRINTSUPPORT_LIB;-DQT_WIDGETS_LIB;-DQT_GUI_LIB;-DQT_CORE_LIB
-- Qt5Svg FOUND
-- Qt5Svg includes: C:/Qt/5.5/msvc2013_64/include/;C:/Qt/5.5/msvc2013_64/include/QtSvg;C:/Qt/5.5/msvc2013_64/include/QtWidgets;C:/Qt/5.5/msvc2013_64/include/QtGui;C:/Qt/5.5/msvc2013_64/include/QtCore;C:/Qt/5.5/msvc2013_64/.//mkspecs/win32-msvc2013
-- Qt5Svg libs: Qt5::Svg
-- Qt5Svg definitions: -DQT_SVG_LIB;-DQT_WIDGETS_LIB;-DQT_GUI_LIB;-DQT_CORE_LIB
-- Qt5Widgets FOUND
-- Qt5Widgets includes: C:/Qt/5.5/msvc2013_64/include/;C:/Qt/5.5/msvc2013_64/include/QtWidgets;C:/Qt/5.5/msvc2013_64/include/QtGui;C:/Qt/5.5/msvc2013_64/include/QtCore;C:/Qt/5.5/msvc2013_64/.//mkspecs/win32-msvc2013
-- Qt5Widgets libs: Qt5::Widgets
-- Qt5Widgets definitions: -DQT_WIDGETS_LIB;-DQT_GUI_LIB;-DQT_CORE_LIB
-- Qt5WinExtras FOUND
-- Qt5WinExtras includes: C:/Qt/5.5/msvc2013_64/include/;C:/Qt/5.5/msvc2013_64/include/QtWinExtras;C:/Qt/5.5/msvc2013_64/include/QtGui;C:/Qt/5.5/msvc2013_64/include/QtCore;C:/Qt/5.5/msvc2013_64/.//mkspecs/win32-msvc2013
-- Qt5WinExtras libs: Qt5::WinExtras
-- Qt5WinExtras definitions: -DQT_WINEXTRAS_LIB;-DQT_GUI_LIB;-DQT_CORE_LIB
-- Could NOT find SBC (missing:  SBC_INCLUDE_DIR SBC_LIBRARY)
-- SBC NOT FOUND
-- SED FOUND
-- SED includes:
-- SED libs:
-- SED executable: C:/cygwin64/bin/sed.exe
-- Could NOT find SETCAP (missing:  SETCAP_EXECUTABLE)
-- SETCAP NOT FOUND
-- SH FOUND
-- SH includes:
-- SH libs:
-- SH executable: C:/cygwin64/bin/bash.exe
-- SMI FOUND
-- SMI includes: C:/wireshark/wireshark-win64-libs/libsmi-svn-40773-win64ws/include
-- SMI libs: C:/wireshark/wireshark-win64-libs/libsmi-svn-40773-win64ws/lib/libsmi-2.lib
-- WINSPARKLE FOUND
-- WINSPARKLE includes: C:/wireshark/wireshark-win64-libs/WinSparkle-0.3-44-g2c8d9d3-win64ws
-- WINSPARKLE libs: C:/wireshark/wireshark-win64-libs/WinSparkle-0.3-44-g2c8d9d3-win64ws/WinSparkle.lib
-- YACC FOUND
-- YACC includes:
-- YACC libs:
-- YACC executable: C:/cygwin64/bin/bison.exe
-- Could NOT find YAPP (missing:  YAPP_EXECUTABLE)
-- YAPP NOT FOUND
-- ZLIB FOUND
-- ZLIB includes: C:/wireshark/wireshark-win64-libs/zlib-1.2.8-ws;C:/wireshark/zlib
-- ZLIB libs: zlib
-- C-Flags:   /DWIN32 /D_WINDOWS /W3
-- CXX-Flags:   /DWIN32 /D_WINDOWS /W3 /GR /EHsc
-- Warnings as errors: /WX
-- Check if the system is big endian
-- Searching 16 bit integer
CMake Error at C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/TestBigEndian.cmake:51 (message):
  no suitable type found
Call Stack (most recent call first):
  CMakeLists.txt:1008 (test_big_endian)

-- Configuring incomplete, errors occurred!
See also "C:/wireshark/CMakeFiles/CMakeOutput.log".
c:\wireshark\wsbuild64>
 
 


I'm sure I've seen this error before, but for the life of me can't remember what the solution was.

Have you inadvertently used that build dir for an x86 build or is it a fresh build dir?

In your setup, there should be no need for the PLATFORM= line, the Visual Studio environment batch file sets that.  There is also no need to pass in the python path to CMake.

You are using a cmd shell that has been prepped for an x64 build?

--
Graham Bloice