I am experiencing unexpected errors on compiling and building wireshark-2.2.4.tar.bz2 following the instructions in 2.2. Win32_64 Step-by-Step Guide.htm, using Microsoft Visual Studio 2013 under Windows 7 64 bit OS. All the environment variables appear to be fine, the various components (Qt, Python, Cygwin etc) are correctly found during the build and I am closely following the guide, with only the following exceptions:
PER GUIDE
Base directory for build = C:\Development
Subdirectory of base containing source files = C:\Development\wireshark
PER MY IMPLEMENTATION
Base directory for build = F:\Wireshark_Build
Subdirectory of base containing source files = F:\Wireshark_Build\wireshark_development
I'm not using Git.
** The original question as posted had lots of expected errors from the CMake test compilation steps for features and compiler\linker flags not present on windows. superfluous CMakeError log removed **
The exact CMake generation command which I used is:
cmake -DENABLE_CHM_GUIDES=on -G"Visual Studio 12 Win64" ..\Wireshark_development>> cmakegen.txt 2>&1
The contents of the cmakegen.txt file is pasted below:
-- The C compiler identification is MSVC 18.0.30723.0
-- The CXX compiler identification is MSVC 18.0.30723.0
-- Check for working C compiler: F:/Visual Studio 2013/VC/bin/x86_amd64/cl.exe
-- Check for working C compiler: F:/Visual Studio 2013/VC/bin/x86_amd64/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: F:/Visual Studio 2013/VC/bin/x86_amd64/cl.exe
-- Check for working CXX compiler: F:/Visual Studio 2013/VC/bin/x86_amd64/cl.exe -- 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.7.2
-- Found POWERSHELL: C:/Windows/System32/WindowsPowerShell/v1.0/powershell.exe
-- Building for win64 using Visual Studio 12 2013 Win64
Working in F:\Wireshark_Build\Wireshark-win64-libs-2.2
Tag 2016-12-12-2.2 found. Skipping.
– No custom file found in F:/Wireshark_Build/wireshark_development
– Configuration types: Debug;Release;MinSizeRel;RelWithDebInfo
– CMAKE_C_FLAGS_RELWITHDEBINFO: /MD /Zi /O2 /Ob1 /DNDEBUG
– CMAKE_CXX_FLAGS_RELWITHDEBINFO: /MD /Zi /O2 /Ob1 /DNDEBUG
– V: 2.2.4-OriginalVersion, MaV: 2, MiV: 2, PL: 4, EV: -OriginalVersion.
– Found PythonInterp: F:/Python/python.exe (found version "3.5.3")
– Found python module asn2wrs: F:\Wireshark_Build\wireshark_development\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
– Looking for sys/types.h
– Looking for sys/types.h - found
– Looking for stdint.h
– Looking for stdint.h - found
– Looking for stddef.h
– Looking for stddef.h - found
– Check size of off64_t
– Check size of off64_t - failed
– Looking for fseeko
– Looking for fseeko - not found
– Looking for unistd.h
– Looking for unistd.h - not found
– Packagelist: AIRPCAP;CAP;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;SETCAP;SH;SMI;WINSPARKLE;YACC;YAPP;ZLIB
– Found AIRPCAP: F:/Wireshark_Build/Wireshark-win64-libs-2.2/AirPcap_Devpack_4_1_0_1622/Airpcap_Devpack/include
– AIRPCAP FOUND
– AIRPCAP includes: F:/Wireshark_Build/Wireshark-win64-libs-2.2/AirPcap_Devpack_4_1_0_1622/Airpcap_Devpack/include
– AIRPCAP libs: F:/Wireshark_Build/Wireshark-win64-libs-2.2/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
– Found CARES: F:/Wireshark_Build/Wireshark-win64-libs-2.2/c-ares-1.12.0-win64ws/lib/libcares-2.lib
– CARES FOUND
– CARES includes: F:/Wireshark_Build/Wireshark-win64-libs-2.2/c-ares-1.12.0-win64ws/include
– CARES libs: F:/Wireshark_Build/Wireshark-win64-libs-2.2/c-ares-1.12.0-win64ws/lib/libcares-2.lib
– Found GCRYPT: F:/Wireshark_Build/Wireshark-win64-libs-2.2/gnutls-3.2.15-2.9-win64ws/bin/libgcrypt-20.lib (found suitable version "1.6.2", minimum required is "1.4.2")
– GCRYPT FOUND
– GCRYPT includes: F:/Wireshark_Build/Wireshark-win64-libs-2.2/gnutls-3.2.15-2.9-win64ws/include
– GCRYPT libs: F:/Wireshark_Build/Wireshark-win64-libs-2.2/gnutls-3.2.15-2.9-win64ws/bin/libgcrypt-20.lib;F:/Wireshark_Build/Wireshark-win64-libs-2.2/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'
– Found GEOIP: F:/Wireshark_Build/Wireshark-win64-libs-2.2/GeoIP-1.6.6-win64ws/lib/libGeoIP-1.lib
– Looking for GeoIP_country_name_by_ipnum_v6
– Looking for GeoIP_country_name_by_ipnum_v6 - found
– GEOIP FOUND
– GEOIP includes: F:/Wireshark_Build/Wireshark-win64-libs-2.2/GeoIP-1.6.6-win64ws/include
– GEOIP libs: F:/Wireshark_Build/Wireshark-win64-libs-2.2/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'
– Found GLIB2: F:/Wireshark_Build/Wireshark-win64-libs-2.2/gtk2/lib/glib-2.0.lib
– GLIB2 FOUND
– GLIB2 includes: F:/Wireshark_Build/Wireshark-win64-libs-2.2/gtk2/include/glib-2.0;F:/Wireshark_Build/Wireshark-win64-libs-2.2/gtk2/lib/glib-2.0/include
– GLIB2 libs: F:/Wireshark_Build/Wireshark-win64-libs-2.2/gtk2/lib/glib-2.0.lib
– Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
– Checking for one of the modules 'gmodule-2.0'
– Found GMODULE2: F:/Wireshark_Build/Wireshark-win64-libs-2.2/gtk2/lib/gmodule-2.0.lib
– GMODULE2 FOUND
– GMODULE2 includes: F:/Wireshark_Build/Wireshark-win64-libs-2.2/gtk2/include/glib-2.0
– GMODULE2 libs: F:/Wireshark_Build/Wireshark-win64-libs-2.2/gtk2/lib/gmodule-2.0.lib
– Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
– Checking for one of the modules 'gnutls'
– Found GNUTLS: F:/Wireshark_Build/Wireshark-win64-libs-2.2/gnutls-3.2.15-2.9-win64ws/bin/libgnutls-28.lib (found suitable version "3.2.15", minimum required is "2.12.0")
– GNUTLS FOUND
– GNUTLS includes: F:/Wireshark_Build/Wireshark-win64-libs-2.2/gnutls-3.2.15-2.9-win64ws/include
– GNUTLS libs: F:/Wireshark_Build/Wireshark-win64-libs-2.2/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'
– Found GTHREAD2: F:/Wireshark_Build/Wireshark-win64-libs-2.2/gtk2/lib/glib-2.0.lib
– GTHREAD2 FOUND
– GTHREAD2 includes: F:/Wireshark_Build/Wireshark-win64-libs-2.2/gtk2/include/glib-2.0/glib
– GTHREAD2 libs: F:/Wireshark_Build/Wireshark-win64-libs-2.2/gtk2/lib/glib-2.0.lib
– Found GTK2_GTK: F:/Wireshark_Build/Wireshark-win64-libs-2.2/gtk2/lib/gtk-win32-2.0.lib
– GTK2 FOUND
– GTK2 includes: F:/Wireshark_Build/Wireshark-win64-libs-2.2/gtk2/include/gtk-2.0;F:/Wireshark_Build/Wireshark-win64-libs-2.2/gtk2/include;F:/Wireshark_Build/Wireshark-win64-libs-2.2/gtk2/include/freetype2;F:/Wireshark_Build/Wireshark-win64-libs-2.2/gtk2/include/glib-2.0;F:/Wireshark_Build/Wireshark-win64-libs-2.2/gtk2/lib/glib-2.0/include;F:/Wireshark_Build/Wireshark-win64-libs-2.2/gtk2/include/atk-1.0;F:/Wireshark_Build/Wireshark-win64-libs-2.2/gtk2/include/gdk-pixbuf-2.0;F:/Wireshark_Build/Wireshark-win64-libs-2.2/gtk2/include/cairo;F:/Wireshark_Build/Wireshark-win64-libs-2.2/gtk2/include/pango-1.0;F:/Wireshark_Build/Wireshark-win64-libs-2.2/gtk2/lib/gtk-2.0/include
– GTK2 libs: F:/Wireshark_Build/Wireshark-win64-libs-2.2/gtk2/lib/glib-2.0.lib;F:/Wireshark_Build/Wireshark-win64-libs-2.2/gtk2/lib/gobject-2.0.lib;F:/Wireshark_Build/Wireshark-win64-libs-2.2/gtk2/lib/atk-1.0.lib;F:/Wireshark_Build/Wireshark-win64-libs-2.2/gtk2/lib/gmodule-2.0.lib;F:/Wireshark_Build/Wireshark-win64-libs-2.2/gtk2/lib/gdk_pixbuf-2.0.lib;F:/Wireshark_Build/Wireshark-win64-libs-2.2/gtk2/lib/cairo.lib;F:/Wireshark_Build/Wireshark-win64-libs-2.2/gtk2/lib/pango-1.0.lib;F:/Wireshark_Build/Wireshark-win64-libs-2.2/gtk2/lib/pangocairo-1.0.lib;F:/Wireshark_Build/Wireshark-win64-libs-2.2/gtk2/lib/gdk-win32-2.0.lib;F:/Wireshark_Build/Wireshark-win64-libs-2.2/gtk2/lib/gtk-win32-2.0.lib
– Could NOT find Gettext (missing: GETTEXT_MSGMERGE_EXECUTABLE GETTEXT_MSGFMT_EXECUTABLE)
– GETTEXT NOT FOUND
– Could NOT find Git (missing: GIT_EXECUTABLE)
– Git NOT FOUND
– Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
– Checking for one of the modules 'krb5;mit-krb5;heimdal-krb5'
– Found KERBEROS: F:/Wireshark_Build/Wireshark-win64-libs-2.2/kfw-3-2-2-x64-ws/lib/krb5_64.lib
– Looking for heimdal_version
– Looking for heimdal_version - not found
– KERBEROS FOUND
– KERBEROS includes: F:/Wireshark_Build/Wireshark-win64-libs-2.2/kfw-3-2-2-x64-ws/include
– KERBEROS libs: F:/Wireshark_Build/Wireshark-win64-libs-2.2/kfw-3-2-2-x64-ws/lib/krb5_64.lib
CMake Error at F:/CMake/share/cmake-3.7/Modules/FindPackageHandleStandardArgs.cmake:138 (message):
Could NOT find LEX (missing: LEX_EXECUTABLE)
Call Stack (most recent call first):
F:/CMake/share/cmake-3.7/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
cmake/modules/FindLEX.cmake:23 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:828 (find_package)
– Configuring incomplete, errors occurred!
See also "F:/Wireshark_Build/wsbuild64/CMakeFiles/CMakeOutput.log".
See also "F:/Wireshark_Build/wsbuild64/CMakeFiles/CMakeError.log".
asked 01 Mar ‘17, 12:00
Utnapishtim
31●3●3●6
accept rate: 100%
edited 04 Mar ‘17, 10:53
grahamb ♦
19.8k●3●30●206
Glad to hear it's fixed. I see no need to pass the full path for the solution. It's in the directory you should be starting the build from so msbuild will find it there.
This question (and comments) has become a gigantic wall of text that's mostly irrelevant and unhelpful to others, so with your permission I'd like to reorganise it to just show the CMake generation log in the question and change my answer to point out the flex\bison issue and then your comment to that answer stating that it worked.
For what it's worth:
seems to indicate that CMake found that
-Wl,--as-needed
and-pie
were found not to have worked, so it should not have included them as linker flags.Gah, I've managed to delete the comment from @Utnapishtim showing that the build completed when trying to clean up the massive wall of text.
Gah, I've managed to delete the comment from @Utnapishtim showing that the build completed when trying to clean up the massive wall of text.
After some rummaging around, I have managed to find & have reloaded the Build Completed Screendump, which @grahamb threw out with the bathwater.
We now seem to have a reasonably clear question and answer that will hopefully help others.
@Utnapishtim, if an answer has solved your issue, please accept the answer for the benefit of other users by clicking the checkmark icon next to the answer. Please read the FAQ for more information.