ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-dev: Re: [Wireshark-dev] Can't build GTK only using CMake on Windows7

From: Graham Bloice <graham.bloice@xxxxxxxxxxxxx>
Date: Tue, 29 Mar 2016 15:22:26 +0100


On 29 March 2016 at 15:04, Robert Cragie <robert.cragie@xxxxxxxxxxxxx> wrote:
I did the following:

1) Merged my fork with the latest upstream
2) Downloaded and installed Qt

I tried to rebuild using CMake but it still failed. Note the same code builds fine using nmake and GTK only. Here are the lines with FAILED and error in from the output of the build:

    91>Done Building Project "C:\Users\robcra01\Documents\WiresharkBitbucket\wsbuild\docbook\generate_developer-guide.xml.vcxproj" (default targets) -- FAILED.
    29>Done Building Project "C:\Users\robcra01\Documents\WiresharkBitbucket\wsbuild\docbook\generate_developer-guide.xml.vcxproj.metaproj" (default targets) -- FAILED.
    92>Done Building Project "C:\Users\robcra01\Documents\WiresharkBitbucket\wsbuild\docbook\generate_user-guide.xml.vcxproj" (default targets) -- FAILED.
    30>Done Building Project "C:\Users\robcra01\Documents\WiresharkBitbucket\wsbuild\docbook\generate_user-guide.xml.vcxproj.metaproj" (default targets) -- FAILED.
    79>Done Building Project "C:\Users\robcra01\Documents\WiresharkBitbucket\wsbuild\wsutil\wsutil.vcxproj" (default targets) -- FAILED.
    76>Done Building Project "C:\Users\robcra01\Documents\WiresharkBitbucket\wsbuild\wsutil\wsutil.vcxproj.metaproj" (default targets) -- FAILED.
   101>Done Building Project "C:\Users\robcra01\Documents\WiresharkBitbucket\wsbuild\docbook\release_notes_html.vcxproj" (default targets) -- FAILED.
    50>Done Building Project "C:\Users\robcra01\Documents\WiresharkBitbucket\wsbuild\docbook\release_notes_html.vcxproj.metaproj" (default targets) -- FAILED.
    87>Done Building Project "C:\Users\robcra01\Documents\WiresharkBitbucket\wsbuild\epan\dissectors\dissectors.vcxproj" (default targets) -- FAILED.
    19>Done Building Project "C:\Users\robcra01\Documents\WiresharkBitbucket\wsbuild\epan\dissectors\dissectors.vcxproj.metaproj" (default targets) -- FAILED.
     2>Done Building Project "C:\Users\robcra01\Documents\WiresharkBitbucket\wsbuild\ALL_BUILD.vcxproj.metaproj" (default targets) -- FAILED.
     1>Done Building Project "C:\Users\robcra01\Documents\WiresharkBitbucket\wsbuild\Wireshark.sln" (default targets) -- FAILED.
Build FAILED.

    91>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(170,5): error MSB6006: "cmd.exe" exited with code 9009. [C:\Users\robcra01\Documents\WiresharkBitbucket\wsbuild\docbook\generate_developer-guide.xml.vcxproj]
    92>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(170,5): error MSB6006: "cmd.exe" exited with code 9009. [C:\Users\robcra01\Documents\WiresharkBitbucket\wsbuild\docbook\generate_user-guide.xml.vcxproj]
    79>LINK : fatal error LNK1181: cannot open input file 'gmodule-2.0.lib' [C:\Users\robcra01\Documents\WiresharkBitbucket\wsbuild\wsutil\wsutil.vcxproj]
   101>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(170,5): error MSB6006: "cmd.exe" exited with code 9009. [C:\Users\robcra01\Documents\WiresharkBitbucket\wsbuild\docbook\release_notes_html.vcxproj]
         Generating run/RelWithDebInfo/dtds/xcap-error.dtd
    87>./asn1/kerberos/packet-kerberos-template.c(268): fatal error C1083: Cannot open include file: 'krb5.h': No such file or directory (C:\Users\robcra01\Documents\WiresharkBitbucket\wireshark\epan\dissectors\packet-kerberos.c) [C:\Users\robcra01\Documents\WiresharkBitbucket\wsbuild\epan\dissectors\dissectors.vcxproj]
         C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(170,5): error MSB6006: "cmd.exe" exited with code 9009. [C:\Users\robcra01\Documents\WiresharkBitbucket\wsbuild\docbook\generate_developer-guide.xml.vcxproj]
         C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(170,5): error MSB6006: "cmd.exe" exited with code 9009. [C:\Users\robcra01\Documents\WiresharkBitbucket\wsbuild\docbook\generate_user-guide.xml.vcxproj]
         LINK : fatal error LNK1181: cannot open input file 'gmodule-2.0.lib' [C:\Users\robcra01\Documents\WiresharkBitbucket\wsbuild\wsutil\wsutil.vcxproj]
         C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(170,5): error MSB6006: "cmd.exe" exited with code 9009. [C:\Users\robcra01\Documents\WiresharkBitbucket\wsbuild\docbook\release_notes_html.vcxproj]
         ./asn1/kerberos/packet-kerberos-template.c(268): fatal error C1083: Cannot open include file: 'krb5.h': No such file or directory (C:\Users\robcra01\Documents\WiresharkBitbucket\wireshark\epan\dissectors\packet-kerberos.c) [C:\Users\robcra01\Documents\WiresharkBitbucket\wsbuild\epan\dissectors\dissectors.vcxproj]
    5 Error(s)



The docbook errors are likely down to missing some required Cygwin packages, probably Text/asciidoc and Text/docbook-xml45.

The other errors seem to be a bad reference to gmodule-2.0.lib when attempting to link wsutil and a bad reference to krb5.h when compiling packet-kerberos.c.

Can you post the complete output of the CMake generation step?

Also note that when attempting to debug random build errors it's useful to omit the "/m" parameter to msbuild to allow targets to be built in order rather than in parallel which really messes up the build output.

--
Graham Bloice