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

Windows “Build errors”

0

Hello, I am trying to set up a Build environment for Wireshark on Windows7 using VS2013 and CMake. But when I try to build Wireshark from its sources I still got some errors. Does anybody know what the cause of these errors is:

Build FAILED.

   "C:\Development\wsbuild32\Wireshark.sln" (default target) (1) ->
   "C:\Development\wsbuild32\androiddump.vcxproj.metaproj" (default target) (4) ->
   "C:\Development\wsbuild32\ui\ui.vcxproj.metaproj" (default target) (35) ->
   "C:\Development\wsbuild32\ui\ui.vcxproj" (default target) (101) ->
   (CustomBuild target) -> 
     C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(170,5): error MSB6006: "cmd.exe" exited with code 1. [C:\Development\wsbuild32\ui\ui.vcxproj]

"C:\Development\wsbuild32\Wireshark.sln" (default target) (1) -> "C:\Development\wsbuild32\epan\dfilter\dfilter.vcxproj.metaproj" (default target) (17) -> "C:\Development\wsbuild32\epan\dfilter\dfilter.vcxproj" (default target) (104) -> C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(170,5): error MSB6006: "cmd.exe" exited with code 1. [C:\Development\wsbuild32\epan\dfilter\dfilter.vcxproj]

"C:\Development\wsbuild32\Wireshark.sln" (default target) (1) -> "C:\Development\wsbuild32\androiddump.vcxproj.metaproj" (default target) (4) -> "C:\Development\wsbuild32\wiretap\wiretap.vcxproj.metaproj" (default target) (36) -> "C:\Development\wsbuild32\wiretap\wiretap.vcxproj" (default target) (109) -> C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(170,5): error MSB6006: "cmd.exe" exited with code 1. [C:\Development\wsbuild32\wiretap\wiretap.vcxproj]

"C:\Development\wsbuild32\Wireshark.sln" (default target) (1) -> "C:\Development\wsbuild32\ALL_BUILD.vcxproj.metaproj" (default target) (2) -> "C:\Development\wsbuild32\text2pcap.vcxproj.metaproj" (default target) (69) -> "C:\Development\wsbuild32\text2pcap.vcxproj" (default target) (114) -> C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(170,5): error MSB6006: "cmd.exe" exited with code 1. [C:\Development\wsbuild32\text2pcap.vcxproj]

0 Warning(s) 4 Error(s)

asked 13 Jul ‘17, 14:25

Christian_R's gravatar image

Christian_R
1.8k2625
accept rate: 16%

We need to see the full context of the errors. Can you redirect the msbuild output to a file and post the file (or a link to it)?

e.g.

msbuild /p:Configuration=RelWithDebInfo Wireshark.sln 2>&1 >build.txt

If you turn off parallel builds by dropping the /m then the output is easier to follow.

(13 Jul ‘17, 14:43) grahamb ♦

I will prepare it tomorrow!

(13 Jul ‘17, 15:21) Christian_R

Also, don’t forget that you can always check the buildbot stdio logs and compare the buildbot’s environment, etc. with your own. There are logs for each step by each buidbot, so look at those that are relevant to you. See: https://buildbot.wireshark.org/wireshark-master/waterfall

(13 Jul ‘17, 17:20) cmaynard ♦♦

@cmaynard Thank you for the interesting link. Didn´t know that, before.

@grahamb I have uploaded the build.txt herre: build.txt

(14 Jul ‘17, 04:34) Christian_R


One Answer:

1

You have an "odd" version of flex in your path:

Generating text_import_scanner.c, text_import_scanner_lex.h
C:\Users\xxxx\Downloads\UnxUtils\usr\local\wbin\flex.exe: unknown flag '-'.  For usage, try C:\Users\xxxx\Downloads\UnxUtils\usr\local\wbin\flex.exe --help
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(170,5): error MSB6006: "cmd.exe" exited with code 1. [C:\Development\wsbuild32\ui\ui.vcxproj]

I would ensure that the element C:\Users\xxxx\Downloads\UnxUtils\usr\local\wbin is NOT on your path when building Wireshark.

When building Wireshark you have to be careful about what's on your path, that's why I recommend building in a VM so that it's easier to control.

answered 14 Jul '17, 05:35

grahamb's gravatar image

grahamb ♦
19.8k330206
accept rate: 22%

edited 14 Jul '17, 07:32

Christian_R's gravatar image

Christian_R
1.8k2625

Thought it night be the problem, too. I will try to disable it.

(14 Jul '17, 07:30) Christian_R

Thank you or showing me how to read the build messages.

(15 Jul '17, 00:48) Christian_R