unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Proposed change to nt/INSTALL
@ 2011-05-04 23:35 Ben Key
  2011-05-05  0:54 ` Ben Key
  2011-05-05  1:18 ` Proposed change to nt/INSTALL Juanma Barranquero
  0 siblings, 2 replies; 27+ messages in thread
From: Ben Key @ 2011-05-04 23:35 UTC (permalink / raw)
  To: Emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1387 bytes --]

Hello,

I have finally been able to get back to working on my patch to configure.bat
to support --cflags and --ldflags options that include quotes.  The
following is a proposed new paragraph for nt/INSTALL.  This paragraph will
come after the paragraph that starts with "Support for options that include
the `=' character require "command extensions" to be enabled."

  You may also use the --cflags option to specify additional include
  directories (via the -I option) and the --ldflags option to specify
  additional library directories (via the -L option).  If a directory
  name includes spaces, you will need to enclose the directory name in
  quotes, as follows -I"C:/Program Files/GnuTLS-2.10.1/include."  Note
  that the directory name is enclosed in quotes, not the entire
  argument.  Also note that this functionality is only supported if
  command extensions are available.  If command extensions are disabled
  and you attempt to use this functionality you may see the following
  warning message "Error in --cflags argument: ... Backslashes and
  quotes cannot be used with --cflags.  Please use forward slashes for
  filenames and paths (e.g. when passing directories to -I)."

I would appreciate any input on this change.

The only other thing I need to do to complete this patch is to test it in
Windows 2000 and Windows XP.  So far I have only tested it in Windows 7.

[-- Attachment #2: Type: text/html, Size: 1561 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Proposed change to nt/INSTALL
  2011-05-04 23:35 Proposed change to nt/INSTALL Ben Key
@ 2011-05-05  0:54 ` Ben Key
  2011-05-05  5:08   ` Bootstrap failure with new configure.bat (was Re: Proposed change to nt/INSTALL) Christoph Scholtes
  2011-05-05  1:18 ` Proposed change to nt/INSTALL Juanma Barranquero
  1 sibling, 1 reply; 27+ messages in thread
From: Ben Key @ 2011-05-05  0:54 UTC (permalink / raw)
  To: Emacs-devel

[-- Attachment #1: Type: text/plain, Size: 191 bytes --]

Hello,

I have now tested my configure.bat changes on both Windows 2000 and Windows
XP in addition to Windows 7.  Once I have some input on the change to
nt/INSTALL I will commit the change.

[-- Attachment #2: Type: text/html, Size: 226 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Proposed change to nt/INSTALL
  2011-05-04 23:35 Proposed change to nt/INSTALL Ben Key
  2011-05-05  0:54 ` Ben Key
@ 2011-05-05  1:18 ` Juanma Barranquero
  2011-05-05  1:47   ` Ben Key
  1 sibling, 1 reply; 27+ messages in thread
From: Juanma Barranquero @ 2011-05-05  1:18 UTC (permalink / raw)
  To: Ben Key; +Cc: Emacs-devel

On Thu, May 5, 2011 at 01:35, Ben Key <bkey76@gmail.com> wrote:

> I would appreciate any input on this change.

At the start:

>   You may also use the --cflags option to specify additional include
>   directories (via the -I option) and the --ldflags option to specify
>   additional library directories (via the -L option).

this is too specific. GCC, for example, has tons of options, many of
which allow directories and filenames. So I think it would be better
something like this:

  You may also use the --cflags and --ldflags options to pass
  additional parameters to the compiler and linker, respectively; they
  are frequently used to pass -I and -L flags to specify supplementary
  include and library directories.

Two minor stylistic points:

>   if a directory
>   name includes spaces, you will need to enclose the directory name in
>   quotes,

I would remove the second "directory".

> as follows -I"C:/Program Files/GnuTLS-2.10.1/include."

I know the silly typographical convention about the position of the
dot, but that is not a quotation, is an argument for program. So
please use

  -I"C:/Program Files/GnuTLS-2.10.1/include".

Hope this helps,

    Juanma



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Proposed change to nt/INSTALL
  2011-05-05  1:18 ` Proposed change to nt/INSTALL Juanma Barranquero
@ 2011-05-05  1:47   ` Ben Key
  2011-05-05  2:05     ` Juanma Barranquero
  2011-05-05  3:01     ` Eli Zaretskii
  0 siblings, 2 replies; 27+ messages in thread
From: Ben Key @ 2011-05-05  1:47 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: Emacs-devel

[-- Attachment #1: Type: text/plain, Size: 916 bytes --]

Hello,

Thank you for your input.  How about the following?

  You may also use the --cflags and --ldflags options to pass
  additional parameters to the compiler and linker, respectively; they
  are frequently used to pass -I and -L flags to specify supplementary
  include and library directories.  If a directory name includes
  spaces, you will need to enclose it in quotes, as follows
  -I"C:/Program Files/GnuTLS-2.10.1/include".  Note that the directory
  name is enclosed in quotes, not the entire argument.  Also note that
  this functionality is only supported if command extensions are
  available.  If command extensions are disabled and you attempt to use
  this functionality you may see the following warning message "Error
  in --cflags argument: ... Backslashes and quotes cannot be used with
  --cflags.  Please use forward slashes for filenames and paths (e.g.
  when passing directories to -I)."

[-- Attachment #2: Type: text/html, Size: 1049 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Proposed change to nt/INSTALL
  2011-05-05  1:47   ` Ben Key
@ 2011-05-05  2:05     ` Juanma Barranquero
  2011-05-05  3:01     ` Eli Zaretskii
  1 sibling, 0 replies; 27+ messages in thread
From: Juanma Barranquero @ 2011-05-05  2:05 UTC (permalink / raw)
  To: Ben Key; +Cc: Emacs-devel

On Thu, May 5, 2011 at 03:47, Ben Key <bkey76@gmail.com> wrote:

> How about the following?

I think it's quite clear and readable.

Another nitpick (the last one, I promise):

>  Note that the directory
>   name is enclosed in quotes, not the entire argument.

I would tend to say: "Note that only the directory name [...]".

    Juanma



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Proposed change to nt/INSTALL
  2011-05-05  1:47   ` Ben Key
  2011-05-05  2:05     ` Juanma Barranquero
@ 2011-05-05  3:01     ` Eli Zaretskii
  1 sibling, 0 replies; 27+ messages in thread
From: Eli Zaretskii @ 2011-05-05  3:01 UTC (permalink / raw)
  To: Ben Key; +Cc: lekktu, Emacs-devel

> From: Ben Key <bkey76@gmail.com>
> Date: Wed, 4 May 2011 20:47:20 -0500
> Cc: Emacs-devel@gnu.org
> 
>   You may also use the --cflags and --ldflags options to pass
>   additional parameters to the compiler and linker, respectively; they
>   are frequently used to pass -I and -L flags to specify supplementary
>   include and library directories.  If a directory name includes
>   spaces, you will need to enclose it in quotes, as follows
>   -I"C:/Program Files/GnuTLS-2.10.1/include".  Note that the directory
>   name is enclosed in quotes, not the entire argument.  Also note that
>   this functionality is only supported if command extensions are
>   available.  If command extensions are disabled and you attempt to use
>   this functionality you may see the following warning message "Error
>   in --cflags argument: ... Backslashes and quotes cannot be used with
>   --cflags.  Please use forward slashes for filenames and paths (e.g.
>   when passing directories to -I)."

OK, with the correction suggested by Juanma.

Thanks.



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Bootstrap failure with new configure.bat (was Re: Proposed change to nt/INSTALL)
  2011-05-05  0:54 ` Ben Key
@ 2011-05-05  5:08   ` Christoph Scholtes
  2011-05-05 10:34     ` Eli Zaretskii
  0 siblings, 1 reply; 27+ messages in thread
From: Christoph Scholtes @ 2011-05-05  5:08 UTC (permalink / raw)
  To: Ben Key; +Cc: Eli Zaretskii, Emacs-devel

Hi Ben,

On 5/4/2011 6:54 PM, Ben Key wrote:

> I have now tested my configure.bat changes on both Windows 2000 and
> Windows XP in addition to Windows 7.  Once I have some input on the
> change to nt/INSTALL I will commit the change.

Did you try to compile with a flag that includes spaces?

I changed

--cflags -IC:/Progra~2/GnuWin32/include

to

--cflags -I"C:/Program Files (x86)/GnuWin32/include"

and get the following error:

gcc -I. -c -gdwarf-2 -g3 -mno-cygwin -mtune=pentium4 -O2 
-DENABLE_CHECKING -DXASSERTS -fno-crossjumping  -IC:/Program -o 
oo-spd/i386/emacs.o emacs.c
emacs.c:22:20: fatal error: config.h: No such file or directory 
compilation terminated.
mingw32-make[2]: *** [oo-spd/i386/emacs.o] Error 1
mingw32-make[2]: Leaving directory 
`D:/devel/emacs/emacs-bzr/trunk_readonly/src'
mingw32-make[1]: *** [bootstrap-temacs] Error 2
mingw32-make[1]: Leaving directory 
`D:/devel/emacs/emacs-bzr/trunk_readonly/src'
mingw32-make: *** [bootstrap-gmake] Error 2

Obviously, the CFLAG `-IC:/Program' is the culprit here. The gcc command 
is generated correctly if the directory name does not contain any spaces.

Earlier in the bootstrap during compilation of temacs the command is 
correctly generated, for example:

gcc -I. -c -gdwarf-2 -g3 -mno-cygwin -mtune=pentium4 -O2 
-DENABLE_CHECKING -DXASSERTS -fno-crossjumping  -I"C:/Program Files 
(x86)/GnuWin32/include" -ID:/devel/emacs/libXpm-3.5.8/include 
-ID:/devel/emacs/libXpm-3.5.8/src -ID:/devel/emacs/gnutls-2.8.6/include 
-DHAVE_CONFIG_H=1 -I. -I../nt/inc -I../src -o oo-spd/i386/filemode.o 
filemode.c

Eli,
do you have any idea why the part after the first space gets stripped of 
in some cases and in some cases it doesn't?

Christoph



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Bootstrap failure with new configure.bat (was Re: Proposed change to nt/INSTALL)
  2011-05-05  5:08   ` Bootstrap failure with new configure.bat (was Re: Proposed change to nt/INSTALL) Christoph Scholtes
@ 2011-05-05 10:34     ` Eli Zaretskii
  2011-05-05 12:34       ` Christoph Scholtes
  0 siblings, 1 reply; 27+ messages in thread
From: Eli Zaretskii @ 2011-05-05 10:34 UTC (permalink / raw)
  To: Christoph Scholtes; +Cc: Emacs-devel, bkey76

> Date: Wed, 04 May 2011 23:08:31 -0600
> From: Christoph Scholtes <cschol2112@googlemail.com>
> CC: Emacs-devel@gnu.org, Eli Zaretskii <eliz@gnu.org>
> 
> gcc -I. -c -gdwarf-2 -g3 -mno-cygwin -mtune=pentium4 -O2 
> -DENABLE_CHECKING -DXASSERTS -fno-crossjumping  -IC:/Program -o 
> oo-spd/i386/emacs.o emacs.c
> emacs.c:22:20: fatal error: config.h: No such file or directory 
> compilation terminated.
> mingw32-make[2]: *** [oo-spd/i386/emacs.o] Error 1
> mingw32-make[2]: Leaving directory 
> `D:/devel/emacs/emacs-bzr/trunk_readonly/src'
> mingw32-make[1]: *** [bootstrap-temacs] Error 2
> mingw32-make[1]: Leaving directory 
> `D:/devel/emacs/emacs-bzr/trunk_readonly/src'
> mingw32-make: *** [bootstrap-gmake] Error 2
> 
> Obviously, the CFLAG `-IC:/Program' is the culprit here. The gcc command 
> is generated correctly if the directory name does not contain any spaces.
> 
> Earlier in the bootstrap during compilation of temacs the command is 
> correctly generated, for example:
> 
> gcc -I. -c -gdwarf-2 -g3 -mno-cygwin -mtune=pentium4 -O2 
> -DENABLE_CHECKING -DXASSERTS -fno-crossjumping  -I"C:/Program Files 
> (x86)/GnuWin32/include" -ID:/devel/emacs/libXpm-3.5.8/include 
> -ID:/devel/emacs/libXpm-3.5.8/src -ID:/devel/emacs/gnutls-2.8.6/include 
> -DHAVE_CONFIG_H=1 -I. -I../nt/inc -I../src -o oo-spd/i386/filemode.o 
> filemode.c
> 
> Eli,
> do you have any idea why the part after the first space gets stripped of 
> in some cases and in some cases it doesn't?

Recursive Make invocations?

Anyway, the answer to that is in the Makefiles (in nt/ and src/) and
in config.h generated by configure.bat.  If you cannot figure this
out, post them here, perhaps with the full transcript of the bootstrap
from the start till it fails, and someone will have the answer.

Also, do you have some sh.exe on PATH?  If so, try without it.



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Bootstrap failure with new configure.bat (was Re: Proposed change to nt/INSTALL)
  2011-05-05 10:34     ` Eli Zaretskii
@ 2011-05-05 12:34       ` Christoph Scholtes
  2011-05-05 16:38         ` Ben Key
  0 siblings, 1 reply; 27+ messages in thread
From: Christoph Scholtes @ 2011-05-05 12:34 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Emacs-devel, bkey76

On 5/5/2011 4:34 AM, Eli Zaretskii wrote:

> Recursive Make invocations?
>
> Anyway, the answer to that is in the Makefiles (in nt/ and src/) and
> in config.h generated by configure.bat.  If you cannot figure this
> out, post them here, perhaps with the full transcript of the bootstrap
> from the start till it fails, and someone will have the answer.

OK, I will have a look there. Thanks for the pointers.

> Also, do you have some sh.exe on PATH?  If so, try without it.

No. I made sure cygwin and UnxUtils are removed from the PATH.

Christoph



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Bootstrap failure with new configure.bat (was Re: Proposed change to nt/INSTALL)
  2011-05-05 12:34       ` Christoph Scholtes
@ 2011-05-05 16:38         ` Ben Key
  2011-05-05 16:44           ` Juanma Barranquero
  2011-05-05 17:01           ` Eli Zaretskii
  0 siblings, 2 replies; 27+ messages in thread
From: Ben Key @ 2011-05-05 16:38 UTC (permalink / raw)
  To: Christoph Scholtes; +Cc: Eli Zaretskii, Emacs-devel

[-- Attachment #1: Type: text/plain, Size: 984 bytes --]

Christoph Scholtes wrote:

> Did you try to compile with a flag that includes spaces?

Yes I did.  Here is how I ran configure.

configure.bat --with-gcc --no-opt --without-png --without-jpeg
 --without-gif --without-tiff --without-xpm
 --prefix=C:\emacs-24-test
 --cflags=-I"C:/Program Files/GnuTLS-2.10.1/include"
 --cflags=-DXMALLOC_CLEAR_FREE_MEMORY

And this is how emacs.c was compiled.

gcc -I. -c -gdwarf-2 -g3  -DEMACSDEBUG
  -I"C:/Program Files/GnuTLS-2.10.1/include"
  -DXMALLOC_CLEAR_FREE_MEMORY -Demacs=1
  -DHAVE_CONFIG_H -I../lib -I../nt/inc
  -DHAVE_NTGUI=1 -DUSE_CRT_DLL=1
  -DPURESIZE=5000000 -o oo/i386/emacs.o emacs.c

Note that where you have -IC:/Program I have
-I"C:/Program Files/GnuTLS-2.10.1/include."  Very interesting.

Another thing I find to be interesting is that you mentioned that emacs.c
was compiled twice and that the command was correct the first time.  I only
see emacs.c being compiled once.

I will have to look into this further this evening.

[-- Attachment #2: Type: text/html, Size: 1146 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Bootstrap failure with new configure.bat (was Re: Proposed change to nt/INSTALL)
  2011-05-05 16:38         ` Ben Key
@ 2011-05-05 16:44           ` Juanma Barranquero
  2011-05-05 17:01           ` Eli Zaretskii
  1 sibling, 0 replies; 27+ messages in thread
From: Juanma Barranquero @ 2011-05-05 16:44 UTC (permalink / raw)
  To: Ben Key; +Cc: Christoph Scholtes, Eli Zaretskii, Emacs-devel

On Thu, May 5, 2011 at 18:38, Ben Key <bkey76@gmail.com> wrote:

> Another thing I find to be interesting is that you mentioned that emacs.c
> was compiled twice and that the command was correct the first time.  I only
> see emacs.c being compiled once.

But emacs.c is compiled twice during bootstrap, and Christoph's
problem is specifically a bootstrap failure...

    Juanma



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Bootstrap failure with new configure.bat (was Re: Proposed change to nt/INSTALL)
  2011-05-05 16:38         ` Ben Key
  2011-05-05 16:44           ` Juanma Barranquero
@ 2011-05-05 17:01           ` Eli Zaretskii
  2011-05-05 19:07             ` Ben Key
  2011-05-06 13:23             ` Stefan Monnier
  1 sibling, 2 replies; 27+ messages in thread
From: Eli Zaretskii @ 2011-05-05 17:01 UTC (permalink / raw)
  To: Ben Key; +Cc: cschol2112, Emacs-devel

> From: Ben Key <bkey76@gmail.com>
> Date: Thu, 5 May 2011 11:38:51 -0500
> Cc: Eli Zaretskii <eliz@gnu.org>, Emacs-devel@gnu.org
> 
> gcc -I. -c -gdwarf-2 -g3  -DEMACSDEBUG
>   -I"C:/Program Files/GnuTLS-2.10.1/include"
>   -DXMALLOC_CLEAR_FREE_MEMORY -Demacs=1
>   -DHAVE_CONFIG_H -I../lib -I../nt/inc
>   -DHAVE_NTGUI=1 -DUSE_CRT_DLL=1
>   -DPURESIZE=5000000 -o oo/i386/emacs.o emacs.c
> 
> Note that where you have -IC:/Program I have
> -I"C:/Program Files/GnuTLS-2.10.1/include."  Very interesting.
> 
> Another thing I find to be interesting is that you mentioned that emacs.c
> was compiled twice and that the command was correct the first time.  I only
> see emacs.c being compiled once.

Look again.  The above compilation command line, with
"-DPURESIZE=5000000", is the first compilation.  Then all Lisp files
are compiled.  And finally all the C files are recompiled without the
"-DPURESIZE=5000000" option.  This is how bootstrap works on Windows.

Christoph reported a failure during the second compilation.



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Bootstrap failure with new configure.bat (was Re: Proposed change to nt/INSTALL)
  2011-05-05 17:01           ` Eli Zaretskii
@ 2011-05-05 19:07             ` Ben Key
  2011-05-05 20:29               ` Eli Zaretskii
  2011-05-06 13:23             ` Stefan Monnier
  1 sibling, 1 reply; 27+ messages in thread
From: Ben Key @ 2011-05-05 19:07 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: cschol2112, Emacs-devel

[-- Attachment #1: Type: text/plain, Size: 872 bytes --]

Hello,

I tried again, this time redirecting output of the mingw32-make bootstrap
command to a file to make searching easier.  This time I do see emacs.c
being compiled twice.

The first time it is compiled as follows:
gcc -I. -c -gdwarf-2 -g3  -DEMACSDEBUG
  -I"C:/Program Files/GnuTLS-2.10.1/include"
  -DXMALLOC_CLEAR_FREE_MEMORY -Demacs=1 -DHAVE_CONFIG_H -I../lib
  -I../nt/inc -DHAVE_NTGUI=1 -DUSE_CRT_DLL=1 -DPURESIZE=5000000
  -o oo/i386/emacs.o emacs.c

The second time it is compiled as follows:
gcc -I. -c -gdwarf-2 -g3  -DEMACSDEBUG
  -I"C:/Program Files/GnuTLS-2.10.1/include"
  -DXMALLOC_CLEAR_FREE_MEMORY -Demacs=1 -DHAVE_CONFIG_H -I../lib
  -I../nt/inc -DHAVE_NTGUI=1 -DUSE_CRT_DLL=1
  -o oo/i386/emacs.o emacs.c

Note that both times -I"C:/Program Files/GnuTLS-2.10.1/include" was used.  I
have no idea why Christoph is having problems.

Very interesting.

[-- Attachment #2: Type: text/html, Size: 983 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Bootstrap failure with new configure.bat (was Re: Proposed change to nt/INSTALL)
  2011-05-05 19:07             ` Ben Key
@ 2011-05-05 20:29               ` Eli Zaretskii
  2011-05-05 23:31                 ` Christoph Scholtes
  0 siblings, 1 reply; 27+ messages in thread
From: Eli Zaretskii @ 2011-05-05 20:29 UTC (permalink / raw)
  To: Ben Key; +Cc: cschol2112, Emacs-devel

> From: Ben Key <bkey76@gmail.com>
> Date: Thu, 5 May 2011 14:07:06 -0500
> Cc: cschol2112@googlemail.com, Emacs-devel@gnu.org
> 
> gcc -I. -c -gdwarf-2 -g3  -DEMACSDEBUG
>   -I"C:/Program Files/GnuTLS-2.10.1/include"
>   -DXMALLOC_CLEAR_FREE_MEMORY -Demacs=1 -DHAVE_CONFIG_H -I../lib
>   -I../nt/inc -DHAVE_NTGUI=1 -DUSE_CRT_DLL=1 -DPURESIZE=5000000
>   -o oo/i386/emacs.o emacs.c
> 
> The second time it is compiled as follows:
> gcc -I. -c -gdwarf-2 -g3  -DEMACSDEBUG
>   -I"C:/Program Files/GnuTLS-2.10.1/include"
>   -DXMALLOC_CLEAR_FREE_MEMORY -Demacs=1 -DHAVE_CONFIG_H -I../lib
>   -I../nt/inc -DHAVE_NTGUI=1 -DUSE_CRT_DLL=1
>   -o oo/i386/emacs.o emacs.c
> 
> Note that both times -I"C:/Program Files/GnuTLS-2.10.1/include" was used.  I
> have no idea why Christoph is having problems.

Do you have some sh.exe on your PATH?  If so, remove it, and then try
again and see if you reproduce the problem.

Christoph, can you try using a directory name that has whitespace in
it, but does _not_ have any parts in parentheses, i.e. without the
"(x86)" part?  That is one difference between Ben's command lines and
yours.



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Bootstrap failure with new configure.bat (was Re: Proposed change to nt/INSTALL)
  2011-05-05 20:29               ` Eli Zaretskii
@ 2011-05-05 23:31                 ` Christoph Scholtes
  2011-05-06  3:28                   ` Christoph Scholtes
  0 siblings, 1 reply; 27+ messages in thread
From: Christoph Scholtes @ 2011-05-05 23:31 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Emacs-devel, Ben Key

On 5/5/2011 2:29 PM, Eli Zaretskii wrote:

> Christoph, can you try using a directory name that has whitespace in
> it, but does _not_ have any parts in parentheses, i.e. without the
> "(x86)" part?  That is one difference between Ben's command lines and
> yours.

Same result with:

--cflags -I"D:/Test Dir/GnuWin32/include"

First compilation works, second breaks.

The second compiler call is generated like this:

gcc -I. -c -gdwarf-2 -g3 -mno-cygwin -mtune=pentium4 -O2 
-DENABLE_CHECKING -DXASSERTS -fno-crossjumping  -ID:/Test -o 
oo-spd/i386/emacs.o emacs.c

My make version:
GNU Make 3.82
Built for i386-pc-mingw32

I will look at this some more later tonight.

Christoph



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Bootstrap failure with new configure.bat (was Re: Proposed change to nt/INSTALL)
  2011-05-05 23:31                 ` Christoph Scholtes
@ 2011-05-06  3:28                   ` Christoph Scholtes
  2011-05-06  5:39                     ` Ben Key
  0 siblings, 1 reply; 27+ messages in thread
From: Christoph Scholtes @ 2011-05-06  3:28 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Emacs-devel, Ben Key

OK, I think I have figured it out.

configure.bat generates:

USER_CFLAGS=-I"D:/Test Dir/GnuWin32/include" 
-ID:/devel/emacs/libXpm-3.5.8/include -ID:/devel/emacs/libXpm-3.5.8/src 
-ID:/devel/emacs/gnutls-2.8.6/include

src/makefile l.570:
bootstrap-temacs:
	$(MAKE) $(MFLAGS) $(XMFLAGS) temacs CFLAGS=$(ARGQUOTE)$(CFLAGS) 
-DPURESIZE=5000000$(ARGQUOTE)

expands to

mingw32-make -w  temacs CFLAGS="-I. -c -gdwarf-2 -g3 -mno-cygwin 
-mtune=pentium4 -O2   -DENABLE_CHECKING -DXASSERTS -fno-crossjumping 
-I"D:/Test Dir/GnuWin32/include" -ID:/devel/emacs/libXpm-3.5.8/include 
-ID:/devel/emacs/libXpm-3.5.8/src -ID:/devel/emacs/gnutls-2.8.6/include 
-Demacs=1 -DHAVE_CONFIG_H -I../lib -I../nt/inc -DHAVE_NTGUI=1 
-DUSE_CRT_DLL=1 -DPURESIZE=5000000"

Looks like the $(ARGQUOTE) and the quotes in CFLAGS (from USER_CFLAGS) 
collide and lead to the "corruption" of CFLAGS for any further compiler 
calls.

If I manually escape the quotes in USER_CFLAGS in src/makefile as follows:

USER_CFLAGS=-I\"D:/Test Dir/GnuWin32/include\" 
-ID:/devel/emacs/libXpm-3.5.8/include -ID:/devel/emacs/libXpm-3.5.8/src 
-ID:/devel/emacs/gnutls-2.8.6/include

everything compiles fine.

I am puzzled though, why this is not a problem on Ben's system.

Can we have configure.bat escape the quotes in the flag arguments?

Christoph



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Bootstrap failure with new configure.bat (was Re: Proposed change to nt/INSTALL)
  2011-05-06  3:28                   ` Christoph Scholtes
@ 2011-05-06  5:39                     ` Ben Key
  2011-05-06  7:37                       ` Eli Zaretskii
  0 siblings, 1 reply; 27+ messages in thread
From: Ben Key @ 2011-05-06  5:39 UTC (permalink / raw)
  To: Christoph Scholtes; +Cc: Eli Zaretskii, Emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1002 bytes --]

Hello Christoph,

You gave me the vital clue that I needed to figure out why my change works
for me but not for you.  You are absolutely correct that the
       $(MAKE) $(MFLAGS) $(XMFLAGS) temacs CFLAGS=$(ARGQUOTE)$(CFLAGS)
-DPURESIZE=5000000$(ARGQUOTE)
 line is the one that is causing the problem.  Your pointing out that line
along with the fact that you do not have sh.exe on your PATH helped me to
figure it out.

I do have sh.exe in my path.  And it turns out mingw32-make does use sh if
it is available.  The key is that, when sh is in use, ARGQUOTE is defined as
', not ".  So my change works for me because I am using sh.

Now, as for your suggestion to simply escape the quotes in the flag
arguments, that would be possible, but it would only work if sh is not being
used.

So now I need to come up with a fix that will work for both sh and cmd.  I
have one in mind but I need to think it over a little more before I try it.
I will submit a fix either tomorrow evening or sometime Saturday.

[-- Attachment #2: Type: text/html, Size: 1130 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Bootstrap failure with new configure.bat (was Re: Proposed change to nt/INSTALL)
  2011-05-06  5:39                     ` Ben Key
@ 2011-05-06  7:37                       ` Eli Zaretskii
  0 siblings, 0 replies; 27+ messages in thread
From: Eli Zaretskii @ 2011-05-06  7:37 UTC (permalink / raw)
  To: Ben Key; +Cc: cschol2112, Emacs-devel

> From: Ben Key <bkey76@gmail.com>
> Date: Fri, 6 May 2011 00:39:09 -0500
> Cc: Eli Zaretskii <eliz@gnu.org>, Emacs-devel@gnu.org
> 
> I do have sh.exe in my path.  And it turns out mingw32-make does use
> sh if it is available.

Yes, by design.

> Now, as for your suggestion to simply escape the quotes in the flag
> arguments, that would be possible, but it would only work if sh is not being
> used.
> 
> So now I need to come up with a fix that will work for both sh and cmd.

One way is to split the bootstrap-temacs target into two: one for cmd,
the other for sh.  We have already a few examples of that in the
Windows makefiles, they use the SHELLTYPE variable.  Here's an
example:

    buildobj.h: $(SRC)/makefile.w32-in
	    $(MAKE) $(MFLAGS) make-buildobj-$(SHELLTYPE)

    make-buildobj-CMD:
	    echo #define BUILDOBJ ^"\> buildobj.h
	    echo $(OBJ0)            \>> buildobj.h
	    echo $(OBJ1)            \>> buildobj.h
	    echo $(OBJ2)            \>> buildobj.h
	    echo ^">> buildobj.h

    make-buildobj-SH:
	    echo '#define BUILDOBJ $(DQUOTE)\'  > buildobj.h
	    echo $(OBJ0)                   '\' >> buildobj.h
	    echo $(OBJ1)                   '\' >> buildobj.h
	    echo $(OBJ2)                   '\' >> buildobj.h
	    echo '$(DQUOTE)'                   >> buildobj.h



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Bootstrap failure with new configure.bat (was Re: Proposed change to nt/INSTALL)
  2011-05-05 17:01           ` Eli Zaretskii
  2011-05-05 19:07             ` Ben Key
@ 2011-05-06 13:23             ` Stefan Monnier
  2011-05-06 15:08               ` Eli Zaretskii
  1 sibling, 1 reply; 27+ messages in thread
From: Stefan Monnier @ 2011-05-06 13:23 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: cschol2112, Emacs-devel, Ben Key

> Look again.  The above compilation command line, with
> "-DPURESIZE=5000000", is the first compilation.  Then all Lisp files
> are compiled.  And finally all the C files are recompiled without the
> "-DPURESIZE=5000000" option.  This is how bootstrap works on Windows.

On an unrelated note: why do you need this -DPURESIZE=5000000 for the
w32 build?


        Stefan



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Bootstrap failure with new configure.bat (was Re: Proposed change to nt/INSTALL)
  2011-05-06 13:23             ` Stefan Monnier
@ 2011-05-06 15:08               ` Eli Zaretskii
  2011-05-06 22:54                 ` Christoph Scholtes
  2011-05-06 23:19                 ` Ben Key
  0 siblings, 2 replies; 27+ messages in thread
From: Eli Zaretskii @ 2011-05-06 15:08 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: cschol2112, Emacs-devel, bkey76

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: Ben Key <bkey76@gmail.com>,  cschol2112@googlemail.com,  Emacs-devel@gnu.org
> Date: Fri, 06 May 2011 10:23:44 -0300
> 
> > Look again.  The above compilation command line, with
> > "-DPURESIZE=5000000", is the first compilation.  Then all Lisp files
> > are compiled.  And finally all the C files are recompiled without the
> > "-DPURESIZE=5000000" option.  This is how bootstrap works on Windows.
> 
> On an unrelated note: why do you need this -DPURESIZE=5000000 for the
> w32 build?

Simply because no one has invested the effort to see whether the
bootstrap will work without it, and tweaked the w32 Makefiles
accordingly.  Those Makefiles are somewhat tricky because they need to
support GNU Make and MS Nmake and also 2 kinds of shell with GNU Make.
The current setup works with all that complexity.

Volunteers are welcome, as usual.



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Bootstrap failure with new configure.bat (was Re: Proposed change to nt/INSTALL)
  2011-05-06 15:08               ` Eli Zaretskii
@ 2011-05-06 22:54                 ` Christoph Scholtes
  2011-05-07  7:53                   ` Eli Zaretskii
  2011-05-06 23:19                 ` Ben Key
  1 sibling, 1 reply; 27+ messages in thread
From: Christoph Scholtes @ 2011-05-06 22:54 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Stefan Monnier, Emacs-devel

On 5/6/2011 9:08 AM, Eli Zaretskii wrote:

> Simply because no one has invested the effort to see whether the
> bootstrap will work without it, and tweaked the w32 Makefiles
> accordingly.  Those Makefiles are somewhat tricky because they need to
> support GNU Make and MS Nmake and also 2 kinds of shell with GNU Make.
> The current setup works with all that complexity.

So, I just did a `make maintainer-clean', configure, removed the 
-DPURESIZE=5000000 from src/makefile and then did a `make bootstrap'.

Everything builds fine.

Does this mean we don't have to go through the two compilation cycles 
during a bootstrap (once with PURESIZE, once without), but we can just 
compile it once?

I would volunteer to adjust the makefiles to accommodate this.

Christoph



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Bootstrap failure with new configure.bat (was Re: Proposed change to nt/INSTALL)
  2011-05-06 15:08               ` Eli Zaretskii
  2011-05-06 22:54                 ` Christoph Scholtes
@ 2011-05-06 23:19                 ` Ben Key
  2011-05-06 23:44                   ` Christoph Scholtes
  1 sibling, 1 reply; 27+ messages in thread
From: Ben Key @ 2011-05-06 23:19 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: cschol2112, Stefan Monnier, Emacs-devel

[-- Attachment #1: Type: text/plain, Size: 893 bytes --]

Christoph Scholtes wrote:

> If I manually escape the quotes in USER_CFLAGS in src/makefile as
> follows:

> USER_CFLAGS=-I\"D:/Test Dir/GnuWin32/include\"
> -ID:/devel/emacs/libXpm-3.5.8/include
> -ID:/devel/emacs/libXpm-3.5.8/src
> -ID:/devel/emacs/gnutls-2.8.6/include

> everything compiles fine.

> I am puzzled though, why this is not a problem on Ben's system.

> Can we have configure.bat escape the quotes in the flag arguments?

I am confused.  I tried your suggestion to escape the quotes in src/makefile
if Make uses CMD as the shell.  The results are as follows:

gcc -o oo/i386/addsection.exe \
  -gdwarf-2 -g3 oo/i386/addsection.o -luser32
gcc -I. -c -gdwarf-2 -g3 -DEMACSDEBUG
  -I\"C:/Program Files/GnuTLS-2.10.1/include\"
  -DXMALLOC_CLEAR_FREE_MEMORY -o oo/i386/cmdproxy.o cmdproxy.c

gcc: Files/GnuTLS-2.10.1/include": No such file or directory

How is it working for you?

[-- Attachment #2: Type: text/html, Size: 1053 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Bootstrap failure with new configure.bat (was Re: Proposed change to nt/INSTALL)
  2011-05-06 23:19                 ` Ben Key
@ 2011-05-06 23:44                   ` Christoph Scholtes
  2011-05-07  4:13                     ` Ben Key
  0 siblings, 1 reply; 27+ messages in thread
From: Christoph Scholtes @ 2011-05-06 23:44 UTC (permalink / raw)
  To: Ben Key; +Cc: Eli Zaretskii, Emacs-devel

On 5/6/2011 5:19 PM, Ben Key wrote:

> I am confused.  I tried your suggestion to escape the quotes in
> src/makefile if Make uses CMD as the shell.  The results are as follows:
>
> gcc -o oo/i386/addsection.exe \
>    -gdwarf-2 -g3 oo/i386/addsection.o -luser32
> gcc -I. -c -gdwarf-2 -g3 -DEMACSDEBUG
>    -I\"C:/Program Files/GnuTLS-2.10.1/include\"
>    -DXMALLOC_CLEAR_FREE_MEMORY -o oo/i386/cmdproxy.o cmdproxy.c
>
> gcc: Files/GnuTLS-2.10.1/include": No such file or directory
>
> How is it working for you?

It does not work this way. The escaped quotes are only to be applied 
when make is invoked recursively, e.g. in l.569 in src/makefile, and 
when $(ARGQUOTE) is used. That's when the quotes of ARGQUOTE and the 
quotes in CFLAGS collide. In any other case an unescaped version of 
CFLAGS can/must be used.

Christoph



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Bootstrap failure with new configure.bat (was Re: Proposed change to nt/INSTALL)
  2011-05-06 23:44                   ` Christoph Scholtes
@ 2011-05-07  4:13                     ` Ben Key
  2011-05-07  8:07                       ` Eli Zaretskii
  2011-05-07 14:24                       ` Christoph Scholtes
  0 siblings, 2 replies; 27+ messages in thread
From: Ben Key @ 2011-05-07  4:13 UTC (permalink / raw)
  To: Christoph Scholtes; +Cc: Eli Zaretskii, Emacs-devel

[-- Attachment #1: Type: text/plain, Size: 579 bytes --]

Hello,

I am pleased to report that this problem has now been fixed.  See revision
104150 for details.

I tested this change both with sh in my path and without.  The bootstrap is
successful in both cases.

I would like to thank Christoph for his assistance with this.  If it were
not for several vital clues provided by him, I would not have been able to
resolve this issue so quickly.  I would like to also thank Eli.  His
suggestion to split the bootstrap-temacs target into two was very helpful
and, as it turns out, that was exactly what I had to do to support both
shells.

[-- Attachment #2: Type: text/html, Size: 636 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Bootstrap failure with new configure.bat (was Re: Proposed change to nt/INSTALL)
  2011-05-06 22:54                 ` Christoph Scholtes
@ 2011-05-07  7:53                   ` Eli Zaretskii
  0 siblings, 0 replies; 27+ messages in thread
From: Eli Zaretskii @ 2011-05-07  7:53 UTC (permalink / raw)
  To: Christoph Scholtes; +Cc: monnier, Emacs-devel

> Date: Fri, 06 May 2011 16:54:50 -0600
> From: Christoph Scholtes <cschol2112@googlemail.com>
> CC: Stefan Monnier <monnier@iro.umontreal.ca>, Emacs-devel@gnu.org
> 
> So, I just did a `make maintainer-clean', configure, removed the 
> -DPURESIZE=5000000 from src/makefile and then did a `make bootstrap'.
> 
> Everything builds fine.
> 
> Does this mean we don't have to go through the two compilation cycles 
> during a bootstrap (once with PURESIZE, once without), but we can just 
> compile it once?

If the first build does not complain about pure storage overflow, then
a single build should be enough.

> I would volunteer to adjust the makefiles to accommodate this.

Thanks.



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Bootstrap failure with new configure.bat (was Re: Proposed change to nt/INSTALL)
  2011-05-07  4:13                     ` Ben Key
@ 2011-05-07  8:07                       ` Eli Zaretskii
  2011-05-07 14:24                       ` Christoph Scholtes
  1 sibling, 0 replies; 27+ messages in thread
From: Eli Zaretskii @ 2011-05-07  8:07 UTC (permalink / raw)
  To: Ben Key; +Cc: cschol2112, Emacs-devel

> From: Ben Key <bkey76@gmail.com>
> Date: Fri, 6 May 2011 23:13:21 -0500
> Cc: Eli Zaretskii <eliz@gnu.org>, Emacs-devel@gnu.org
> 
> I am pleased to report that this problem has now been fixed.  See revision
> 104150 for details.

Thanks.



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Bootstrap failure with new configure.bat (was Re: Proposed change to nt/INSTALL)
  2011-05-07  4:13                     ` Ben Key
  2011-05-07  8:07                       ` Eli Zaretskii
@ 2011-05-07 14:24                       ` Christoph Scholtes
  1 sibling, 0 replies; 27+ messages in thread
From: Christoph Scholtes @ 2011-05-07 14:24 UTC (permalink / raw)
  To: Ben Key; +Cc: Emacs-devel

On 5/6/2011 10:13 PM, Ben Key wrote:

> I am pleased to report that this problem has now been fixed.  See
> revision 104150 for details.

Works great. Thanks!

Christoph



^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2011-05-07 14:24 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-04 23:35 Proposed change to nt/INSTALL Ben Key
2011-05-05  0:54 ` Ben Key
2011-05-05  5:08   ` Bootstrap failure with new configure.bat (was Re: Proposed change to nt/INSTALL) Christoph Scholtes
2011-05-05 10:34     ` Eli Zaretskii
2011-05-05 12:34       ` Christoph Scholtes
2011-05-05 16:38         ` Ben Key
2011-05-05 16:44           ` Juanma Barranquero
2011-05-05 17:01           ` Eli Zaretskii
2011-05-05 19:07             ` Ben Key
2011-05-05 20:29               ` Eli Zaretskii
2011-05-05 23:31                 ` Christoph Scholtes
2011-05-06  3:28                   ` Christoph Scholtes
2011-05-06  5:39                     ` Ben Key
2011-05-06  7:37                       ` Eli Zaretskii
2011-05-06 13:23             ` Stefan Monnier
2011-05-06 15:08               ` Eli Zaretskii
2011-05-06 22:54                 ` Christoph Scholtes
2011-05-07  7:53                   ` Eli Zaretskii
2011-05-06 23:19                 ` Ben Key
2011-05-06 23:44                   ` Christoph Scholtes
2011-05-07  4:13                     ` Ben Key
2011-05-07  8:07                       ` Eli Zaretskii
2011-05-07 14:24                       ` Christoph Scholtes
2011-05-05  1:18 ` Proposed change to nt/INSTALL Juanma Barranquero
2011-05-05  1:47   ` Ben Key
2011-05-05  2:05     ` Juanma Barranquero
2011-05-05  3:01     ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).