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

Hi I have installed the necessary setups for wireshark, I have my vcvarsall.bat and vcvars32.bat running. When I run nmake -f Makefile.nmake verify_tools, it shows

Checking for required applications:
        link: /usr/bin/link
        nmake: nmake
        bash: /usr/bin/bash
        bison: /usr/bin/bison
        flex: /usr/bin/flex
        env: /usr/bin/env
        grep: /usr/bin/grep
        /usr/bin/find: /usr/bin/find
        perl: /usr/bin/perl
        C:\Python27\python.exe: /cygdrive/c/Python27/python.exe
        sed: /usr/bin/sed
        unzip: /usr/bin/unzip
        wget: /usr/bin/wget

Can't find:  cl

ERROR: These application(s) are either not installed or simply can't be found in
 the current PATH: /cygdrive/c/Python27:/cygdrive/c/Windows/System32 : C:/cygwin
/bin: C:/python27: C:/Python27/Scripts: %PATH%:%PAL:AppDir%/Git:%PAL:DataDir%:%T
EMP%: C:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE:  C:/Progr
am Files (x86)/Microsoft Visual Studio 10.0/VC/bin: C:/Program Files (x86)/Micro
soft Visual Studio 10.0/Common7/Tools: :/usr/bin:/cygdrive/c/Wireshark-win32-lib
s/gtk3/bin:/cygdrive/c/bin:/cygdrive/c/Wireshark-win32-libs/zlib125.

For additional help, please visit:
    http://www.wireshark.org/docs/wsdg_html_chunked/ChSetupWin32.html

NMAKE : fatal error U1077: 'c:\cygwin\bin\bash.EXE' : return code '0x1'
Stop.

I am able to run cl.exe in the bin folder. My environment variables are :

C:\Windows\System32; 
C:\cygwin\bin; 
C:\python27\; 
C:\Python27\Scripts; 
%PATH%;%PAL:AppDir%\Git;%PAL:DataDir%;%TEMP%; 
C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE;  
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin; 
C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE;

Please help me where I am stuck.

asked 30 May '14, 09:10

aman's gravatar image

aman
36151620
accept rate: 0%

edited 30 May '14, 09:37

grahamb's gravatar image

grahamb ♦
19.8k330206


You haven't initialised your command prompt properly as per the setup guide 2.2.6 Prepare cmd.exe.

You quote your environment there, I think you mean your path. Note that you don't need to add Cygwin or Visual Studio to the path manually, the vc batch file and the Makefile will do the rest.

Clean up your path, setup cmd.exe properly and try again.

permanent link

answered 30 May '14, 09:41

grahamb's gravatar image

grahamb ♦
19.8k330206
accept rate: 22%

How do I go about point 4 in the guide 2.2.6 Prepare cmd.exe. Where do I use/replace that code?

(30 May '14, 10:02) aman

You are changing directory into the top-level of your Wireshark sources.

(30 May '14, 10:05) grahamb ♦

I get that but what do I do with this code given in step 4?

@echo off

if "%1" == "" goto x86 if /i %1 == x86 goto x86 if /i %1 == x64 goto x64 goto usage

:usage

(30 May '14, 10:17) aman

That's just an example batch file to automate setting things up for you. You don't have to use it, the preceding steps should be enough.

To use that script, save it as a .bat file and call it after opening cmd.exe and skip steps 2 & 3 as they are done by the batch file.

(30 May '14, 10:24) grahamb ♦

I cleaned the Path and again prepared the cmd.exe as given. I get this

C:\Development\wireshark>nmake -f Makefile.nmake

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

Usage: /cygdrive/c/Development/wireshark/tools/win-setup.sh --appverify <appna e=""> [<appname>] ... /cygdrive/c/Development/wireshark/tools/win-setup.sh --libverify <destination <subdirectory=""> <package> /cygdrive/c/Development/wireshark/tools/win-setup.sh --download <desti ation=""> <subdirectory> <package> /cygdrive/c/Development/wireshark/tools/win-setup.sh --settag <destina ion=""> /cygdrive/c/Development/wireshark/tools/win-setup.sh --checktag <desti ation="">

? Wireshark Libraries not up-to-date ? ? Do you need to run nmake -f Makefile.nmake setup ?

NMAKE : fatal error U1077: 'exit' : return code '0x1' Stop.

What shall I do to solve this?3

(30 May '14, 10:25) aman

and on verify_tools, again the same first error. Cant find cl

(30 May '14, 10:27) aman

OK, from the very same command prompt you have been using, type echo %PATH% > C:\Development\path.txt, and then post the contents of path.txt as a comment here

(30 May '14, 10:34) grahamb ♦

C:\Windows\System32 ;

(30 May '14, 10:40) aman

If that's your path, then you haven't called vcvars or SetEnv, as they will add more to your path.

You MUST follow the steps in the Guide exactly.

(30 May '14, 10:47) grahamb ♦

This is what I get while calling it. C:\Development\wireshark>"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC \bin\vcvars32.bat Setting environment for using Microsoft Visual Studio 2010 x86 tools. ERROR: Cannot determine the location of the VS Common Tools folder.

Would you suggest uninstalling and then re installing the setups again?

(30 May '14, 10:50) aman

That looks your Visual Studio installation is bust. That error comes about if Registry entries for VS aren't present.

(30 May '14, 10:54) grahamb ♦

So what would you recommend me to do for this?

(30 May '14, 10:55) aman

Uninstall and reinstall Visual Studio.

(30 May '14, 10:57) grahamb ♦

I reinstalled it, and again the same error. VS common tools folder.

(30 May '14, 11:30) aman

and also gives this :

C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin>nmake -f Makefile.nmake Verify_tools

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

/usr/bin/bash: tools/win64-setup.sh: No such file or directory /usr/bin/bash: tools/win64-setup.sh: No such file or directory NMAKE : fatal error U1077: 'c:\cygwin\bin\bash.EXE' : return code '0x7f' Stop.

(30 May '14, 11:34) aman

There is no point going any further until vcvars32.bat runs correctly. That batch file looks for the following registry entries (for VS2010):

HKLM:\SOFTWARE\Microsoft\VisualStudio\SxS\VS7 HKCU:\SOFTWARE\Microsoft\VisualStudio\SxS\VS7 HKLM:\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7 HKCU:\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7

for a value named 10.0. The value of that is the installed path to Visual Studio. If vcvars32.bat doesn't work, then I doubt that you'll ever be able to build Wireshark.

Something is seriously messed up with your VS installation, I don't know why your reinstall didn't fix it.

(30 May '14, 13:44) grahamb ♦

When I download: C compiler service pack: "Microsoft Visual Studio 2010 Service Pack 1." it installs properly but when I install the STEP-4 thing, it gives error that SPInstaller failed to install.

Can you diagnose where the problem is?

(02 Jun '14, 05:46) aman

Unfortunately no, it appears to be an issue with your local machine. You'll have to scout around MS forums discussing the installation of VS2010 service packs.

(02 Jun '14, 06:54) grahamb ♦

I reinstalled it but didnt work out.. whereas I have the common tools folder and its still giving the error Setting environment for using Microsoft Visual Studio 2010 x86 tools. ERROR: Cannot determine the location of the VS Common Tools folder.

What shall I do to solve this?

(02 Jun '14, 06:54) aman

C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin>nmake -f Makefile.nmake Verify_tools

looks wierd to me, do you have the wireshark sources under

C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin> ?

If not run the command from the folder where the sources are.

(02 Jun '14, 07:06) Anders ♦

@grahamb Thanks for your help, I solves the VS issue.. Now getting an error: C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin>nmake -f Makefile.nma ke Verify_tools

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

NMAKE : fatal error U1052: file 'Makefile.nmake' not found Stop.

(02 Jun '14, 12:36) aman

@anders I have my sources under c:/development/wireshark as told in the installation guide.

(02 Jun '14, 12:37) aman

NMAKE : fatal error U1052: file 'Makefile.nmake' not found Stop

See my answer to your other question:

http://ask.wireshark.org/questions/33297/makefilenmake-error

(02 Jun '14, 12:50) Kurt Knochner ♦
1

@aman,

Whatever is wrong with your VS2010 installation seems to be beyond your and our combined help.

I was going to suggest trying VS2012 Express, but it seems that MS have removed that from the downloads list. You can try VS2013 Express, but I'm not aware of too many folks using that at present to build Wireshark.

You must use the Express version for Windows Desktop, and you will have to copy win32.mak as per the comments by @Bill Meier in this question

When using the later versions of VS (2012 and 2013) adjust the paths to vcvars32 accordingly, and you don't need the SDK (apart from getting win32.mak).

(02 Jun '14, 14:19) grahamb ♦
1

I've just built an x86 version of Wireshark with VS2013 (Pro), but Express should be good as well.

There are a couple of changes required from the Developers Guide:

  1. You must download a version of QT for use with VS2013 from the QT downloads page.
  2. You must copy win32.mak into C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include, I copied from the Win 7.1 SDK.
  3. Ignore the "Preparing Cmd.exe" section, instead open a VS2013 Command Prompt from the start menu; Visual Studio 2013 | Visual Studio Tools | VS2013 x86 Native Tools Command Prompt, and then set the following additional environment variables (adjusting paths to suit your installation):

set CYGWIN=nodosfilewarning set WIRESHARK_BASE_DIR=E:\Wireshark set WIRESHARK_TARGET_PLATFORM=win32 set QT5_BASE_DIR=C:\Qt\Qt5.3.0\5.3\msvc2013

Note that qtshark doesn't run correctly due to missing DLL's, VS2013 support requires improvement in this area.

(02 Jun '14, 15:23) grahamb ♦

Thanks @grahamb for your help. It is really helpful. I did the installation of VS2013 and followed the steps you mentions. but I am getting another error:

C:\Development\wireshark>nmake -f Makefile.nmake Verify_tools

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

ERROR: The contents of 'C:\development\Wireshark\Wireshark-win32-libs\current_tag.txt' is (unknown). It should be 2014-05-16.

Checking for required applications:

ERROR: Can't find 'which'. Unable to proceed.

NMAKE : fatal error U1077: 'c:\cygwin64\bin\bash.EXE' : return code '0x1' Stop.

(03 Jun '14, 07:54) aman

That looks like your Cygwin installation is missing which.exe. Use the Cygwin updater to install the "which" package in the "Base" category.

(03 Jun '14, 08:06) grahamb ♦

Updated. now i get:

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

ERROR: The contents of 'C:\Wireshark-win64-libs\current_tag.txt' is (unknown). It should be 2014-05-16.

Can't find Qt. This will become a problem at some point.

Checking for required applications: cl: /cygdrive/c/Program Files (x86)/Microsoft Visual Studio 12.0/VC/BIN/cl link: /cygdrive/c/Program Files (x86)/Microsoft Visual Studio 12.0/VC/BIN/link nmake: /cygdrive/c/Program Files (x86)/Microsoft Visual Studio 12.0/VC/BIN/nmake bash: /usr/bin/bash env: /usr/bin/env grep: /usr/bin/grep /usr/bin/find: /usr/bin/find peflags: /usr/bin/peflags C:\Python27\python.exe: /cygdrive/c/Python27/python.exe sed: /usr/bin/sed

Can't find: bison flex perl unzip wget

ERROR: These application(s) are either not installed or simply can't be found in the current PATH: /cygdrive/c/Python27:/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 12.0/Common7/IDE/CommonExtensions/Microsoft/TestWindow:/cygdrive/c/Program Files (x86)/Microsoft SDKs/F#/3.1/Framework/v4.0:/cygdrive/c/Program Files (x86)/MSBuild/12.0/bin:/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 12.0/Common7/IDE:/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 12.0/VC/BIN:/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 12.0/Common7/Tools:/cygdrive/c/Windows/Microsoft.NET/Framework/v4.0.30319:/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 12.0/VC/VCPackages:/cygdrive/c/Program Files (x86)/HTML Help Workshop:/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 12.0/Team Tools/Performance Tools:/cygdrive/c/Program Files (x86)/Windows Kits/8.1/bin/x86:/cygdrive/c/Program Files (x86)/Microsoft SDKs/Windows/v8.1A/bin/NETFX 4.5.1 Tools:/cygdrive/c/Python27:/cygdrive/c/Windows/System32:/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin:/cygdrive/c/Development/wireshark:/cygdrive/c/Program Files (x86)/Windows Kits/8.1/Windows Performance Toolkit:/cygdrive/c/Program Files/Microsoft SQL Server/110/Tools/Binn:/usr/bin:/cygdrive/c/Wireshark-win64-libs/gtk2/bin:/cygdrive/c/bin:/cygdrive/c/Wireshark-win64-libs/zlib125.

For additional help, please visit: http://www.wireshark.org/docs/wsdg_html_chunked/ChSetupWin32.html

NMAKE : fatal error U1077: 'c:\cygwin64\bin\bash.EXE' : return code '0x1' Stop.

C:\Development\wireshark>

(03 Jun '14, 08:28) aman
1

Can't find: bison flex perl unzip wget

That looks like your Cygwin installation is missing them...I think they are listed in the guide...

(03 Jun '14, 09:09) Anders ♦
1

You are missing the Cygwin packages bison, flex, perl, unzip, wget.

When running step 2.2.2 Install Cygwin you must have deselected some packages. Run the Cygwin installer again and install the missing packages.

Ignore the message about QT (unless you want to build the QT version, which isn't yet ready for general use) and the message about the current tag because you haven't yet got to step "2.2.8. Install Libraries"

(03 Jun '14, 09:15) grahamb ♦

Thankd alot @grahamb for you valuable help and time.. It really helped me and I solved the errors.. Thanks a ton..

(04 Jun '14, 07:11) aman

I get this while nmake -f Makefile.nmake setup:

--2014-06-04 10:21:32-- (try:14) http://anonsvn.wireshark.org/wireshark-win32- libs/tags/2014-05-16/packages//lua-5.2.3_Win64_dll10_lib.zip Connecting to proxy.com (proxy.com)|8.20.189.133|:8080... failed: No error. Retrying.

(04 Jun '14, 07:22) aman

Read what the guide has to say about beeing behind a proxy. Possibly you have "proxy.com (proxy.com)|8.20.189.133|:8080" set somwhere?

set HTTP_PROXY=your-proxy-uri

(04 Jun '14, 07:47) Anders ♦

I am afraid I dont know my proxy uri.. how do I find that?

(04 Jun '14, 07:54) aman

if I dont use set HTTP_PROXY I still get error. Not sure what to use as value in set HTTP_PROXY= ?

(04 Jun '14, 08:06) aman
1

As we don't know your environment - direct connection to the internet or in an office environment behind a proxy we can't help you there. Check you browser settings. Alternatively you can download the packages manually and put them in the download directory. The address can be found in win-setup.sh in the tools dir. The default dir is in tha makefile.nmake or config.nmake files.

(04 Jun '14, 08:19) Anders ♦

I have a direct connection. how shall I proceed with it. As an alternate if I manually download the packages. what is the next step. Please elaborate as I am not a technically sound guy. Thanks for your patience

(04 Jun '14, 08:31) aman

shall I download it manualy, unzip and paste into the C:\wireshark-win64-libs folder?

(04 Jun '14, 08:38) aman

Just download manually then run the setup target and it will unpack the files.

I have no idea where the script picksup your proxy setting of "proxy.com (proxy.com)|8.20.189.133|:8080"

does it show up somewhere if yo do printenv? google might know ;-)

(04 Jun '14, 08:52) Anders ♦

*** kfw-3-2-2-i386-ws-vc6.zip *** HTTP proxy (http://proxy.com:8081/) has been specified and will be used. Downloading kfw-3-2-2-i386-ws-vc6.zip into '/cygdrive/c/Wireshark-win64-libs', i nstalling into . File 'kfw-3-2-2-i386-ws-vc6.zip' already there; not retrieving.

Extracting '/cygdrive/c/Wireshark-win64-libs/kfw-3-2-2-i386-ws-vc6.zip' into '/c ygdrive/c/Wireshark-win64-libs/.' [/cygdrive/c/Wireshark-win64-libs/kfw-3-2-2-i386-ws-vc6.zip] End-of-central-directory signature not found. Either this file is not a zipfile, or it constitutes one disk of a multi-part archive. In the latter case the central directory and zipfile comment will be found on the last disk(s) of this archive. unzip: cannot find zipfile directory in one of /cygdrive/c/Wireshark-win64-libs /kfw-3-2-2-i386-ws-vc6.zip or /cygdrive/c/Wireshark-win64-libs/kfw-3-2-2-i386-ws-vc6.zip.zip, and cann ot find /cygdrive/c/Wireshark-win64-libs/kfw-3-2-2-i386-ws-vc6.zip.ZIP, period.

ERROR: Couldn't unpack '/cygdrive/c/Wireshark-win64-libs/kfw-3-2-2-i386-ws-vc6.z ip'

NMAKE : fatal error U1077: 'c:\cygwin64\bin\bash.EXE' : return code '0x1' Stop.

This is what it says, not able to unpack..:(

(04 Jun '14, 08:59) aman

Either a bad download has corrupted the zip or you have a bad unzip.exe is on your path somewhere. Please post the output of nmake -f Makefile.nmake verify_tools?

Can you also manually test the integrity of the archive, e.g. using another zip program?

(04 Jun '14, 09:12) grahamb ♦

C:\Development\wireshark>nmake -f Makefile.nmake verify_tools

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

ERROR: The contents of 'C:\Wireshark-win64-libs\current_tag.txt' is (unknown). It should be 2014-05-16.

Can't find Qt. This will become a problem at some point. Checking for required applications: cl: /cygdrive/c/Program Files (x86)/Microsoft Visual Studio 12.0/VC/BIN/ cl link: /cygdrive/c/Program Files (x86)/Microsoft Visual Studio 12.0/VC/BI N/link nmake: /cygdrive/c/Program Files (x86)/Microsoft Visual Studio 12.0/VC/B IN/nmake bash: /usr/bin/bash bison: /usr/bin/bison flex: /usr/bin/flex env: /usr/bin/env grep: /usr/bin/grep /usr/bin/find: /usr/bin/find peflags: /usr/bin/peflags perl: /usr/bin/perl C:\Python27\python.exe: /cygdrive/c/Python27/python.exe sed: /usr/bin/sed unzip: /usr/bin/unzip wget: /usr/bin/wget

This is what I get. I would prefer to use and extract the packages using cmd rather than doing manually.

(04 Jun '14, 09:52) aman

@grahamb: I solved that think and not its extracting but I get this error *** lua-5.2.3_Win64_dll10_lib.zip *** No HTTP proxy specified (http_proxy and HTTP_PROXY are empty). Downloading lua-5.2.3_Win64_dll10_lib.zip into '/cygdrive/c/development/Wireshar k/Wireshark-win32-libs', installing into lua5.2.3 --2014-06-04 13:17:16-- http://anonsvn.wireshark.org/wireshark-win32-libs/tags/ 2014-05-16/packages//lua-5.2.3_Win64_dll10_lib.zip Resolving anonsvn.wireshark.org (anonsvn.wireshark.org)... 174.137.42.70 Connecting to anonsvn.wireshark.org (anonsvn.wireshark.org)|174.137.42.70|:80... connected. HTTP request sent, awaiting response... 404 Not Found 2014-06-04 13:17:16 ERROR 404: Not Found.

ERROR: Can't download http://anonsvn.wireshark.org/wireshark-win32-libs/tags/201 4-05-16/packages//lua-5.2.3_Win64_dll10_lib.zip

NMAKE : fatal error U1077: 'c:\cygwin64\bin\bash.EXE' : return code '0x1' Stop.

whereas lua-5.2.3_Win64_dll10_lib.zip package is not there on the server link mentioned there.. shall I skip this or download it drom other link.?

(04 Jun '14, 10:19) aman
showing 5 of 43 show 38 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

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "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:

×1,620
×13
×9

question asked: 30 May '14, 09:10

question was seen: 3,841 times

last updated: 04 Jun '14, 10:19

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