This is our old Q&A Site. Please post any new questions and answers at

hi,while following the step by step guide for build environment,i get this error:

c:\wireshark> nmake -f Makefile.nmake verify_tools

Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
Copyright (C) Microsoft Corporation.  All rights reserved.

'bash' is not recognized as an internal or external command,
operable program or batch file.
'bash' is not recognized as an internal or external command,
operable program or batch file.
NMAKE : fatal error U1077: 'bash' : return code '0x1'

what is the error about?

asked 14 Mar '13, 04:59

chin12's gravatar image

accept rate: 0%

edited 14 Mar '13, 05:08

grahamb's gravatar image

grahamb ♦

Config.nmake sets the path to Cygwin to be C:\cygwin\bin. I suspect you've installed it elsewhere. If this is the case, adjust the entry in config.nmake.

permanent link

answered 14 Mar '13, 05:23

grahamb's gravatar image

grahamb ♦
accept rate: 22%

i checked it.cygwin binaries are in c:\cygwin\bin.i assume i have to add some path in system environment variable 'path'?

(14 Mar '13, 06:04) chin12

Nope, config.nmake sets that for you. What is the result of dir c:\cygwin\bin\bash.exe?

(14 Mar '13, 06:28) grahamb ♦

ah..i don't see bash.exe in cygwin\bin or anywhere in cygwin.though i see a bashbug file in this directory.have i missed anything here..cygwin's size is 20mb and i downloaded it from one of mirror sites provided on running cygwin's setup.exe.

(14 Mar '13, 06:44) chin12

Odd, I thought bash was an integral part of Cygwin. You should be able to run the setup again and choose the package that contains bash.

(14 Mar '13, 07:17) grahamb ♦

The only thing I can see that would cause that sort of error message is the SetEnv.cmd script uses reg.exe in query mode to obtain some install paths from the registry.

I guess someone (admin) has disabled that command for some reason on your machine. What output do you get with reg query /??

Note that the version of Wireshark you build will no run on OS's earlier than Win7. If you need to run on earlier versions set the target OS as a parameter to SetEnv.cmd, e.g. /xp to target xp. Look at the top of SetEnv.cmd for more info.

(14 Mar '13, 07:43) grahamb ♦

Any cmd.exe shortcut will do as you should call SetEnv.Cmd as soon as you open it which will set the path to nmake.

If you look in the Start Menu entry for the SDK, you should find an entry for "Windows SDK 7.1 Command Prompt". Using that gets you a cmd.exe already set up with SetEnv. I've copied that shortcut to my desktop and edited the properties to include /xp /debug at the end.

(14 Mar '13, 10:03) grahamb ♦

I can't think of anything further to add regarding the "registry editing disabled" issue. I've never seen that before.

(14 Mar '13, 10:05) grahamb ♦

If your build requires winsparkle then your source is from trunk, therefore you need the packages from trunk, not trunk-1.8.

(18 Mar '13, 03:36) grahamb ♦

grahamb,thanx a to build wireshark.But,when i run the wireshark solution in vc++,i get error as win32.mak not found and "nmake -f Makefile.nmake packaging_papps" exited with code 2.i understand its because vc++ has to set env var path for sdk.but how to do that?also,i've to start coding dissector.plz provide links to materials (i'am reading now)which contain sample examples of dissectors with concise explanations.thanx.

(18 Mar '13, 23:20) chin12

AFAIK the Visual Studio solution is old and should not be used. The only supported method of building Wireshark on Windows is via a command line nmake. You can open the executable in Visual Studio for debugging though.

For dissector writing, README.developer is essential. Read it all thoroughly several times and then again looking at the source code for a dissector for a protocol that you know about. For help and advice the dev mailing list is a better place to post queries.

(19 Mar '13, 03:50) grahamb ♦

so,if my dissector has errors..only way for compiling is to do nmake thing?i can't compile my dissector in visual c++.

(26 Mar '13, 00:37) chin12

only way for compiling is to do nmake thing?i

Your only alternatives for building with MSVC++ on Windows are nmake or CMake. It's painful enough to support those two mechanisms, along with automake for UN*X systems; supporting a Windows-only build system not oriented towards allowing manual editing of the build files is probably not likely to happen, given that many of the Wireshark developers are running on UN*X systems and can't run MSVC++ to add new source files, so, unless you can build in VC++ with nmake, building with VC++ will probably never be well supported.

(26 Mar '13, 00:42) Guy Harris ♦♦
showing 5 of 12 show 7 more comments
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 14 Mar '13, 04:59

question was seen: 6,448 times

last updated: 26 Mar '13, 00:42

p​o​w​e​r​e​d by O​S​Q​A