Subject: bug#6820: closed (Re: bug#6820: 24.0.50; Corrupt system-configuration-options variable when using forward slashes)

From: [email-masked] (GNU bug Tracking System)
Date: Wed, 22 Sep 2010 23:21:02 +0000

Your bug report

#6820: 24.0.50; Corrupt system-configuration-options variable when using forward slashes

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
6820: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=6820
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#6820: 24.0.50; Corrupt system-configuration-options variable when using forward slashes
From: Juanma Barranquero <[email-masked]>
To: Christoph <[email-masked]>
Cc: [email-masked]
Date: Thu, 23 Sep 2010 01:22:45 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

> On Windows, the following warning appears when specifying compiler flags for
> configure.bat with forward slashes:
>
> gcc -I. -c -gdwarf-2 -g3 -mno-cygwin -mtune=pentium4 -O2 -DENABLE_CHECKING
> -DXASSERTS -fno-crossjumping -IC:\Progra~2\GnuWin32\include
> -ID:\devel\emacs\libXpm-3.5.8\include -ID:\devel\emacs\libXpm-3.5.8\src
> -Demacs=1 -DHAVE_CONFIG_H -I../nt/inc -DHAVE_NTGUI=1 -DUSE_CRT_DLL=1 -o
> oo-spd/i386/w32.o w32.c

You mean backslashes. :-)

Currently we don't support passing backslashes or quotes in arguments
to the --cflags configure.bat option, because as you point out they
break compilation of w32.c:get_emacs_configuration_options.

There's no easy way to fix that from configure.bat in a simple and
portable way; the next best fix is just err out with a clear message
when running configure.bat so the user can react immediately, instead
of getting a not-so-clear error or warning during compilation.

I've implemented the check only for GCC because I don't have access to
MSVC; but it should be trivial to add if MSVC has some command option
similar to GCC's -Werror (turn any warning into an error).

    Juanma

Subject: 24.0.50; Corrupt system-configuration-options variable when using forward slashes
From: Christoph <[email-masked]>
To: [email-masked]
Date: Sun, 08 Aug 2010 07:57:23 -0600
List-Id: <debbugs-submit.debbugs.gnu.org>

On Windows, the following warnig appears when specifying compiler flags 
for configure.bat with forward slashes:

gcc -I. -c -gdwarf-2 -g3 -mno-cygwin -mtune=pentium4 -O2 
-DENABLE_CHECKING -DXASSERTS -fno-crossjumping 
-IC:\Progra~2\GnuWin32\include -ID:\devel\emacs\libXpm-3.5.8\include 
-ID:\devel\emacs\libXpm-3.5.8\src -Demacs=1 -DHAVE_CONFIG_H -I../nt/inc 
-DHAVE_NTGUI=1 -DUSE_CRT_DLL=1 -o oo-spd/i386/w32.o w32.c
w32.c:1955:27: warning: unknown escape sequence '\P'
w32.c:1955:27: warning: unknown escape sequence '\G'
w32.c:1955:27: warning: unknown escape sequence '\i'
w32.c:1955:27: warning: unknown escape sequence '\d'
w32.c:1955:27: warning: unknown escape sequence '\l'
w32.c:1955:27: warning: unknown escape sequence '\i'
w32.c:1955:27: warning: unknown escape sequence '\d'
w32.c:1955:27: warning: unknown escape sequence '\l'
w32.c:1955:27: warning: unknown escape sequence '\s'

The warning occurs in the following line of
`get_emacs_configuration_options' function:

strcat (options_buffer, USER_CFLAGS);

Obviously, parts of the Windows-style path are interpreted as escape
characters.

The result is a corrupt variable `system-configuration-options':
"--with-gcc (4.4) --cflags -IC:Progra~2GnuWin32include
-ID:develmacslibXpm-3.5.8include -ID:develmacslibXpm-3.5.8src"

In GNU Emacs 24.0.50.1 (i386-mingw-nt6.1.7600) of 2010-08-07 on MARVIN
Windowing system distributor `Microsoft Corp.', version 6.1.7600
configured using `configure --with-gcc (4.4) --cflags 
-IC:Progra~2GnuWin32include -ID:develmacslibXpm-3.5.8include 
-ID:develmacslibXpm-3.5.8src'

Important settings:
   value of $LC_ALL: nil
   value of $LC_COLLATE: nil
   value of $LC_CTYPE: nil
   value of $LC_MESSAGES: nil
   value of $LC_MONETARY: nil
   value of $LC_NUMERIC: nil
   value of $LC_TIME: nil
   value of $LANG: ENU
   value of $XMODIFIERS: nil
   locale-coding-system: cp1252
   default enable-multibyte-characters: t

Major mode: C/l

Minor modes in effect:
   ido-everywhere: t
   yas/global-mode: t
   yas/minor-mode: t
   global-auto-revert-mode: t
   delete-selection-mode: t
   tooltip-mode: t
   mouse-wheel-mode: t
   file-name-shadow-mode: t
   global-font-lock-mode: t
   font-lock-mode: t
   blink-cursor-mode: t
   auto-composition-mode: t
   auto-encryption-mode: t
   auto-compression-mode: t
   size-indication-mode: t
   column-number-mode: t
   line-number-mode: t
   abbrev-mode: t

Recent input:
C-x C-f M-p M-p M-p M-n M-n d : / d e v e l <return>
e m a c s <return> e m a c s <return> t r u n <return>
s r c <return> w 3 2 <return> M-g M-g 1 9 5 5 <return>
<up> <up> C-SPC C-SPC C-n C-n C-n C-n M-w <down-mouse-1>
<mouse-1> <up> <up> <up> <up> <up> <up> <up> <up> <up>
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up>
<up> <up> <down> <up> <left> <down> <left> <left> <left>
<left> <left> <S-down> C-c M-w <down-mouse-1> <mouse-1>
<up> <left> C-SPC C-SPC C-n M-w <down-mouse-1> <mouse-1>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <up> <up> <up> <left> <left>
C-c RET r e p o r <tab> <return>

Recent messages:
Loading 
c:/Users/Christoph/AppData/Roaming/.emacs.d/anything-c-adaptive-history...done
Loading c:/Users/Christoph/AppData/Roaming/.emacs.d/plugins.el 
(source)...done
Loading c:/Users/Christoph/AppData/Roaming/.emacs.d/custom.el 
(source)...done
For information about GNU Emacs and the GNU system, type C-h C-a.
Loading vc-bzr...done
Mark set [2 times]
Mark activated
Mark set [2 times]
Mark activated
call-interactively: End of buffer

Load-path shadows:
None found.

Features:
(shadow sort gnus-cite mail-extr gnus-msg gnus-art mm-uu mml2015 pgg
pgg-parse pgg-def epg-config mm-view smime password-cache dig mailcap
gnus-sum nnoo gnus-group time-date gnus-undo nnmail mail-source
format-spec gnus-start gnus-spec gnus-int gnus-range gnus-win message
rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
rfc2047 rfc2045 ietf-drums mailabbrev gmm-utils mailheader gnus gnus-ems
nnheader gnus-util mail-utils mm-util mail-prsvr emacsbug vc-bzr sha1
hex-util server js2-mode-autoloads rainbow-mode-autoloads package
re-builder ibuffer nav nav-tags python-21 python nav-bufs xcscope
anything-config warnings browse-url semantic/util-modes semantic/util
semantic semantic/tag semantic/lex semantic/fw loaddefs eieio byte-opt
bytecomp byte-compile mode-local cedet imenu bookmark pp dired rx ffap
thingatpt anything google-c-style cc-mode cc-fonts cc-menus cc-cmds
cc-styles cc-align cc-engine cc-vars cc-defs grep-o-matic grep compile
comint browse-kill-ring+ browse-kill-ring second-sel ido yasnippet
dropdown-list derived easy-mmode assoc etags-table etags ring remember
zenburn color-theme edmacro kmacro wid-edit cl cl-19 sendmail regexp-opt
reporter easymenu uniquify advice help-fns advice-preload autorevert
delsel tooltip ediff-hook vc-hooks lisp-float-type mwheel dos-w32
disp-table ls-lisp w32-win w32-vars tool-bar dnd fontset image fringe
lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar
mldrag mouse jit-lock font-lock syntax facemenu font-core frame cham
georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese hebrew greek romanian slovak czech european ethiopic
indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple
abbrev button minibuffer faces cus-face files text-properties overlay
md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process multi-tty emacs)