Wireshark-bugs: [Wireshark-bugs] [Bug 4359] New: nmake call to cygwin 1.7.1 bash fails if win32

Date: Sun, 27 Dec 2009 09:11:46 -0800 (PST)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4359

           Summary: nmake call to cygwin 1.7.1 bash fails if win32 style
                    backslash path delimiters
           Product: Wireshark
           Version: 1.3.x (Experimental)
          Platform: Other
        OS/Version: Windows XP
            Status: NEW
          Severity: Major
          Priority: Low
         Component: Wireshark
        AssignedTo: wireshark-bugs@xxxxxxxxxxxxx
        ReportedBy: jyoung@xxxxxxx


Build Information:
Version 1.3.3 (SVN Rev 31363 from /trunk)

Copyright 1998-2009 Gerald Combs <gerald@xxxxxxxxxxxxx> and contributors.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Compiled with GTK+ 2.18.5, with GLib 2.22.3, with WinPcap (version unknown),
with libz 1.2.3, without POSIX capabilities, without libpcre, with SMI 0.4.8,
with c-ares 1.7.0, with Lua 5.1, without Python, with GnuTLS 2.8.5, with Gcrypt
1.4.5, with MIT Kerberos, with GeoIP, with PortAudio V19-devel (built Dec 25
2009), with AirPcap, with new_packet_list.

Running on Windows XP Service Pack 3, build 2600, with WinPcap version 4.1.1
(packet.dll version 4.1.0.1753), based on libpcap version 1.0 branch 1_0_rel0b
(20091008), GnuTLS 2.8.5, Gcrypt 1.4.5, with AirPcap 4.1.0 build 1622.

Built using Microsoft Visual C++ 9.0 build 30729

Wireshark is Open Source Software released under the GNU General Public
License.

Check the man page and http://www.wireshark.org for more information.
--
Hello,

nmake fails to build Wireshark after upgrade of cygwin from 1.5.x to 1.7.x
(released 2009-25-23)...

Here'e the actual nmake error I see:

> C:\projects\wireshark>nmake -f Makefile.nmake all
> 
> Microsoft (R) Program Maintenance Utility Version 9.00.30729.01
> Copyright (C) Microsoft Corporation.  All rights reserved.
> 
> cygwin warning:
>   MS-DOS style path detected: tools\win32-setup.sh
>   Preferred POSIX equivalent is: tools/win32-setup.sh
>   CYGWIN environment variable option "nodosfilewarning" turns off this warning.
>   Consult the user's guide for more details about POSIX paths:
>     http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
> tools\win32-setup.sh: line 12: exec: tools\win-setup.sh: not found
> ? 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.
> 
> C:\projects\wireshark>

Setting the Windows's cmd shell environment variable CYGWIN=nodosfilewarning
suppresses the cygwin warning but it does NOT actually fix the problem...

> C:\projects\wireshark>set CYGWIN
> Environment variable CYGWIN not defined
> 
> C:\projects\wireshark>set CYGWIN=nodosfilewarning
> 
> C:\projects\wireshark>set CYGWIN
> CYGWIN=nodosfilewarning
> 
> C:\projects\wireshark>nmake -f Makefile.nmake all
> 
> Microsoft (R) Program Maintenance Utility Version 9.00.30729.01
> Copyright (C) Microsoft Corporation.  All rights reserved.
> 
> tools\win32-setup.sh: line 12: exec: tools\win-setup.sh: not found
> ? 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.
> 
> C:\projects\wireshark>

Changing the WIN_SETUP= line in the main Makefile.nmake file to use a POSIX
style forward slash path delimiter instead of using a Win32 style backslash
delimiter resolves the nmake problem:

e.g.

> -WIN_SETUP=tools\$(WIRESHARK_TARGET_PLATFORM)-setup.sh
> +WIN_SETUP=tools/$(WIRESHARK_TARGET_PLATFORM)-setup.sh

The online cygwin documentation has some interesting information regarding
forward slashes (POSIX paths) versus backslashes (Win32 paths) in the section
"Mapping Path Names" at:

   http://cygwin.com/cygwin-ug-net/using.html#using-pathnames

I think this new nmake behavior under the 1.7.1 cygwin and bash is best
summerized in the cygwin doc cited above in the line "... Win32 paths and file
access might fail in surprising ways."

For the record here's the version of cygwin and bash I an now using...

> me@d520  /cygdrive/c/projects/wireshark
> $ uname -a
> CYGWIN_NT-5.1 jhy-d520 1.7.1(0.218/5/3) 2009-12-07 11:48 i686 Cygwin
> 
> me@d520  /cygdrive/c/projects/wireshark
> $ bash --version
> bash --version
> GNU bash, version 3.2.49(23)-release (i686-pc-cygwin)
> Copyright (C) 2007 Free Software Foundation, Inc.
> 
> me@d520 /cygdrive/c/projects/wireshark
> $

Unfortunatly this new cygwin 1.7.1 bash POSIX versus Win32 path name issue in
nmake has implications for previous Wireshark builds.  Specfically if one has
the newer 1.7.1 cygwin they will probably need to make the one line change to
Makefile.nmake noted above to any older versions to successfully build (I had
to).  I haven't reverted back to the older 1.5.x cygwin to see if the one line
Makefile.nmake fix noted above breaks older cygwin version users.

-- 
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.