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

Win 32 Initial build error

0

I downloaded the wireshark source and followed the user guide 3 times for building wireshark under windows. Once for 64-bit and twice for 32-bit. For the 32 bit build, which gets farther than the 64 bit build, i keep getting this error.

/usr/bin/bash: line 0: /usr/bin/bash: igncr: invalid option name

Here is a link to the console output.

https://drive.google.com/open?id=0B5J0J6mhfRZ_WldsUEdXQi1aUVk

CMake.txt: https://drive.google.com/open?id=0B5J0J6mhfRZ_Q1FtaEpObjJTbjQ

Env Path: https://drive.google.com/open?id=0B5J0J6mhfRZ_UmlyX0ppX0lkclU

Any help is appreciated.

UPDATE 1

After removing C:\MinGW\bin and C:\MinGW\msys\1.0\bin from my path, i still have a build error.

Build output: https://drive.google.com/open?id=0B5J0J6mhfRZ_akFGazRWTk96REU

Path: https://drive.google.com/open?id=0B5J0J6mhfRZ_cWZpNTdXd1B3ZHc

asked 07 Apr '16, 00:31

reynoldsjt's gravatar image

reynoldsjt
11115
accept rate: 0%

edited 20 Jul '16, 15:47

cmaynard's gravatar image

cmaynard ♦♦
9.4k1038142

Could be a couple of things, in your build directory, file CMakeCache.txt what is the value of SH_EXECUTABLE:FILEPATH?

(07 Apr '16, 01:42) grahamb ♦

The value is 'SH_EXECUTABLE:FILEPATH=C:/MinGW/msys/1.0/bin/bash.exe' The file exists at that location.

i've included a link to the file to the question. I've also added a link to the output of my windows path varibles in case that is helpful. thanks.

(07 Apr '16, 07:03) reynoldsjt

One Answer:

1

You have entries on your path that's confusing CMake, in particular C:\MinGW\1.0\bin.

Wireshark builds on Windows work much better if you don't have Cygwin or MinGw, or the Git unix tools on the path. These alternative tools are not what the build expects and result in failures as you've seen. Where the build wants to use alternative tools, e.g. from Cygwin, it attempts to find them itself but can be fooled.

The items you should remove from your path (for Wireshark builds) are:

  • C:\MinGW\bin (3 off)
  • C:\MinGW\msys\1.0\bin (3 off)

You also have Python 3.5 on the path, this might also cause issues. I use Python 2 for Wireshark builds, I'm not sure if Python 3 is OK.

Powershell can be used to display the path contents in a much easier fashion, e.g. ($env:path).split(";").

answered 07 Apr '16, 07:54

grahamb's gravatar image

grahamb ♦
19.8k330206
accept rate: 22%

Hi. After removing those from my path, i still am having a build error. It looks like /usr/bin/bash: /cygdrive/c/Development/wireshark/tools/runa2x.sh: No such file or directory is the error now? I checked and the file exists. The very first project that actually says failed is user_guide_docbook.vcxproj. I've added the newest output and path files links in the question.

(07 Apr '16, 09:03) reynoldsjt

You're missing asciidoc and docbook-xml45 from your Cygwin installation. See the Developers Guide section on Cygwin for the required packages.

Did Python 3 work?

(07 Apr '16, 09:58) grahamb ♦

Thanks for the reply. Both of those packages are checked as installed in the cygwin installer. And the file exists and executes if i go into cygwin and run it. I can delete the installation and try reinstalling it from scratch. I also removed python3 from the path, i have both 2 and 3 installed. It didn't seem to make a difference.

(07 Apr '16, 10:03) reynoldsjt
1

CMake still seems to be picking up a non-Cygwin bash.

Did you delete CMakeCache.txt (or delete your build directory) after making the path changes?

What's in the CMakeCache.txt for SH_EXECUTABLE after the changes?

(07 Apr '16, 10:27) grahamb ♦

I didn't. Doing so results in a successful build. Thanks for all the help!

(07 Apr '16, 10:44) reynoldsjt