GNU bug report logs -
#12878
24.2; Compiling failed on Windows 7 with VC 11 Express: _WIN32_WINNT version too low
Previous Next
Reported by: 李丁 <iamliding <at> gmail.com>
Date: Tue, 13 Nov 2012 16:15:02 UTC
Severity: normal
Tags: wontfix
Found in version 24.2
Done: npostavs <at> users.sourceforge.net
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 12878 in the body.
You can then email your comments to 12878 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12878
; Package
emacs
.
(Tue, 13 Nov 2012 16:15:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
李丁 <iamliding <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Tue, 13 Nov 2012 16:15:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi,
I tried to compile emacs 24.2 on Windows 7 with Visual C++ 11.0 Express,
and I found that EnumSystemLocales in w32proc.c and w32select.c were
compiled as is (not as __stdcall function with postfix decorations), which
causes the linking failure.
I read through the sources and found that config.h defined _WIN32_WINNT as
0x0400, which corresponds to Windows NT4. However MSDN says that
EnumSystemLocales requires at least Windows 2000 (0x0500). So you should
probably either require a higher Windows version or use some other
mechanism to accomplish what EnumSystemLocales does.
Regards,
Li Ding
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12878
; Package
emacs
.
(Tue, 13 Nov 2012 16:35:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 12878 <at> debbugs.gnu.org (full text, mbox):
> Date: Tue, 13 Nov 2012 19:11:34 +0800
> From: 李丁 <iamliding <at> gmail.com>
>
> I tried to compile emacs 24.2 on Windows 7 with Visual C++ 11.0 Express,
> and I found that EnumSystemLocales in w32proc.c and w32select.c were
> compiled as is (not as __stdcall function with postfix decorations), which
> causes the linking failure.
>
> I read through the sources and found that config.h defined _WIN32_WINNT as
> 0x0400, which corresponds to Windows NT4. However MSDN says that
> EnumSystemLocales requires at least Windows 2000 (0x0500). So you should
> probably either require a higher Windows version or use some other
> mechanism to accomplish what EnumSystemLocales does.
Would adding a correct prototype for EnumSystemLocales to w32term.h
(included by both source files you mention) do the trick?
(I don't want to bump up _WIN32_WINNT, because that might produce an
executable which won't run on Windows 9X, which we still try to
support.)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12878
; Package
emacs
.
(Wed, 14 Nov 2012 01:16:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 12878 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Sure, adding a correct prototype is just like including the correct header
file if Windows 9X
really supports this function. But you should be careful checking compiler
versions, in case that
redefinition error occur.
Actually, I encountered several redefinition problems during compilation.
For example in w32term.c:
#ifndef GLYPHSET
/* Pre Windows 2000, this was not available, but define it here so
that Emacs compiled on such a platform will run on newer versions.
*/
...
#endif
VC 11.0 does not define GLYPHSET either (or not included), but it does have
the definitions,
and above code leads to redefinition error.
And this in w32term.c too:
/* Reportedly, MSVC does not have this in its headers. */
#ifdef _MSC_VER
DECLARE_HANDLE(HMONITOR);
#endif
VC 11.0 does have HMONITOR, and another redefinition error.
Maybe VC 11.0 has not been widely used, but these small problems should be
resolved.
2012/11/14 Eli Zaretskii <eliz <at> gnu.org>
> > Date: Tue, 13 Nov 2012 19:11:34 +0800
> > From: 李丁 <iamliding <at> gmail.com>
> >
> > I tried to compile emacs 24.2 on Windows 7 with Visual C++ 11.0 Express,
> > and I found that EnumSystemLocales in w32proc.c and w32select.c were
> > compiled as is (not as __stdcall function with postfix decorations),
> which
> > causes the linking failure.
> >
> > I read through the sources and found that config.h defined _WIN32_WINNT
> as
> > 0x0400, which corresponds to Windows NT4. However MSDN says that
> > EnumSystemLocales requires at least Windows 2000 (0x0500). So you should
> > probably either require a higher Windows version or use some other
> > mechanism to accomplish what EnumSystemLocales does.
>
> Would adding a correct prototype for EnumSystemLocales to w32term.h
> (included by both source files you mention) do the trick?
>
> (I don't want to bump up _WIN32_WINNT, because that might produce an
> executable which won't run on Windows 9X, which we still try to
> support.)
>
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12878
; Package
emacs
.
(Wed, 14 Nov 2012 01:33:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 12878 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Sorry, this piece of code is in w32fns.c (line 143-146), not w32term.c:
/* Reportedly, MSVC does not have this in its headers. */
#ifdef _MSC_VER
DECLARE_HANDLE(HMONITOR);
#endif
And it leads to redefinition error under MSVC 11.0.
2012/11/14 李丁 <iamliding <at> gmail.com>
> Sure, adding a correct prototype is just like including the correct header
> file if Windows 9X
> really supports this function. But you should be careful checking compiler
> versions, in case that
> redefinition error occur.
>
> Actually, I encountered several redefinition problems during compilation.
> For example in w32term.c:
>
> #ifndef GLYPHSET
> /* Pre Windows 2000, this was not available, but define it here so
> that Emacs compiled on such a platform will run on newer versions.
> */
> ...
> #endif
>
> VC 11.0 does not define GLYPHSET either (or not included), but it does
> have the definitions,
> and above code leads to redefinition error.
>
> And this in w32term.c too:
>
> /* Reportedly, MSVC does not have this in its headers. */
> #ifdef _MSC_VER
> DECLARE_HANDLE(HMONITOR);
> #endif
>
> VC 11.0 does have HMONITOR, and another redefinition error.
>
> Maybe VC 11.0 has not been widely used, but these small problems should be
> resolved.
>
>
> 2012/11/14 Eli Zaretskii <eliz <at> gnu.org>
>
>> > Date: Tue, 13 Nov 2012 19:11:34 +0800
>> > From: 李丁 <iamliding <at> gmail.com>
>> >
>> > I tried to compile emacs 24.2 on Windows 7 with Visual C++ 11.0 Express,
>> > and I found that EnumSystemLocales in w32proc.c and w32select.c were
>> > compiled as is (not as __stdcall function with postfix decorations),
>> which
>> > causes the linking failure.
>> >
>> > I read through the sources and found that config.h defined _WIN32_WINNT
>> as
>> > 0x0400, which corresponds to Windows NT4. However MSDN says that
>> > EnumSystemLocales requires at least Windows 2000 (0x0500). So you should
>> > probably either require a higher Windows version or use some other
>> > mechanism to accomplish what EnumSystemLocales does.
>>
>> Would adding a correct prototype for EnumSystemLocales to w32term.h
>> (included by both source files you mention) do the trick?
>>
>> (I don't want to bump up _WIN32_WINNT, because that might produce an
>> executable which won't run on Windows 9X, which we still try to
>> support.)
>>
>
>
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12878
; Package
emacs
.
(Wed, 14 Nov 2012 03:54:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 12878 <at> debbugs.gnu.org (full text, mbox):
> Date: Wed, 14 Nov 2012 09:14:45 +0800
> From: 李丁 <iamliding <at> gmail.com>
> Cc: 12878 <at> debbugs.gnu.org
>
> Sure, adding a correct prototype is just like including the correct header
> file if Windows 9X
> really supports this function. But you should be careful checking compiler
> versions, in case that
> redefinition error occur.
A repeated prototype can never trigger redefinition warnings or errors.
> Actually, I encountered several redefinition problems during compilation.
> For example in w32term.c:
>
> #ifndef GLYPHSET
> /* Pre Windows 2000, this was not available, but define it here so
> that Emacs compiled on such a platform will run on newer versions.
> */
> ...
> #endif
>
> VC 11.0 does not define GLYPHSET either (or not included), but it does have
> the definitions,
> and above code leads to redefinition error.
>
> And this in w32term.c too:
>
> /* Reportedly, MSVC does not have this in its headers. */
> #ifdef _MSC_VER
> DECLARE_HANDLE(HMONITOR);
> #endif
>
> VC 11.0 does have HMONITOR, and another redefinition error.
What is the value of _MSC_VER for this compiler?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12878
; Package
emacs
.
(Wed, 14 Nov 2012 07:24:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 12878 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
The value is 1700
2012/11/14 Eli Zaretskii <eliz <at> gnu.org>
> > Date: Wed, 14 Nov 2012 09:14:45 +0800
> > From: 李丁 <iamliding <at> gmail.com>
> > Cc: 12878 <at> debbugs.gnu.org
> >
> > Sure, adding a correct prototype is just like including the correct
> header
> > file if Windows 9X
> > really supports this function. But you should be careful checking
> compiler
> > versions, in case that
> > redefinition error occur.
>
> A repeated prototype can never trigger redefinition warnings or errors.
>
> > Actually, I encountered several redefinition problems during compilation.
> > For example in w32term.c:
> >
> > #ifndef GLYPHSET
> > /* Pre Windows 2000, this was not available, but define it here so
> > that Emacs compiled on such a platform will run on newer versions.
> > */
> > ...
> > #endif
> >
> > VC 11.0 does not define GLYPHSET either (or not included), but it does
> have
> > the definitions,
> > and above code leads to redefinition error.
> >
> > And this in w32term.c too:
> >
> > /* Reportedly, MSVC does not have this in its headers. */
> > #ifdef _MSC_VER
> > DECLARE_HANDLE(HMONITOR);
> > #endif
> >
> > VC 11.0 does have HMONITOR, and another redefinition error.
>
> What is the value of _MSC_VER for this compiler?
>
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12878
; Package
emacs
.
(Sat, 17 Nov 2012 18:59:02 GMT)
Full text and
rfc822 format available.
Message #23 received at 12878 <at> debbugs.gnu.org (full text, mbox):
> Date: Wed, 14 Nov 2012 09:14:45 +0800
> From: 李丁 <iamliding <at> gmail.com>
> Cc: 12878 <at> debbugs.gnu.org
>
> Sure, adding a correct prototype is just like including the correct
> header file if Windows 9X really supports this function. But you
> should be careful checking compiler versions, in case that
> redefinition error occur.
I added the prototype of EnumSystemLocales to one of the w32 headers.
Please try the latest emacs-24 branch (revision 110902 or later) and
see if you still have problems building it.
> Actually, I encountered several redefinition problems during compilation.
> For example in w32term.c:
>
> #ifndef GLYPHSET
> /* Pre Windows 2000, this was not available, but define it here so
> that Emacs compiled on such a platform will run on newer versions.
> */
> ...
> #endif
>
> VC 11.0 does not define GLYPHSET either (or not included), but it does have
> the definitions,
> and above code leads to redefinition error.
This is no longer in the development sources of the emacs-24 branch.
This code fragment is now guarded by "#if _WIN32_WINNT < 0x0500",
which I think should work for you, as long as you don't define
_WIN32_WINNT to a value higher than 0x0400.
> And this in w32term.c too:
>
> /* Reportedly, MSVC does not have this in its headers. */
> #ifdef _MSC_VER
> DECLARE_HANDLE(HMONITOR);
> #endif
>
> VC 11.0 does have HMONITOR, and another redefinition error.
This is now guarded by "#if defined (_MSC_VER) && _WIN32_WINNT < 0x0500"
so again, I don't think that it should give you trouble with
_WIN32_WINNT set at 0x0400.
Please try the latest emacs-24 branch, and if it works for you, I will
close the bug.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12878
; Package
emacs
.
(Mon, 19 Nov 2012 06:01:02 GMT)
Full text and
rfc822 format available.
Message #26 received at 12878 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi,
Thank you for fixing the bug.
I checked out the latest branch (r 110913), it seems that you miss a
semicolon at line 761 in w32term.h.
Previous problems are fixed, but I still can not compile the latest branch.
There are more problems:
1. I need `nmake bootstrap' but in 24.2 release I can compile directly with
`nmake'
2. In lisp.h it begins to define ARRAY_MARK_FLAG as PTRDIFF_MIN, however,
definition of PTRDIFF_MIN is in stdint.h, which is not included. And
even if included, in nt/inc/stdint.h,
various *_MIN (including PTRDIFF_MIN) are not defined
3. In w32.c DeviceIoControl, it uses a FSCTL_GET_REPARSE_POINT that is only
defined for _MSC_VER >= 0x0500
4. In xdisp.c, start_hourglass function, w32_note_current_window is
declared (as extern) and used in the middle of
the function, causing an error message. Move the declaration to the
beginning of the function solved the problem.
After fixing the above problems, finally I can make a temacs.exe, but while
loading subr.el, temacs reported an
error message saying `Invalid funtion: "DEAD"'. I do not know where the
function `dead' comes from.
Maybe you can close the previous bug, but for the latest branch, more fixes
are needed.
2012/11/18 Eli Zaretskii <eliz <at> gnu.org>
> > Date: Wed, 14 Nov 2012 09:14:45 +0800
> > From: 李丁 <iamliding <at> gmail.com>
> > Cc: 12878 <at> debbugs.gnu.org
> >
> > Sure, adding a correct prototype is just like including the correct
> > header file if Windows 9X really supports this function. But you
> > should be careful checking compiler versions, in case that
> > redefinition error occur.
>
> I added the prototype of EnumSystemLocales to one of the w32 headers.
> Please try the latest emacs-24 branch (revision 110902 or later) and
> see if you still have problems building it.
>
> > Actually, I encountered several redefinition problems during compilation.
> > For example in w32term.c:
> >
> > #ifndef GLYPHSET
> > /* Pre Windows 2000, this was not available, but define it here so
> > that Emacs compiled on such a platform will run on newer versions.
> > */
> > ...
> > #endif
> >
> > VC 11.0 does not define GLYPHSET either (or not included), but it does
> have
> > the definitions,
> > and above code leads to redefinition error.
>
> This is no longer in the development sources of the emacs-24 branch.
> This code fragment is now guarded by "#if _WIN32_WINNT < 0x0500",
> which I think should work for you, as long as you don't define
> _WIN32_WINNT to a value higher than 0x0400.
>
> > And this in w32term.c too:
> >
> > /* Reportedly, MSVC does not have this in its headers. */
> > #ifdef _MSC_VER
> > DECLARE_HANDLE(HMONITOR);
> > #endif
> >
> > VC 11.0 does have HMONITOR, and another redefinition error.
>
> This is now guarded by "#if defined (_MSC_VER) && _WIN32_WINNT < 0x0500"
> so again, I don't think that it should give you trouble with
> _WIN32_WINNT set at 0x0400.
>
> Please try the latest emacs-24 branch, and if it works for you, I will
> close the bug.
>
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12878
; Package
emacs
.
(Mon, 19 Nov 2012 17:45:02 GMT)
Full text and
rfc822 format available.
Message #29 received at 12878 <at> debbugs.gnu.org (full text, mbox):
> Date: Mon, 19 Nov 2012 13:59:54 +0800
> From: 李丁 <iamliding <at> gmail.com>
> Cc: 12878 <at> debbugs.gnu.org
>
> I checked out the latest branch (r 110913), it seems that you miss a
> semicolon at line 761 in w32term.h.
Oops! Fixed.
> There are more problems:
>
> 1. I need `nmake bootstrap' but in 24.2 release I can compile directly with
> `nmake'
Do you mean that you need "nmake bootstrap" for _every_ change you
make in any of the files? If so, please tell what error messages do
you see if you make some change in one C file and run Nmake normally,
without bootstrapping.
> 2. In lisp.h it begins to define ARRAY_MARK_FLAG as PTRDIFF_MIN, however,
> definition of PTRDIFF_MIN is in stdint.h, which is not included. And
> even if included, in nt/inc/stdint.h,
> various *_MIN (including PTRDIFF_MIN) are not defined
stdint.h is included by inttypes.h, which _is_ included by lisp.h. I
added to nt/inc/stdint.h a suitable definition of PTRDIFF_MIN.
> 3. In w32.c DeviceIoControl, it uses a FSCTL_GET_REPARSE_POINT that is only
> defined for _MSC_VER >= 0x0500
I added the missing definitions to w32.c.
> 4. In xdisp.c, start_hourglass function, w32_note_current_window is
> declared (as extern) and used in the middle of
> the function, causing an error message. Move the declaration to the
> beginning of the function solved the problem.
Fixed.
> After fixing the above problems, finally I can make a temacs.exe, but while
> loading subr.el, temacs reported an
> error message saying `Invalid funtion: "DEAD"'. I do not know where the
> function `dead' comes from.
This indicates some problems with GC, perhaps alignment. See
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10749
http://lists.gnu.org/archive/html/bug-gnu-emacs/2012-02/msg00565.html
> Maybe you can close the previous bug, but for the latest branch, more fixes
> are needed.
Please try the latest emacs-24 branch. Revision 110917 shoulod have
the above fixes.
Thanks.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12878
; Package
emacs
.
(Tue, 20 Nov 2012 17:12:02 GMT)
Full text and
rfc822 format available.
Message #32 received at 12878 <at> debbugs.gnu.org (full text, mbox):
> Date: Tue, 20 Nov 2012 12:18:25 +0800
> From: 李丁 <iamliding <at> gmail.com>
>
> In nt/inc/stdint.h, INTPTR_MIN is still not defined (though PTRDIFF_MIN is
> defined as INTPTR_MIN).
Fixed.
> Tried GC_LISP_OBJECT_ALIGNMENT=1(or 2), still has the `Invalid function
> "DEAD"' problem.
Sorry, can't help you here.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12878
; Package
emacs
.
(Sat, 08 Dec 2012 12:29:01 GMT)
Full text and
rfc822 format available.
Message #35 received at 12878 <at> debbugs.gnu.org (full text, mbox):
> Date: Tue, 20 Nov 2012 12:18:25 +0800
> From: 李丁 <iamliding <at> gmail.com>
>
> Tried GC_LISP_OBJECT_ALIGNMENT=1(or 2), still has the `Invalid function
> "DEAD"' problem.
This could be due to reallocation of 'environ' in editfns.c. See the
discussion and the patches in bug #13070.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12878
; Package
emacs
.
(Thu, 22 Jun 2017 01:15:02 GMT)
Full text and
rfc822 format available.
Message #38 received at 12878 <at> debbugs.gnu.org (full text, mbox):
tags 12878 wontfix
close 12878
quit
> I tried to compile emacs 24.2 on Windows 7 with Visual C++ 11.0
> Express
This building method is no longer supported.
Added tag(s) wontfix.
Request was from
npostavs <at> users.sourceforge.net
to
control <at> debbugs.gnu.org
.
(Thu, 22 Jun 2017 01:15:03 GMT)
Full text and
rfc822 format available.
bug closed, send any further explanations to
12878 <at> debbugs.gnu.org and 李丁 <iamliding <at> gmail.com>
Request was from
npostavs <at> users.sourceforge.net
to
control <at> debbugs.gnu.org
.
(Thu, 22 Jun 2017 01:15:03 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 20 Jul 2017 11:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 6 years and 287 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.