Wireshark-dev: [Wireshark-dev] Couldn't unpack C:\WIRESH~1/zlib123ws.zip -- with solution
From: Ed Beroset <[email protected]>
Date: Mon, 01 Feb 2010 09:23:00 -0500
I encountered a problem building Wireshark today on a Windows XP box that seems to have been encountered before, but searching on the web yielded no answer. For that reason, I thought I'd describe both the symptoms and the fix so that the next individual to encounter this might be able to find this solution a little easier.
The problem manifests itself like this:
Extracting C:\WIRESH~1/zlib123ws.zip into C:\WIRESH~1/zlib123
ERROR: Couldn't unpack C:\WIRESH~1/zlib123ws.zip
NMAKE : fatal error U1077: 'C:\cygwin\bin\bash.EXE' : return code '0x1'
Stop.

When I unzipped the file from within a cygwin shell, everything worked just fine. Eventually, I figured it out and it turned out to be quite simple. I had another (old) version of unzip in the C:\WINDOWS directory. By coincidence, the older version worked just fine on all of the library files before that one, but failed on zlib123ws.zip because it happened to use the "enhanced deflate" compression scheme which the old version of unzip could identify but not use.
If anyone has this problem in the future, there are a few things to try 
that may help them out.  First, the output of verify_tools pointed to 
the version it was actually using, had I read it more carefully.  With 
an up-to-date cygwin, the line *should* show:
	unzip: /usr/bin/unzip

Second, one can temporarily change the tools/win-setup.sh file from this pair of lines:
    unzip -oq "$DEST_PATH/$PACKAGE" ||
	 	err_exit "Couldn't unpack $DEST_PATH/$PACKAGE"

to something like this:
    unzip -o "$DEST_PATH/$PACKAGE" > "$DEST_PATH/zip.log" ||
	 	err_exit "Couldn't unpack $DEST_PATH/$PACKAGE"

Then the contents of the zip.log file will contain the error messages relevant to the failure. I leave it to you all to decide whether such a change is worth making in the main line build.
Ed Beroset