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

I have run nmake -f Makefile.nmake setup nmake -f Makefile.nmake distclean sucessfully.. when I run nmake -f makefile.nmake all this is what I get. is it normal if no, how do I correct it?

Microsoft (R) C/C++ Optimizing Compiler Version 18.00.21005.1 for x86 Copyright (C) Microsoft Corporation. All rights reserved.

lemon.c _MSC_VER is:1800 but required is:1600 C:\Development\wireshark\config.h(272) : fatal error C1189: #error : Your MSVC_VARIANT setting in config.nmake doesn't match the MS compiler version! NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\cl.EXE"' : return code '0x2' Stop. NMAKE : fatal error U1077: '..\native-nmake.CMD' : return code '0x2' Stop. NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\nmake.exe"' : return code '0x2' Stop.

asked 04 Jun '14, 11:28

aman's gravatar image

aman
36151620
accept rate: 0%

edited 04 Jun '14, 14:09

grahamb's gravatar image

grahamb ♦
19.8k330206


You shouldn't need to set the MSVC_VARIANT in config.nmake for VS2012 onwards. The vcvarsxx batch file you call for your appropriate build sets the environment variable "VisualStudioVersion" and this is picked up by config.nmake.

The default out of the box build doesn't require any changes to config.nmake if you define the following environment variables, adjusting the paths to suit your installation:

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

I also have the following additional variables set out of habit:

set CYGWIN=nodosfilewarning set WIRESHARK_VERSION_EXTRA=-GMB

Revert any changes you have made to any of the source files; git reset --hard, delete all object files and libraries; del /s *.obj and del /s *.lib and try again.

permanent link

answered 04 Jun '14, 14:00

grahamb's gravatar image

grahamb ♦
19.8k330206
accept rate: 22%

Thanks @grahamb that error resolved. it compiles for 4-5 minutes on makefile.nmake all command, and gives an error as :

wireshark-tap-register.c link /NOLOGO /DYNAMICBASE /NXCOMPAT /LARGEADDRESSAWARE /INCREMENTAL:NO /DEBUG /MACHINE:x86 /SafeSEH /FIXED:no /SUBSYSTEM:WINDOWS /MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='' processorArchitecture=''" /VERSION:1.990 /OUT:....\wireshark-qt-release\qtshark.exe C:\Windows\TEMP\nm1858.tmp Qt5Widgets.lib(Qt5Widgets.dll) : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'

NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\link.EXE"' : return code '0x458' Stop.

NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\nmake.EXE"' : return code '0x2' Stop.

(05 Jun '14, 07:09) aman

I cant see your latest reply, but its saying you answered 3 mins ago..?

(05 Jun '14, 07:24) aman

This looks like a linker mismatch again, you're running a 32 bit link (/MACHINE:x86) and attempting to link with a 64 bit library (QT5Widgets.lib).

Have you set QT5_BASE_DIR to point to an x64 version of QT? You can check from your current cmd prompt, run dumpbin /headers %QT5_BASE_DIR%\lib\QT5Widgets.lib > hdrs.txt and looking at the first portion of the output (FILE HEADER VALUES) which will tell you the machine type of the library.

(05 Jun '14, 07:35) grahamb ♦

It gives FILE HEADER VALUES 8664 machine (x64) 3 number of sections 53751489 time date stamp Thu May 15 15:24:57 2014 112 file pointer to symbol table 8 number of symbols 0 size of optional header 0 characteristics

so shall I use cygwin of 32bit for wireshark?

(05 Jun '14, 07:48) aman

and my qt is C:\Qt\Qt5.3.0\5.3\msvc2013_64 so shall this too be for 32 or 64 will do in this case?

(05 Jun '14, 07:50) aman

Your QT is a 64 bit version as shown by the dumpbin output and the path name(msvc2013_64). You need a 32 bit version to build a 32 bit version of Wireshark. Try this one: http://download.qt-project.org/official_releases/qt/5.3/5.3.0/qt-opensource-windows-x86-msvc2013-5.3.0.exe

(05 Jun '14, 08:01) grahamb ♦

and how about cygwin? that also is supposed to be for 32 bit?

(05 Jun '14, 08:12) aman

I have made it all for 32bits, and wireshark has built. When I run packaging it says:

bash -o igncr pod2html --title="asn2deb - The Wires hark Network Analyzer 1.99.0" --css=ws.css --noindex asn2deb.pod > asn2deb.html cd .. set copycmd=/y if not exist wireshark-gtk2 mkdir wireshark-gtk2 xcopy epan\libwireshark.dll wireshark-gtk2 /d

epan\libwireshark.dll

Sharing violation

NMAKE : fatal error U1077: 'C:\Windows\System32\xcopy.EXE' : return code '0x4' Stop.

How to solve this

(05 Jun '14, 11:29) aman

@grahamb cant view your comment..?

(05 Jun '14, 12:11) aman

Something is blocking the copying of epan\libwireshark.dll into the wireshark-gtk2 directory. Do you still have Wireshark running from the wireshark-gtk2 directory after testing your build?

(05 Jun '14, 12:15) grahamb ♦

still some problem, not able to see your comment..:(

(05 Jun '14, 12:16) aman

ya it is running after sucessfull build.. shall I close it and run the packaging command?

(05 Jun '14, 12:18) aman

yes, that should be all you need.

(05 Jun '14, 12:18) grahamb ♦

Thanks for you help and patience @grahamb. It really helped alot. and finally I have my environment build for development..

(05 Jun '14, 12:23) aman

Well done, great tenacity displayed there.

(06 Jun '14, 02:25) grahamb ♦
showing 5 of 15 show 10 more comments

As stated in the error message, you need to edit config.nmake file do as to set MSVC_VARIANT to MSVC2013

permanent link

answered 04 Jun '14, 11:35

Pascal%20Quantin's gravatar image

Pascal Quantin
5.5k1060
accept rate: 30%

edited 04 Jun '14, 13:35

I get this after resolving that error.:

    ml64 -c -coff -Zi -DASMV -DASMINF contrib/masmx64\inffasx64.asm

'ml64' is not recognized as an internal or external command, operable program or batch file.

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

NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0 \VC\BIN\nmake.exe"' : return code '0x2' Stop.

(04 Jun '14, 13:13) aman

Sigh. ml64 is the Visual Studio assembler. I think it's included with the Express editions, but I'm not 100% sure. You seem to be attempting to build a 64 bit version of Wireshark, have you initialised the cmd prompt for an x64 build using the amd64\vcvars64.bat?

I would strongly suggest you build the 32 bit x86 version first, as all the docs and guides are setup for that. Only move to the x64 version after you have successfully built the x86 version, and you must do an nmake -f Makefile.nmake clean first when switching versions

(04 Jun '14, 14:07) grahamb ♦
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
×10
×7

question asked: 04 Jun '14, 11:28

question was seen: 4,277 times

last updated: 06 Jun '14, 02:25

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