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

Error building wireshark

0

Hi,

I'm trying to build wireshark for first time on a Windows environment.

I follow the developer's guide and everything looks OK until step 2.2.12.

A this time I have an error i do not understand. I put the description below.

Can you help me understand it and solve it ? Thank you

-- Configuring done
-- Generating done
-- Build files have been written to: C:/Nicolas/Dev/wsbuild64

c:\Nicolas\Dev\wsbuild64>msbuild /m /p:Configuration=RelWithDebInfo Wireshark.sln Microsoft (R) Build Engine, version 12.0.31101.0 [Microsoft .NET Framework, Version 4.0.30319.42000] Copyright (C) Microsoft Corporation. Tous droits réservés.

La génération a démarré 31/07/2017 18:28:36. 1>Projet "c:\Nicolas\Dev\wsbuild64\Wireshark.sln" sur le noud 1 (cibles par défaut). 1>c:\Nicolas\Dev\wsbuild64\Wireshark.sln.metaproj : error MSB4126: La configuration de solution spécifiée "RelWithDebInfo|win64" n'est pas valide. Spécifiez une configuration de solution valide à l'aide des propriétés Configuration et Platform (exemple : MSBuild.exe Solution.sln /p:Configuration=Debug /p:Platform="Any CPU") ou laissez ces propriétés vides si vous voulez utiliser la configuration de solution par défaut. [c:\Nicolas\Dev\wsbuild64\Wireshark.sln] 1>Génération du projet "c:\Nicolas\Dev\wsbuild64\Wireshark.sln" terminée (cibles par défaut) – ÉCHEC.

ÉCHEC de la build.

"c:\Nicolas\Dev\wsbuild64\Wireshark.sln" (cible par défaut) (1) -> (ValidateSolutionConfiguration cible) -> c:\Nicolas\Dev\wsbuild64\Wireshark.sln.metaproj : error MSB4126: La configuration de solution spécifiée "RelWithDebInfo|win64" n'est pas valide. Spécifiez une configuration de solution valide à l'aide des propriétés Configuration et Platform (exemple : MSBuild.exe Solution.sln /p:Configuration=Debug /p:Platform="Any CPU") ou laissez ces propriétés vides si vous voulez utiliser la configuration de solution par défaut. [c:\Nicolas\Dev\wsbuild64\Wireshark.sln]

0 Avertissement(s) 1 Erreur(s)

Temps écoulé 00:00:00.82

asked 31 Jul ‘17, 09:54

Nicolas2333's gravatar image

Nicolas2333
6223
accept rate: 0%

edited 31 Jul ‘17, 23:59

Guy%20Harris's gravatar image

Guy Harris ♦♦
17.4k335196

Can you show the complete CMake and msbuild output by redirecting them to files and posting them, i.e.

cmake … >2&1 > cmake.txt

and

msbuild … 2>&1 > build.txt

Can you also show your CMake and msbuild commands

(31 Jul ‘17, 12:09) grahamb ♦

Hi, Here are the two command lines I used :

cmake -DENABLE_CHM_GUIDES=on -G "Visual Studio 12 Win64" ..\wireshark >cmake.txt
msbuild /m /p:Configuration=RelWithDebInfo Wireshark.sln >build.txt

I still have the same error. I look the Wireshark.sln.metaproj but i do not know the build process enought to find the problem.

Can you help me ?

Here are the cmmake.txt file :

– Generating build using CMake 3.8.2
– Building for win64 using Visual Studio 12 2013 Win64
Working in C:\Nicolas\Dev\wireshark-win64-libs
Tag 2017-07-19 found. Skipping.
– No custom file found in C:/Nicolas/Dev/wireshark
– 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.5.0-YourExtraVersionInfo, MaV: 2, MiV: 5, PL: 0, EV: -YourExtraVersionInfo.
– Found PythonInterp: C:/Python27/python.exe (found version "2.7.11")
– Checking for c-compiler flag: /MP
– Checking for c-compiler flag: /Zo
– Checking for c-compiler flag: /w34295 /w34189 /wd4200
– Checking for c++-compiler flag: /MP
– Checking for c++-compiler flag: /Zo
– Checking for c++-compiler flag: /w34295 /w34189 /wd4200
– Packagelist: AIRPCAP;CAP;CARES;GCRYPT;GEOIP;GLIB2;GMODULE2;GNUTLS;GTHREAD2;Gettext;Git;KERBEROS;LEX;LIBSSH;LUA;LZ4;LibXml2;M;NGHTTP2;PCAP;POD;Perl;PythonInterp;Qt5Core;Qt5LinguistTools;Qt5Multimedia;Qt5PrintSupport;Qt5Svg;Qt5Widgets;Qt5WinExtras;SBC;SETCAP;SH;SMI;SNAPPY;SPANDSP;WINSPARKLE;YACC;YAPP;ZLIB
– AIRPCAP FOUND
– AIRPCAP includes: C:/Nicolas/Dev/wireshark-win64-libs/AirPcap_Devpack_4_1_0_1622/Airpcap_Devpack/include
– AIRPCAP libs: C:/Nicolas/Dev/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:/Nicolas/Dev/wireshark-win64-libs/c-ares-1.13.0-win64ws/include
– CARES libs: C:/Nicolas/Dev/wireshark-win64-libs/c-ares-1.13.0-win64ws/lib/libcares-2.lib
– GCRYPT FOUND
– GCRYPT includes: C:/Nicolas/Dev/wireshark-win64-libs/libgcrypt-1.7.6-win64ws/include
– GCRYPT libs: C:/Nicolas/Dev/wireshark-win64-libs/libgcrypt-1.7.6-win64ws/bin/libgcrypt-20.lib;C:/Nicolas/Dev/wireshark-win64-libs/libgcrypt-1.7.6-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:/Nicolas/Dev/wireshark-win64-libs/GeoIP-1.6.10-win64ws/include
– GEOIP libs: C:/Nicolas/Dev/wireshark-win64-libs/GeoIP-1.6.10-win64ws/lib/libGeoIP-1.lib
– Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE)
– Checking for one of the modules 'glib-2.0>=2.22.0'
– GLIB2 FOUND
– GLIB2 includes: C:/Nicolas/Dev/wireshark-win64-libs/gtk2/include/glib-2.0;C:/Nicolas/Dev/wireshark-win64-libs/gtk2/lib/glib-2.0/include
– GLIB2 libs: C:/Nicolas/Dev/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:/Nicolas/Dev/wireshark-win64-libs/gtk2/include/glib-2.0
– GMODULE2 libs: C:/Nicolas/Dev/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:/Nicolas/Dev/wireshark-win64-libs/gnutls-3.4.11-1.35-win64ws/include
– GNUTLS libs: C:/Nicolas/Dev/wireshark-win64-libs/gnutls-3.4.11-1.35-win64ws/bin/libgnutls-30.lib
– Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE)
– Checking for one of the modules 'gthread-2.0'
– GTHREAD2 FOUND
– GTHREAD2 includes: C:/Nicolas/Dev/wireshark-win64-libs/gtk2/include/glib-2.0/glib
– GTHREAD2 libs: C:/Nicolas/Dev/wireshark-win64-libs/gtk2/lib/glib-2.0.lib
– Could NOT find Gettext (missing:  GETTEXT_MSGMERGE_EXECUTABLE GETTEXT_MSGFMT_EXECUTABLE)
– GETTEXT NOT FOUND
– Git 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:/Nicolas/Dev/wireshark-win64-libs/kfw-3-2-2-x64-ws/include
– KERBEROS libs: C:/Nicolas/Dev/wireshark-win64-libs/kfw-3-2-2-x64-ws/lib/krb5_64.lib
– LEX FOUND
– LEX executable: C:/cygwin64/bin/flex.exe
– LIBSSH FOUND
– LIBSSH includes: C:/Nicolas/Dev/wireshark-win64-libs/libssh-0.7.3-win64ws/include
– LIBSSH libs: C:/Nicolas/Dev/wireshark-win64-libs/libssh-0.7.3-win64ws/lib/ssh.lib
– 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:/Nicolas/Dev/wireshark-win64-libs/lua5.2.4/include
– LUA libs: C:/Nicolas/Dev/wireshark-win64-libs/lua5.2.4/lua52.lib
– Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE)
– Checking for one of the modules 'lz4;liblz4'
– LZ4 FOUND
– LZ4 includes: C:/Nicolas/Dev/wireshark-win64-libs/lz4-1.7.5-win64ws/include
– LZ4 libs: C:/Nicolas/Dev/wireshark-win64-libs/lz4-1.7.5-win64ws/lib/lz4.lib
– LIBXML2 FOUND
– LibXml2 includes: C:/Nicolas/Dev/wireshark-win64-libs/libxml2-2.9.4-win64ws/include/libxml2
– LibXml2 libs: C:/Nicolas/Dev/wireshark-win64-libs/libxml2-2.9.4-win64ws/lib/libxml2-2.lib
– Could NOT find M (missing:  M_LIBRARY)
– M NOT FOUND
– Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE)
– Checking for one of the modules 'libnghttp2'
– NGHTTP2 FOUND
– NGHTTP2 includes: C:/Nicolas/Dev/wireshark-win64-libs/nghttp2-1.14.0-win64ws/include
– NGHTTP2 libs: C:/Nicolas/Dev/wireshark-win64-libs/nghttp2-1.14.0-win64ws/lib/nghttp2.lib
– PCAP FOUND
– PCAP includes: C:/Nicolas/Dev/wireshark-win64-libs/WpdPack/Include
– PCAP libs: C:/Nicolas/Dev/wireshark-win64-libs/WpdPack/Lib/x64/wpcap.lib
– POD FOUND
– PERL FOUND
– Perl executable: C:/cygwin64/bin/perl.exe
– Found PythonInterp: C:/Python27/python.exe (found suitable version "2.7.11", minimum required is "2")
– PYTHONINTERP FOUND
– Qt5Core FOUND
– Qt5Core includes: C:/Qt/5.6/msvc2013_64/include/;C:/Qt/5.6/msvc2013_64/include/QtCore;C:/Qt/5.6/msvc2013_64/.//mkspecs/win32-msvc2013
– Qt5Core libs: Qt5::Core
– Qt5Core definitions: -DQT_CORE_LIB
– Qt5LinguistTools FOUND
– Qt5Multimedia FOUND
– Qt5Multimedia includes: C:/Qt/5.6/msvc2013_64/include/;C:/Qt/5.6/msvc2013_64/include/QtMultimedia;C:/Qt/5.6/msvc2013_64/include/QtNetwork;C:/Qt/5.6/msvc2013_64/include/QtCore;C:/Qt/5.6/msvc2013_64/.//mkspecs/win32-msvc2013;C:/Qt/5.6/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.6/msvc2013_64/include/;C:/Qt/5.6/msvc2013_64/include/QtPrintSupport;C:/Qt/5.6/msvc2013_64/include/QtWidgets;C:/Qt/5.6/msvc2013_64/include/QtGui;C:/Qt/5.6/msvc2013_64/include/QtCore;C:/Qt/5.6/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.6/msvc2013_64/include/;C:/Qt/5.6/msvc2013_64/include/QtSvg;C:/Qt/5.6/msvc2013_64/include/QtWidgets;C:/Qt/5.6/msvc2013_64/include/QtGui;C:/Qt/5.6/msvc2013_64/include/QtCore;C:/Qt/5.6/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.6/msvc2013_64/include/;C:/Qt/5.6/msvc2013_64/include/QtWidgets;C:/Qt/5.6/msvc2013_64/include/QtGui;C:/Qt/5.6/msvc2013_64/include/QtCore;C:/Qt/5.6/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.6/msvc2013_64/include/;C:/Qt/5.6/msvc2013_64/include/QtWinExtras;C:/Qt/5.6/msvc2013_64/include/QtGui;C:/Qt/5.6/msvc2013_64/include/QtCore;C:/Qt/5.6/msvc2013_64/.//mkspecs/win32-msvc2013
– Qt5WinExtras libs: Qt5::WinExtras
– Qt5WinExtras definitions: -DQT_WINEXTRAS_LIB;-DQT_GUI_LIB;-DQT_CORE_LIB
– SBC FOUND
– SBC includes: C:/Nicolas/Dev/wireshark-win64-libs/sbc-1.3-win64ws/include
– SBC libs: C:/Nicolas/Dev/wireshark-win64-libs/sbc-1.3-win64ws/lib/sbc.lib
– Could NOT find SETCAP (missing:  SETCAP_EXECUTABLE)
– SETCAP NOT FOUND
– SH FOUND
– SH executable: C:/cygwin64/bin/bash.exe
– SMI FOUND
– SMI includes: C:/Nicolas/Dev/wireshark-win64-libs/libsmi-svn-40773-win64ws/include
– SMI libs: C:/Nicolas/Dev/wireshark-win64-libs/libsmi-svn-40773-win64ws/lib/libsmi-2.lib
– Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE)
– Checking for one of the modules 'libsnappy'
– SNAPPY FOUND
– SNAPPY includes: C:/Nicolas/Dev/wireshark-win64-libs/snappy-1.1.3-win64ws/include
– SNAPPY libs: C:/Nicolas/Dev/wireshark-win64-libs/snappy-1.1.3-win64ws/lib/snappy.lib
– Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE)
– Checking for one of the modules 'spandsp'
– SPANDSP FOUND
– SPANDSP includes: C:/Nicolas/Dev/wireshark-win64-libs/spandsp-0.0.6-win64ws/include
– SPANDSP libs: C:/Nicolas/Dev/wireshark-win64-libs/spandsp-0.0.6-win64ws/lib/spandsp.lib
– WINSPARKLE FOUND
– WINSPARKLE includes: C:/Nicolas/Dev/wireshark-win64-libs/WinSparkle-0.5.4/include
– WINSPARKLE libs: C:/Nicolas/Dev/wireshark-win64-libs/WinSparkle-0.5.4/x64/Release/WinSparkle.lib
– YACC FOUND
– YACC executable: C:/cygwin64/bin/bison.exe
– Could NOT find YAPP (missing:  YAPP_EXECUTABLE)
– YAPP NOT FOUND
– Zlib might not be built yet; assume it contains inflatePrime
– ZLIB FOUND
– ZLIB includes: C:/Nicolas/Dev/wireshark-win64-libs/zlib-1.2.11-ws;C:/Nicolas/Dev/wsbuild64/zlib
– ZLIB libs: zlib
– C-Flags:  /MP /Zo /w34295 /w34189 /wd4200 /DWIN32 /D_WINDOWS /W3
– CXX-Flags:  /MP /Zo /w34295 /w34189 /wd4200 /DWIN32 /D_WINDOWS /W3 /GR /EHsc
– Warnings as errors: /WX – Could NOT find LYNX (missing: LYNX_EXECUTABLE) – Using Cygwin a2x – No custom file found in C:/Nicolas/Dev/wireshark/epan/crypt – No custom file found in C:/Nicolas/Dev/wireshark/epan/dissectors – No custom file found in C:/Nicolas/Dev/wireshark/epan/dissectors/asn1 – No custom file found in C:/Nicolas/Dev/wireshark/ui/qt – docdir: – The following OPTIONAL packages have been found:

  • AIRPCAP
  • CARES (required version >= 1.5.0)
  • GEOIP
  • GMODULE2
  • GNUTLS (required version >= 2.12.0)
  • Git
  • KERBEROS
  • LIBSSH (required version >= 0.6), Library for implementing SSH clients, <https://www.libssh.org/> extcap remote SSH interfaces (sshdump, ciscodump)
  • LUA
  • LZ4, LZ4 is lossless compression algorithm used in some protocol (CQL…), <http://www.lz4.org> LZ4 decompression in CQL and Kafka dissectors
  • LibXml2
  • NGHTTP2, HTTP/2 C library and tools, <https://nghttp2.org> Header decompression in HTTP2
  • PCAP
  • POD
  • Perl
  • Qt5Core
  • Qt5LinguistTools
  • Qt5Network (required version >= 5.6.2)
  • Qt5Gui (required version >= 5.6.2)
  • Qt5Multimedia
  • Qt5PrintSupport
  • Qt5Svg
  • Qt5Widgets
  • Qt5WinExtras
  • SBC, Bluetooth low-complexity, subband codec (SBC) decoder, <https://git.kernel.org/pub/scm/bluetooth/sbc.git> Support for playing SBC codec in RTP player
  • SH
  • SMI
  • SNAPPY, A fast compressor/decompressor from Google, <http://google.github.io/snappy/> Snappy decompression in CQL and Kafka dissectors
  • SPANDSP, a library of many DSP functions for telephony, <http://www.soft-switch.org/> Support for G.722 and G.726 codecs in RTP player
  • WINSPARKLE
  • ZLIB
  • XSLTPROC
  • ASCIIDOC
  • PythonInterp

– The following REQUIRED packages have been found:

  • PowerShell
  • GCRYPT (required version >= 1.4.2)
  • GLIB2
  • GTHREAD2
  • LEX
  • YACC

– The following OPTIONAL packages have not been found:

  • CAP
  • Gettext
  • M
  • SETCAP
  • PkgConfig
  • YAPP, Yet Another Perl Parser compiler, <http://search.cpan.org/dist/Parse-Yapp/> tpg plugin
  • LYNX
  • HTMLHelp

– Configuring done – Generating done – Build files have been written to: C:/Nicolas/Dev/wsbuild64

And the build.txt file : Microsoft (R) Build Engine, version 12.0.31101.0 [Microsoft .NET Framework, Version 4.0.30319.42000] Copyright (C) Microsoft Corporation. Tous droits róervó.

La gîòation a díarr 01/08/2017 18:02:13.
1>Projet "c:\Nicolas\Dev\wsbuild64\Wireshark.sln" sur le noud 1 (cibles par dæaut).
1>c:\Nicolas\Dev\wsbuild64\Wireshark.sln.metaproj : error MSB4126: La configuration de solution spãifiå "RelWithDebInfo|win64" n'est pas valide. Spãifiez une configuration de solution valide Šl'aide des propriôó Configuration et Platform (exemple��SBuild.exe Solution.sln /p:Configuration=Debug /p:Platform="Any CPU") ou laissez ces propriôó vides si vous voulez utiliser la configuration de solution par dæaut. [c:\Nicolas\Dev\wsbuild64\Wireshark.sln]
1>Gîòation du projet "c:\Nicolas\Dev\wsbuild64\Wireshark.sln" terminå (cibles par dæaut) – уHEC.

уHEC de la build.

   &quot;c:\Nicolas\Dev\wsbuild64\Wireshark.sln&quot; (cible par dæaut) (1) -&gt;
   (ValidateSolutionConfiguration cible) -&gt; 
     c:\Nicolas\Dev\wsbuild64\Wireshark.sln.metaproj : error MSB4126: La configuration de solution spãifiå &quot;RelWithDebInfo|win64&quot; n&#39;est pas valide. Spãifiez une configuration de solution valide Šl&#39;aide des propriôó Configuration et Platform (exemple��SBuild.exe Solution.sln /p:Configuration=Debug /p:Platform=&quot;Any CPU&quot;) ou laissez ces propriôó vides si vous voulez utiliser la configuration de solution par dæaut. [c:\Nicolas\Dev\wsbuild64\Wireshark.sln]

0 Avertissement(s)
1 Erreur(s)

Temps ãoul 00:00:00.10

(01 Aug ‘17, 09:07) Nicolas2333

I think msbuild is complaining that you’re using an invalid build configuration, but the command line you have looks correct to me.

Are you sure you have setup the command prompt correctly? What does the output of “cl” show?

(01 Aug ‘17, 10:06) grahamb ♦

I would highly recommend that you check the cmake and msbuild stdio output of the buildbot that most closely matches your development system. You can compare environment variables, etc. to see what’s different or what you might have missed.

(01 Aug ‘17, 11:04) cmaynard ♦♦


One Answer:

0

Hi,

I follow your advices and finally find the problem.

In fact, i first have installed cmake 3.9 instead of cmake 3.8.2. When i tried to build with cmake 3.9 i had to declare an environment variable named "PLATFORM" in order the cmake command is performed. It is this environment variable that generates the error in my msbuild command.

I delete this environment variable and build is successful.

Thank you very much for your help!

answered 02 Aug '17, 10:39

Nicolas2333's gravatar image

Nicolas2333
6223
accept rate: 0%

PLATFORM is an env var set by Visual Studio when building for x64. It's not required for CMake although we do sanity check that PLATFORM (if set it will be "x64") agrees with the WIRESHARK_TARGET_PLATFORM variable and the generator specified to CMake.

CMake 3.9 is now OK to use with all versions back to 2.0

(02 Aug '17, 12:48) grahamb ♦