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

Build was working on WindowsXP, but now it fails to build in Win7 x64

0

I have a source tree of Wireshark 1.4.9 that builds grreat in WindowsXP. I am moving to a Windows 7 x64 box now and need it to build there. So I did all the normal stuff (install VS 2008ee, install the right cygwin packages) but I get an error from nmake (see below). There are lots of google hits on the U1045 error code, but they all lead no where. I have tried the usual tricks of running from an elevated command prompt and checking the environment to no avail.

>nmake -f Makefile.nmake verify_tools

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

Checking for required applications:

cl: /cygdrive/c/Program Files (x86)/Microsoft Visual Studio 9.0/VC/BIN/cl link: /cygdrive/c/Program Files (x86)/Microsoft Visual Studio 9.0/VC/BIN/link nmake: /cygdrive/c/Program Files (x86)/Microsoft Visual Studio 9.0/VC/BIN/nmake mt: /cygdrive/c/Program Files/Microsoft SDKs/Windows/v6.0A/bin/mt 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

>nmake -f Makefile.nmake

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

cd tools "c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\nmake.exe" / -f Makefile.nmake

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

cd lemon ..\native-nmake "c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\nmake.exe" / -f Makefile.nmake NMAKE : fatal error U1045: spawn failed : No error Stop. NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\nmake.exe"' : return code '0x2' Stop.

asked 29 Nov ‘11, 13:38

bobwhite's gravatar image

bobwhite
1112
accept rate: 100%

edited 29 Nov ‘11, 13:51

multipleinterfaces's gravatar image

multipleinte…
1.3k152340


2 Answers:

0

I FIXED IT!!!!!!!!!!!!!!!!!!!!!!

I did a "check out" of the native-nmake.cmd file (we use clearcase for CM) so then it was "writable". Now the build completes fine!

Can anyone explain such a thing to me? Why would native-name.cmd need to be writable to be spawned by nmake?????

answered 30 Nov '11, 08:04

bobwhite's gravatar image

bobwhite
1112
accept rate: 100%

Are you sure native-nmake.cmd was executable before? In SVN it has the property svn:executable set. Its writability shouldn't make a difference.

(30 Nov '11, 11:37) Gerald Combs ♦♦

Indeed, you make a good point. I dug around and found I can set an "execute" bit in the MVFS view. Upon doing this, the build also works without having to checkout anything. But it appears to be a setting to only my view. So others would have to set it as well? At this point it becomes a clearcase usage question so I will take it elsewhere. Thank you all for your help!

(01 Dec '11, 08:04) bobwhite

1

I have done essentially the same thing myself, i.e., moved from Windows XP x86 to Windows 7 x86_64, except for the 1.6 and trunk branches instead of the 1.4 branch. If at all possible, I'd recommend the latest version.

I started with the Win64 Development wiki page, which you might also want to take a look at. However, I took some notes of my experience and here are the steps I took (as far as I recall and actually wrote down ... although I can't guarantee these notes are 100% complete):

  1. Install Microsoft Visual Studio 2010 Express Edition.
  2. Check for and install any updates.
  3. Download vcredist_x64.exe and save it to C:\wireshark-win64-libs\.
  4. Download and install Microsoft SDK.
  5. Download and install cygwin.
  6. Download and install Python (2.7.2).
  7. Download and extract the Wireshark sources.
  8. If you plan to create a Wireshark installer, download and install NSIS (2.4.6).
  9. Edit Wireshark's config.nmake file, setting:

    • MSVC_VARIANT=MSVC2010 (Yes, I know intuitively it should be set to MSVC2010EE, but I found that setting it to MSVC2010EE didn't work. I don't know why.)
    • MAKENSIS="$(PROGRAM_FILES) (x86)\NSIS\makensis.exe"
    • WIRESHARK_TARGET_PLATFORM=win64 (Alternatively, you can set this as an environment variable.)
  10. From the Windows SDK 7.1 command prompt:

    • nmake -f Makefile.nmake setup
    • nmake -f Makefile.nmake distclean
    • nmake -f Makefile.nmake all
    • nmake -f Makefile.nmake packaging
    • etc.

answered 29 Nov '11, 19:36

cmaynard's gravatar image

cmaynard ♦♦
9.4k1038142
accept rate: 20%

edited 29 Nov '11, 19:47

Thank you so much for the reply. It appears you are building the 64bit version on Win7. I desire to build a 32bit version so it will still run on both flavors of windows (for my fellow workers who still only hae XP machines, ha!).

A co-worker was able to build my 32-bit code base on his win7 x64 machine, so I must have some problem with my cygwin installation. My cygwin throws a error upon launching that his does not ("/usr/bin/mintty: could not load icon from /Cygwin-Terminal.ico"). I have tried everything to fix it but it must be some Windows update I have that he does not. Are the two problems related? Maybe not, but it's all I have to go on right now.

Anyone else have cygwin installed on Win7 x64? Does your desktop icon work without modification?

Thanks!

(30 Nov '11, 07:08) bobwhite