Wireshark-dev: Re: [Wireshark-dev] Building latest Wireshark using VS2013
From: Graham Bloice <graham.bloice@xxxxxxxxxxxxx>
Date: Fri, 23 Dec 2016 16:41:15 +0000


On 23 December 2016 at 10:08, Pascal Quantin <pascal.quantin@xxxxxxxxx> wrote:


2016-12-23 10:52 GMT+01:00 João Valverde <joao.valverde@tecnico.ulisboa.pt>:
I don't know much about MSVC but my best guess is broken C99 support.

If I"m not mistaken, version 12.0.21005 was the first MSVC 2013 version. Since 5 updates were released and we have no issue compiling the Wireshark code with MSVC 2013 Update 5. The download link can be found here:
https://www.microsoft.com/en-us/download/details.aspx?id=48129
Once upgraded, my bet is that no patch will be required.

As can be seen by the 3 windows buildslaves  at https://buildbot.wireshark.org/wireshark-master/waterfall, all build master successfully using VS2013.  From the buildslave Cmake generation step output the version in use is:

-- The C compiler identification is MSVC 18.0.40629.0
-- The CXX compiler identification is MSVC 18.0.40629.0

The compiler version can also be seen by typing 'cl' at the command line (when you have VC on the path).

Unfortunately my Google-fu fails at finding any definitive list of compiler version strings.

There is no requirement to use a bitness of Cygwin that matches the Wireshark target platform, either 32 bit or 64 bit is fine.




On 12/23/2016 08:51 AM, Andreas wrote:

I could "fix" the errors compiling the dissectors. This looks like a bug
in the VS2013 compiler I use. The function add_ipv6_address_teredo has
these lines:

    if (tvb_get_ntohl(tvb, offset) != 0x20010000)
        return;

    guint16 mapped_port = tvb_get_ntohs(tvb, offset + 10) ^ 0xffff;

That's not accepted as a variable definition for 'mapped_port'. I could
make a workaround by changing the condition statement above:


    if (tvb_get_ntohl(tvb, offset) != 0x20010000)
    {    return;    }

I have no idea why the compiler complains or why this helps. I assume
this is a bug with VS2013 Premium Version 12.0.21005.1 REL. The version
of the compiler binary is
Microsoft (R) C/C++ Optimizing Compiler Version 18.00.21005.1 for x64


If I enable detailed MSBUILD logs then I could identify a bit more with
the docbook problem. The detailed error message is

   Der Befehl "LC_ALL" ist entweder falsch geschrieben
   oder konnte nicht gefunden werden.

I assume this command should be executed with bash instead of cmd.exe,
what is the magic how commands are executed by cygwin bash instead of
the windows command processore?
Is it legal to set WIRESHARK_CYGWIN_INSTALL_PATH not pointing to C:\cygwin?
How can I identify what commands are really executed in this build step?

Regards
Andreas


--
Graham Bloice