GNU bug report logs - #8564
24.0.50; bootstrap on windows 7: `gl-stamp' target failed

Previous Next

Package: emacs;

Reported by: William Xu <william.xwl <at> gmail.com>

Date: Wed, 27 Apr 2011 05:21:01 UTC

Severity: normal

Found in version 24.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 8564 in the body.
You can then email your comments to 8564 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8564; Package emacs. (Wed, 27 Apr 2011 05:21:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to William Xu <william.xwl <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 27 Apr 2011 05:21:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: William Xu <william.xwl <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.0.50; bootstrap on windows 7: `gl-stamp' target failed
Date: Wed, 27 Apr 2011 13:20:17 +0800
Here is the last build log: 

  mkdir "oo-spd"
  mkdir "oo-spd/i386"
  echo oo-spd/i386 > stamp_BLD
  rm gl-tmp
  "../lib-src/oo-spd/i386/make-docfile" -d . -g dosfns.o msdos.o xterm.o xfns.o xmenu.o xselect.o xrdb.o xsmfns.o dbusbind.o dosfns.o msdos.o xterm.o xfns.o xmenu.o xselect.o xrdb.o xsmfns.o fringe.o image.o fontset.o menu.o dbusbind.o w32.o w32console.o w32fns.o w32heap.o w32inevt.o w32menu.o w32proc.o w32reg.o w32select.o w32term.o w32xfns.o font.o w32font.o w32uniscribe.o dispnew.o frame.o scroll.o xdisp.o window.o bidi.o charset.o coding.o category.o ccl.o character.o chartab.o cm.o term.o terminal.o xfaces.o emacs.o keyboard.o macros.o keymap.o sysdep.o buffer.o filelock.o insdel.o marker.o minibuf.o fileio.o dired.o cmds.o casetab.o casefiddle.o indent.o search.o regex.o undo.o alloc.o data.o doc.o editfns.o callint.o eval.o floatfns.o fns.o print.o lread.o syntax.o bytecode.o process.o callproc.o unexw32.o region-cache.o sound.o atimer.o doprnt.o intervals.o textprop.o composite.o > gl-tmp
  cmd /c "fc /b gl-tmp globals.h >nul 2>&1 || cp -f gl-tmp globals.h"
  Microsoft Windows [Version 6.1.7600]
  Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

  l:\bin\emacs\src>

Executing: 
  cmd /c "fc /b gl-tmp globals.h >nul 2>&1 || cp -f gl-tmp globals.h"

directly on cmd.exe seems OK.  I don't know why it fails in
bootstrapping?   I simply replace that line with: 
  cp -f gl-tmp globals.h  # Wouldn't this be simpler & good enough? 

Now it bootstraps.  

-- 
William

http://xwl.appspot.com





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8564; Package emacs. (Wed, 27 Apr 2011 10:30:04 GMT) Full text and rfc822 format available.

Message #8 received at 8564 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: William Xu <william.xwl <at> gmail.com>
Cc: 8564 <at> debbugs.gnu.org
Subject: Re: bug#8564: 24.0.50;
	bootstrap on windows 7: `gl-stamp' target failed
Date: Wed, 27 Apr 2011 06:29:41 -0400
> From: William Xu <william.xwl <at> gmail.com>
> Date: Wed, 27 Apr 2011 13:20:17 +0800
> 
> Here is the last build log: 
> 
>   mkdir "oo-spd"
>   mkdir "oo-spd/i386"
>   echo oo-spd/i386 > stamp_BLD
>   rm gl-tmp
>   "../lib-src/oo-spd/i386/make-docfile" -d . -g dosfns.o msdos.o xterm.o xfns.o xmenu.o xselect.o xrdb.o xsmfns.o dbusbind.o dosfns.o msdos.o xterm.o xfns.o xmenu.o xselect.o xrdb.o xsmfns.o fringe.o image.o fontset.o menu.o dbusbind.o w32.o w32console.o w32fns.o w32heap.o w32inevt.o w32menu.o w32proc.o w32reg.o w32select.o w32term.o w32xfns.o font.o w32font.o w32uniscribe.o dispnew.o frame.o scroll.o xdisp.o window.o bidi.o charset.o coding.o category.o ccl.o character.o chartab.o cm.o term.o terminal.o xfaces.o emacs.o keyboard.o macros.o keymap.o sysdep.o buffer.o filelock.o insdel.o marker.o minibuf.o fileio.o dired.o cmds.o casetab.o casefiddle.o indent.o search.o regex.o undo.o alloc.o data.o doc.o editfns.o callint.o eval.o floatfns.o fns.o print.o lread.o syntax.o bytecode.o process.o callproc.o unexw32.o region-cache.o sound.o atimer.o doprnt.o intervals.o textprop.o composite.o > gl-tmp
>   cmd /c "fc /b gl-tmp globals.h >nul 2>&1 || cp -f gl-tmp globals.h"
>   Microsoft Windows [Version 6.1.7600]
>   Copyright (c) 2009 Microsoft Corporation.  All rights reserved.
> 
>   l:\bin\emacs\src>

Is this something new?  Did you ever bootstrap on that machine, or on
Windows 7 in general?

After you bootstrap, does the same command work for a normal (i.e.,
non-bootstrap) build, or does it fail in the same way?

Finally, what version of Make did you use for that bootstrap?  What
does "make --version" display?  Also, did you use any kind of Unixy
shell (Make announces at the very beginning of the build process
whioch shell it uses)?

>   cp -f gl-tmp globals.h  # Wouldn't this be simpler & good enough? 

No, it's not good enough.  `cp' updates the time stamp of globals.h
each time you build, and therefore all the C files will be recompiled,
because they all include globals.h, even though the contents of
globals.h rarely changes.  That kinda makes Make redundant, since its
main goal is to avoid unnecessary compilations...  The command that
invokes `fc' only updates globals.h if the new version has different
contents.  IOW, this is the Windows way of saying move-if-change.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8564; Package emacs. (Thu, 28 Apr 2011 02:27:01 GMT) Full text and rfc822 format available.

Message #11 received at submit <at> debbugs.gnu.org (full text, mbox):

From: William Xu <william.xwl <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#8564: 24.0.50;
	bootstrap on windows 7: `gl-stamp' target failed
Date: Thu, 28 Apr 2011 10:24:26 +0800
Eli Zaretskii <eliz <at> gnu.org> writes:

   Is this something new?  Did you ever bootstrap on that machine, or on
   Windows 7 in general?

This is the first time i tried to compile emacs on Windows 7.

   After you bootstrap, does the same command work for a normal (i.e.,
   non-bootstrap) build, or does it fail in the same way?

Yes, if i revert my change.  I modified some c files, and run following
command: 

,----[ make gl-stamp ]
| cmd /c "fc /b gl-tmp globals.h >nul 2>&1 || cp -f gl-tmp globals.h"
| Microsoft Windows [Version 6.1.7600]
| Copyright (c) 2009 Microsoft Corporation.  All rights reserved.
| 
| L:\bin\emacs\src>mingw32-make: *** [gl-stamp] Error 66048
`----

   Finally, what version of Make did you use for that bootstrap?  What
   does "make --version" display?  Also, did you use any kind of Unixy
   shell (Make announces at the very beginning of the build process
   whioch shell it uses)?

,----[ mingw32-make --version ]
| GNU Make 3.82
| Built for i386-pc-mingw32
| Copyright (C) 2010  Free Software Foundation, Inc.
| License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
| This is free software: you are free to change and redistribute it.
| There is NO WARRANTY, to the extent permitted by law.
`----

I was compiling in on cmd.exe(i have some unix tools on %path%, though)
The beginning: 

,----
| L:\bin\emacs\src>mingw32-make gl-stamp
| [Please ignore a syntax error on the next line - it is intentional]
| /bin/sh: -c: line 0: unexpected EOF while looking for matching `"'
| /bin/sh: -c: line 1: syntax error: unexpected end of file
| rm gl-tmp
`----

   >   cp -f gl-tmp globals.h  # Wouldn't this be simpler & good enough? 

   No, it's not good enough.  `cp' updates the time stamp of globals.h
   each time you build, and therefore all the C files will be recompiled,
   because they all include globals.h, even though the contents of
   globals.h rarely changes.  That kinda makes Make redundant, since its
   main goal is to avoid unnecessary compilations...  The command that
   invokes `fc' only updates globals.h if the new version has different
   contents.  IOW, this is the Windows way of saying move-if-change.

How about using `diff' here? (considering commands like `cp' is already
dependent? )
  diff gl-tmp globals.h >nul 2>&1 || $(CP) gl-tmp globals.h

-- 
William

http://xwl.appspot.com





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8564; Package emacs. (Thu, 28 Apr 2011 04:54:01 GMT) Full text and rfc822 format available.

Message #14 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: William Xu <william.xwl <at> gmail.com>
Cc: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#8564: 24.0.50;
	bootstrap on windows 7: `gl-stamp' target failed
Date: Thu, 28 Apr 2011 00:53:09 -0400
> From: William Xu <william.xwl <at> gmail.com>
> Date: Thu, 28 Apr 2011 10:24:26 +0800
> 
>    After you bootstrap, does the same command work for a normal (i.e.,
>    non-bootstrap) build, or does it fail in the same way?
> 
> Yes, if i revert my change.  I modified some c files, and run following
> command: 
> 
> ,----[ make gl-stamp ]
> | cmd /c "fc /b gl-tmp globals.h >nul 2>&1 || cp -f gl-tmp globals.h"
> | Microsoft Windows [Version 6.1.7600]
> | Copyright (c) 2009 Microsoft Corporation.  All rights reserved.
> | 
> | L:\bin\emacs\src>mingw32-make: *** [gl-stamp] Error 66048
> `----

So it fails in non-bootstrap case as well.  Good, this makes things
simpler.

> I was compiling in on cmd.exe(i have some unix tools on %path%, though)
> The beginning: 
> 
> ,----
> | L:\bin\emacs\src>mingw32-make gl-stamp
> | [Please ignore a syntax error on the next line - it is intentional]
> | /bin/sh: -c: line 0: unexpected EOF while looking for matching `"'
> | /bin/sh: -c: line 1: syntax error: unexpected end of file
> | rm gl-tmp
> `----

Uh-oh!  Is this the MSYS port of Bash, by any chance?  Or maybe the
Cygwin Bash?  If so, can you remove sh.exe from PATH and try again?
At least the MSYS Bash has a nasty habit of munging the command-line
arguments if it "thinks" that those arguments are Unix-style /foo/bar
file names.  So my crystal ball says that it "thinks" "/c" in "cmd /c"
is such a file name and changes it to something like "cmd L:/c", which
of course totally confuses cmd.exe.

You will see that nt/INSTALL advises against the MSYS shell:

                           MSYS sh.exe also appears to cause various
  problems.  If you have MSYS installed, try "make SHELL=cmd.exe" to
  force the use of cmd.exe instead of sh.exe.

>    >   cp -f gl-tmp globals.h  # Wouldn't this be simpler & good enough? 
> 
>    No, it's not good enough.  `cp' updates the time stamp of globals.h
>    each time you build, and therefore all the C files will be recompiled,
>    because they all include globals.h, even though the contents of
>    globals.h rarely changes.  That kinda makes Make redundant, since its
>    main goal is to avoid unnecessary compilations...  The command that
>    invokes `fc' only updates globals.h if the new version has different
>    contents.  IOW, this is the Windows way of saying move-if-change.
> 
> How about using `diff' here? (considering commands like `cp' is already
> dependent? )
>   diff gl-tmp globals.h >nul 2>&1 || $(CP) gl-tmp globals.h

Using Diff means we ask the Windows users to have yet another
non-standard package installed as a prerequisite to building Emacs.  I
would like to avoid that if possible; `fc' is a standard program on
every Windows machine, and it does this particular job just fine.

It is also unsafe to use this command without going through "cmd /c",
because ported Unixy shells generally don't know about "NUL" being the
Windows null device, while cmd.exe doesn't know about "/dev/null".

Anyway, I think your problem is not with `fc', it's with "cmd /c".  So
using Diff won't solve it.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8564; Package emacs. (Thu, 28 Apr 2011 06:22:02 GMT) Full text and rfc822 format available.

Message #17 received at submit <at> debbugs.gnu.org (full text, mbox):

From: William Xu <william.xwl <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#8564: 24.0.50;
	bootstrap on windows 7: `gl-stamp' target failed
Date: Thu, 28 Apr 2011 14:19:20 +0800
Eli Zaretskii <eliz <at> gnu.org> writes:

   Uh-oh!  Is this the MSYS port of Bash, by any chance?  Or maybe the
   Cygwin Bash?  If so, can you remove sh.exe from PATH and try again?
   At least the MSYS Bash has a nasty habit of munging the command-line
   arguments if it "thinks" that those arguments are Unix-style /foo/bar
   file names.  So my crystal ball says that it "thinks" "/c" in "cmd /c"
   is such a file name and changes it to something like "cmd L:/c", which
   of course totally confuses cmd.exe.

   You will see that nt/INSTALL advises against the MSYS shell:

                              MSYS sh.exe also appears to cause various
     problems.  If you have MSYS installed, try "make SHELL=cmd.exe" to
     force the use of cmd.exe instead of sh.exe.

OK.  That is the problem! It is a MSYS bash, included in msys-git.
Thanks.  

It seems kind of nasty, though.  We reply on unix tools like cp, rm,
etc, but they are often bundled together with sh.  Maybe add the above
note to "* For the impatient" section as well would be a good idea?

-- 
William

http://xwl.appspot.com





Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Thu, 28 Apr 2011 17:28:02 GMT) Full text and rfc822 format available.

Notification sent to William Xu <william.xwl <at> gmail.com>:
bug acknowledged by developer. (Thu, 28 Apr 2011 17:28:02 GMT) Full text and rfc822 format available.

Message #22 received at 8564-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: William Xu <william.xwl <at> gmail.com>
Cc: 8564-done <at> debbugs.gnu.org
Subject: Re: bug#8564: 24.0.50;
	bootstrap on windows 7: `gl-stamp' target failed
Date: Thu, 28 Apr 2011 20:26:58 +0300
> From: William Xu <william.xwl <at> gmail.com>
> Date: Thu, 28 Apr 2011 14:19:20 +0800
> 
> OK.  That is the problem! It is a MSYS bash, included in msys-git.
> Thanks.  

Thanks for helping me unlock this mystery.

> It seems kind of nasty, though.  We reply on unix tools like cp, rm,
> etc, but they are often bundled together with sh.

Only the Cygwin and MSYS versions of these tools come with sh.  The
GnuWin32 ports don't.

> Maybe add the above note to "* For the impatient" section as well
> would be a good idea?

Done.

I'm closing this bug.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 27 May 2011 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 12 years and 346 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.