* bug#62792: Emacs 29.0.90 build fails
@ 2023-04-11 18:16 Tak Ota
2023-04-12 15:33 ` Eli Zaretskii
0 siblings, 1 reply; 18+ messages in thread
From: Tak Ota @ 2023-04-11 18:16 UTC (permalink / raw)
To: 62792
[-- Attachment #1: Type: text/plain, Size: 379 bytes --]
When attempted to build using MinGW the next section of code in src/w32.c
conflicts with the definition in MinGW/include/wincon.h
This typedef was not in src/w32.c of Emacs 28.2.
#if _WIN32_WINNT < 0x0501
typedef struct
{
DWORD nFont;
COORD dwFontSize;
} CONSOLE_FONT_INFO;
#endif
By removing the above portion of code from rc/w32.c the build completes
successfully.
-Tak
[-- Attachment #2: Type: text/html, Size: 537 bytes --]
^ permalink raw reply [flat|nested] 18+ messages in thread
* bug#62792: Emacs 29.0.90 build fails
2023-04-11 18:16 bug#62792: Emacs 29.0.90 build fails Tak Ota
@ 2023-04-12 15:33 ` Eli Zaretskii
2023-04-12 16:18 ` Tak Ota
2023-04-12 18:16 ` Tak Ota
0 siblings, 2 replies; 18+ messages in thread
From: Eli Zaretskii @ 2023-04-12 15:33 UTC (permalink / raw)
To: Tak Ota; +Cc: 62792
> From: Tak Ota <takaaki.ota@gmail.com>
> Date: Tue, 11 Apr 2023 11:16:28 -0700
>
> When attempted to build using MinGW the next section of code in src/w32.c conflicts with the definition
> in MinGW/include/wincon.h
Thank you for your report.
Please show the exact compilation error message you get due to this
conflict. I don't see any errors here, and Emacs 29 compiles with
MinGW flawlessly here.
> This typedef was not in src/w32.c of Emacs 28.2.
>
> #if _WIN32_WINNT < 0x0501
> typedef struct
> {
> DWORD nFont;
> COORD dwFontSize;
> } CONSOLE_FONT_INFO;
> #endif
Also, which flavor of MinGW and which version are you using? The
above should be only visible with _WIN32_WINNT that is smaller than
0x0501, which should not happen with latest MinGW64. And looking at
the latest MinGW64 headers, I see the definition of CONSOLE_FONT_INFO
structure there that is identical to the above, so how can it
conflict?
^ permalink raw reply [flat|nested] 18+ messages in thread
* bug#62792: Emacs 29.0.90 build fails
2023-04-12 15:33 ` Eli Zaretskii
@ 2023-04-12 16:18 ` Tak Ota
2023-04-12 16:36 ` Corwin Brust
2023-04-12 16:37 ` Eli Zaretskii
2023-04-12 18:16 ` Tak Ota
1 sibling, 2 replies; 18+ messages in thread
From: Tak Ota @ 2023-04-12 16:18 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 62792
[-- Attachment #1: Type: text/plain, Size: 2477 bytes --]
This is what I saw.
CC w32fns.o
CC w32menu.o
CC w32reg.o
CC w32font.o
CC w32term.o
CC w32xfns.o
CC w32select.o
CC w32uniscribe.o
CC w32cygwinx.o
CC w32.o
w32.c:551:3: error: conflicting types for 'CONSOLE_FONT_INFO'
} CONSOLE_FONT_INFO;
^
In file included from c:\mingw\include\windows.h:43:0,
from c:\mingw\include\winsock2.h:22,
from c:/d/pub/emacs/emacs-29.0.90/nt/inc/sys/socket.h:57,
from thread.h:25,
from lisp.h:2268,
from w32.c:98:
c:\mingw\include\wincon.h:86:3: note: previous declaration of
'CONSOLE_FONT_INFO' was here
} CONSOLE_FONT_INFO, *PCONSOLE_FONT_INFO;
^
make[2]: *** [w32.o] Error 1
make[2]: Leaving directory `/c/d/pub/emacs/emacs-29.0.90/src'
make[1]: *** [src] Error 2
make[1]: Leaving directory `/c/d/pub/emacs/emacs-29.0.90'
make[1]: Entering directory `/c/d/pub/emacs/emacs-29.0.90'
***
*** "make all" failed with exit status 2.
***
*** You could try to:
*** - run "make bootstrap", which might fix the problem
*** - run "make V=1", which displays the full commands invoked by make,
*** to further investigate the problem
***
make[1]: *** [advice-on-failure] Error 2
make[1]: Leaving directory `/c/d/pub/emacs/emacs-29.0.90'
make: *** [all] Error 2
On Wed, Apr 12, 2023 at 8:32 AM Eli Zaretskii <eliz@gnu.org> wrote:
> > From: Tak Ota <takaaki.ota@gmail.com>
> > Date: Tue, 11 Apr 2023 11:16:28 -0700
> >
> > When attempted to build using MinGW the next section of code in
> src/w32.c conflicts with the definition
> > in MinGW/include/wincon.h
>
> Thank you for your report.
>
> Please show the exact compilation error message you get due to this
> conflict. I don't see any errors here, and Emacs 29 compiles with
> MinGW flawlessly here.
>
> > This typedef was not in src/w32.c of Emacs 28.2.
> >
> > #if _WIN32_WINNT < 0x0501
> > typedef struct
> > {
> > DWORD nFont;
> > COORD dwFontSize;
> > } CONSOLE_FONT_INFO;
> > #endif
>
> Also, which flavor of MinGW and which version are you using? The
> above should be only visible with _WIN32_WINNT that is smaller than
> 0x0501, which should not happen with latest MinGW64. And looking at
> the latest MinGW64 headers, I see the definition of CONSOLE_FONT_INFO
> structure there that is identical to the above, so how can it
> conflict?
>
[-- Attachment #2: Type: text/html, Size: 5921 bytes --]
^ permalink raw reply [flat|nested] 18+ messages in thread
* bug#62792: Emacs 29.0.90 build fails
2023-04-12 16:18 ` Tak Ota
@ 2023-04-12 16:36 ` Corwin Brust
2023-04-12 18:36 ` Tak Ota
2023-04-12 16:37 ` Eli Zaretskii
1 sibling, 1 reply; 18+ messages in thread
From: Corwin Brust @ 2023-04-12 16:36 UTC (permalink / raw)
To: Tak Ota; +Cc: 62792, Eli Zaretskii
Hi Tak,
On Wed, Apr 12, 2023 at 11:18 AM Tak Ota <takaaki.ota@gmail.com> wrote:
>
> This is what I saw.
Thanks for the error message detail. Unfortunately, I'm still not
able to reproduce this error. I'm building the emacs-29 branch under
MINGW32, in case that might be it. (It has been several days since I
tried x32 build.)
Are you building from a git checkout or starting from the 29.0.90
source archive?
Can you share the output from running "uname -a" in the shell where
you are building? Here's mine, for reference:
MINGW64_NT-10.0-19043 Avalon 3.3.4-341.x86_64 2022-02-15 17:24 UTC x86_64 Msys
Finally, can you answer Eli's question below?
>>
>> Also, which flavor of MinGW and which version are you using? The
>> above should be only visible with _WIN32_WINNT that is smaller than
>> 0x0501, which should not happen with latest MinGW64. And looking at
>> the latest MinGW64 headers, I see the definition of CONSOLE_FONT_INFO
>> structure there that is identical to the above, so how can it
>> conflict?
Thanks for reporting!
^ permalink raw reply [flat|nested] 18+ messages in thread
* bug#62792: Emacs 29.0.90 build fails
2023-04-12 16:18 ` Tak Ota
2023-04-12 16:36 ` Corwin Brust
@ 2023-04-12 16:37 ` Eli Zaretskii
2023-04-12 17:44 ` Eli Zaretskii
1 sibling, 1 reply; 18+ messages in thread
From: Eli Zaretskii @ 2023-04-12 16:37 UTC (permalink / raw)
To: Tak Ota; +Cc: 62792
> From: Tak Ota <takaaki.ota@gmail.com>
> Date: Wed, 12 Apr 2023 09:18:39 -0700
> Cc: 62792@debbugs.gnu.org
>
> This is what I saw.
>
> CC w32fns.o
> CC w32menu.o
> CC w32reg.o
> CC w32font.o
> CC w32term.o
> CC w32xfns.o
> CC w32select.o
> CC w32uniscribe.o
> CC w32cygwinx.o
> CC w32.o
> w32.c:551:3: error: conflicting types for 'CONSOLE_FONT_INFO'
> } CONSOLE_FONT_INFO;
> ^
> In file included from c:\mingw\include\windows.h:43:0,
> from c:\mingw\include\winsock2.h:22,
> from c:/d/pub/emacs/emacs-29.0.90/nt/inc/sys/socket.h:57,
> from thread.h:25,
> from lisp.h:2268,
> from w32.c:98:
> c:\mingw\include\wincon.h:86:3: note: previous declaration of 'CONSOLE_FONT_INFO' was here
> } CONSOLE_FONT_INFO, *PCONSOLE_FONT_INFO;
> ^
Please show the definition of CONSOLE_FONT_INFO in your wincon.h, it
should begin a few lines before line 86 of wincon.h.
^ permalink raw reply [flat|nested] 18+ messages in thread
* bug#62792: Emacs 29.0.90 build fails
2023-04-12 16:37 ` Eli Zaretskii
@ 2023-04-12 17:44 ` Eli Zaretskii
2023-04-12 18:45 ` Tak Ota
0 siblings, 1 reply; 18+ messages in thread
From: Eli Zaretskii @ 2023-04-12 17:44 UTC (permalink / raw)
To: takaaki.ota; +Cc: 62792
> Cc: 62792@debbugs.gnu.org
> Date: Wed, 12 Apr 2023 19:37:31 +0300
> From: Eli Zaretskii <eliz@gnu.org>
>
> > w32.c:551:3: error: conflicting types for 'CONSOLE_FONT_INFO'
> > } CONSOLE_FONT_INFO;
> > ^
> > In file included from c:\mingw\include\windows.h:43:0,
> > from c:\mingw\include\winsock2.h:22,
> > from c:/d/pub/emacs/emacs-29.0.90/nt/inc/sys/socket.h:57,
> > from thread.h:25,
> > from lisp.h:2268,
> > from w32.c:98:
> > c:\mingw\include\wincon.h:86:3: note: previous declaration of 'CONSOLE_FONT_INFO' was here
> > } CONSOLE_FONT_INFO, *PCONSOLE_FONT_INFO;
> > ^
>
> Please show the definition of CONSOLE_FONT_INFO in your wincon.h, it
> should begin a few lines before line 86 of wincon.h.
And in addition, please show the values of
__MINGW32_VERSION
__MINGW32_MAJOR_VERSION
__MINGW32_MINOR_VERSION
__MINGW32_PATCHLEVEL
They should all be defined in c:\mingw\include\_mingw.h
I think you are using a very old version of MinGW, where this
declaration was not protected by a suitable #if condition.
^ permalink raw reply [flat|nested] 18+ messages in thread
* bug#62792: Emacs 29.0.90 build fails
2023-04-12 15:33 ` Eli Zaretskii
2023-04-12 16:18 ` Tak Ota
@ 2023-04-12 18:16 ` Tak Ota
1 sibling, 0 replies; 18+ messages in thread
From: Tak Ota @ 2023-04-12 18:16 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 62792
[-- Attachment #1: Type: text/plain, Size: 2722 bytes --]
Here is my MinGW information.
ota@Tak-Dell-XPS15 /c/d/pub/emacs/emacs-29.0.90
$ which gcc
/mingw/bin/gcc.exe
ota@Tak-Dell-XPS15 /c/d/pub/emacs/emacs-29.0.90
$ gcc --version
gcc.exe (GCC) 5.3.0
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
ota@Tak-Dell-XPS15 /c/d/pub/emacs/emacs-29.0.90
$ gcc -v
Using built-in specs.
COLLECT_GCC=C:\MinGW\bin\gcc.exe
COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/5.3.0/lto-wrapper.exe
Target: mingw32
Configured with: ../src/gcc-5.3.0/configure --build=x86_64-pc-linux-gnu
--host=mingw32 --prefix=/mingw --disable-win32-registry --target=mingw32
--with-arch=i586 --enable-languages=c,c++,objc,obj-c++,fortran,ada
--enable-static --enable-shared --enable-threads --with-dwarf2
--disable-sjlj-exceptions --enable-version-specific-runtime-libs
--with-libintl-prefix=/mingw --enable-libstdcxx-debug --with-tune=generic
--enable-libgomp --disable-libvtv --enable-nls : (reconfigured)
../src/gcc-5.3.0/configure --build=x86_64-pc-linux-gnu --host=mingw32
--prefix=/mingw --disable-win32-registry --target=mingw32 --with-arch=i586
--enable-languages=c,c++,objc,obj-c++,fortran,ada --enable-static
--enable-shared --enable-threads --with-dwarf2 --disable-sjlj-exceptions
--enable-version-specific-runtime-libs --with-libiconv-prefix=/mingw
--with-libintl-prefix=/mingw --enable-libstdcxx-debug --with-tune=generic
--enable-libgomp --disable-libvtv --enable-nls
Thread model: win32
gcc version 5.3.0 (GCC)
On Wed, Apr 12, 2023 at 8:32 AM Eli Zaretskii <eliz@gnu.org> wrote:
> > From: Tak Ota <takaaki.ota@gmail.com>
> > Date: Tue, 11 Apr 2023 11:16:28 -0700
> >
> > When attempted to build using MinGW the next section of code in
> src/w32.c conflicts with the definition
> > in MinGW/include/wincon.h
>
> Thank you for your report.
>
> Please show the exact compilation error message you get due to this
> conflict. I don't see any errors here, and Emacs 29 compiles with
> MinGW flawlessly here.
>
> > This typedef was not in src/w32.c of Emacs 28.2.
> >
> > #if _WIN32_WINNT < 0x0501
> > typedef struct
> > {
> > DWORD nFont;
> > COORD dwFontSize;
> > } CONSOLE_FONT_INFO;
> > #endif
>
> Also, which flavor of MinGW and which version are you using? The
> above should be only visible with _WIN32_WINNT that is smaller than
> 0x0501, which should not happen with latest MinGW64. And looking at
> the latest MinGW64 headers, I see the definition of CONSOLE_FONT_INFO
> structure there that is identical to the above, so how can it
> conflict?
>
[-- Attachment #2: Type: text/html, Size: 3234 bytes --]
^ permalink raw reply [flat|nested] 18+ messages in thread
* bug#62792: Emacs 29.0.90 build fails
2023-04-12 16:36 ` Corwin Brust
@ 2023-04-12 18:36 ` Tak Ota
2023-04-12 18:42 ` Tak Ota
2023-04-12 18:48 ` Tak Ota
0 siblings, 2 replies; 18+ messages in thread
From: Tak Ota @ 2023-04-12 18:36 UTC (permalink / raw)
To: Corwin Brust; +Cc: 62792, Eli Zaretskii
[-- Attachment #1: Type: text/plain, Size: 1363 bytes --]
Hi Corwin,
ota@Tak-Dell-XPS15 /c/d/pub/emacs/emacs-29.0.90
$ uname -a
MINGW32_NT-6.2 TAK-DELL-XPS15 1.0.19(0.48/3/2) 2016-07-13 17:45 i686 Msys
On Wed, Apr 12, 2023 at 9:36 AM Corwin Brust <corwin@bru.st> wrote:
> Hi Tak,
>
> On Wed, Apr 12, 2023 at 11:18 AM Tak Ota <takaaki.ota@gmail.com> wrote:
> >
> > This is what I saw.
>
> Thanks for the error message detail. Unfortunately, I'm still not
> able to reproduce this error. I'm building the emacs-29 branch under
> MINGW32, in case that might be it. (It has been several days since I
> tried x32 build.)
>
> Are you building from a git checkout or starting from the 29.0.90
> source archive?
>
> Can you share the output from running "uname -a" in the shell where
> you are building? Here's mine, for reference:
>
> MINGW64_NT-10.0-19043 Avalon 3.3.4-341.x86_64 2022-02-15 17:24 UTC
> x86_64 Msys
>
> Finally, can you answer Eli's question below?
>
> >>
> >> Also, which flavor of MinGW and which version are you using? The
> >> above should be only visible with _WIN32_WINNT that is smaller than
> >> 0x0501, which should not happen with latest MinGW64. And looking at
> >> the latest MinGW64 headers, I see the definition of CONSOLE_FONT_INFO
> >> structure there that is identical to the above, so how can it
> >> conflict?
>
> Thanks for reporting!
>
[-- Attachment #2: Type: text/html, Size: 1869 bytes --]
^ permalink raw reply [flat|nested] 18+ messages in thread
* bug#62792: Emacs 29.0.90 build fails
2023-04-12 18:36 ` Tak Ota
@ 2023-04-12 18:42 ` Tak Ota
2023-04-12 19:01 ` Eli Zaretskii
2023-04-12 18:48 ` Tak Ota
1 sibling, 1 reply; 18+ messages in thread
From: Tak Ota @ 2023-04-12 18:42 UTC (permalink / raw)
To: Corwin Brust; +Cc: 62792, Eli Zaretskii
[-- Attachment #1.1: Type: text/plain, Size: 1565 bytes --]
Corwin,
I have attached MinGW/include/wincon.h from my system.
-Tak
On Wed, Apr 12, 2023 at 11:36 AM Tak Ota <takaaki.ota@gmail.com> wrote:
> Hi Corwin,
>
> ota@Tak-Dell-XPS15 /c/d/pub/emacs/emacs-29.0.90
> $ uname -a
> MINGW32_NT-6.2 TAK-DELL-XPS15 1.0.19(0.48/3/2) 2016-07-13 17:45 i686 Msys
>
> On Wed, Apr 12, 2023 at 9:36 AM Corwin Brust <corwin@bru.st> wrote:
>
>> Hi Tak,
>>
>> On Wed, Apr 12, 2023 at 11:18 AM Tak Ota <takaaki.ota@gmail.com> wrote:
>> >
>> > This is what I saw.
>>
>> Thanks for the error message detail. Unfortunately, I'm still not
>> able to reproduce this error. I'm building the emacs-29 branch under
>> MINGW32, in case that might be it. (It has been several days since I
>> tried x32 build.)
>>
>> Are you building from a git checkout or starting from the 29.0.90
>> source archive?
>>
>> Can you share the output from running "uname -a" in the shell where
>> you are building? Here's mine, for reference:
>>
>> MINGW64_NT-10.0-19043 Avalon 3.3.4-341.x86_64 2022-02-15 17:24 UTC
>> x86_64 Msys
>>
>> Finally, can you answer Eli's question below?
>>
>> >>
>> >> Also, which flavor of MinGW and which version are you using? The
>> >> above should be only visible with _WIN32_WINNT that is smaller than
>> >> 0x0501, which should not happen with latest MinGW64. And looking at
>> >> the latest MinGW64 headers, I see the definition of CONSOLE_FONT_INFO
>> >> structure there that is identical to the above, so how can it
>> >> conflict?
>>
>> Thanks for reporting!
>>
>
[-- Attachment #1.2: Type: text/html, Size: 2361 bytes --]
[-- Attachment #2: wincon.h --]
[-- Type: text/plain, Size: 8268 bytes --]
#ifndef _WINCON_H
#define _WINCON_H
#if __GNUC__ >= 3
#pragma GCC system_header
#endif
#ifdef __cplusplus
extern "C" {
#endif
#define FOREGROUND_BLUE 1
#define FOREGROUND_GREEN 2
#define FOREGROUND_RED 4
#define FOREGROUND_INTENSITY 8
#define BACKGROUND_BLUE 16
#define BACKGROUND_GREEN 32
#define BACKGROUND_RED 64
#define BACKGROUND_INTENSITY 128
#if (_WIN32_WINNT >= 0x0501)
#define CONSOLE_FULLSCREEN_MODE 1
#define CONSOLE_WINDOWED_MODE 2
#endif
#define CTRL_C_EVENT 0
#define CTRL_BREAK_EVENT 1
#define CTRL_CLOSE_EVENT 2
#define CTRL_LOGOFF_EVENT 5
#define CTRL_SHUTDOWN_EVENT 6
#define ENABLE_LINE_INPUT 2
#define ENABLE_ECHO_INPUT 4
#define ENABLE_PROCESSED_INPUT 1
#define ENABLE_WINDOW_INPUT 8
#define ENABLE_MOUSE_INPUT 16
#define ENABLE_INSERT_MODE 32
#define ENABLE_QUICK_EDIT_MODE 64
#define ENABLE_EXTENDED_FLAGS 128
#define ENABLE_AUTO_POSITION 256
#define ENABLE_PROCESSED_OUTPUT 1
#define ENABLE_WRAP_AT_EOL_OUTPUT 2
#define KEY_EVENT 1
#define MOUSE_EVENT 2
#define WINDOW_BUFFER_SIZE_EVENT 4
#define MENU_EVENT 8
#define FOCUS_EVENT 16
#define CAPSLOCK_ON 128
#define ENHANCED_KEY 256
#define RIGHT_ALT_PRESSED 1
#define LEFT_ALT_PRESSED 2
#define RIGHT_CTRL_PRESSED 4
#define LEFT_CTRL_PRESSED 8
#define SHIFT_PRESSED 16
#define NUMLOCK_ON 32
#define SCROLLLOCK_ON 64
#define FROM_LEFT_1ST_BUTTON_PRESSED 1
#define RIGHTMOST_BUTTON_PRESSED 2
#define FROM_LEFT_2ND_BUTTON_PRESSED 4
#define FROM_LEFT_3RD_BUTTON_PRESSED 8
#define FROM_LEFT_4TH_BUTTON_PRESSED 16
#define MOUSE_MOVED 1
#define DOUBLE_CLICK 2
#define MOUSE_WHEELED 4
typedef struct _CHAR_INFO {
union {
WCHAR UnicodeChar;
CHAR AsciiChar;
} Char;
WORD Attributes;
} CHAR_INFO, *PCHAR_INFO;
typedef struct _SMALL_RECT {
SHORT Left;
SHORT Top;
SHORT Right;
SHORT Bottom;
} SMALL_RECT, *PSMALL_RECT;
typedef struct _CONSOLE_CURSOR_INFO {
DWORD dwSize;
BOOL bVisible;
} CONSOLE_CURSOR_INFO,*PCONSOLE_CURSOR_INFO;
typedef struct _COORD {
SHORT X;
SHORT Y;
} COORD, *PCOORD;
typedef struct _CONSOLE_FONT_INFO {
DWORD nFont;
COORD dwFontSize;
} CONSOLE_FONT_INFO, *PCONSOLE_FONT_INFO;
typedef struct _CONSOLE_SCREEN_BUFFER_INFO {
COORD dwSize;
COORD dwCursorPosition;
WORD wAttributes;
SMALL_RECT srWindow;
COORD dwMaximumWindowSize;
} CONSOLE_SCREEN_BUFFER_INFO,*PCONSOLE_SCREEN_BUFFER_INFO;
typedef BOOL(CALLBACK *PHANDLER_ROUTINE)(DWORD);
typedef struct _KEY_EVENT_RECORD {
BOOL bKeyDown;
WORD wRepeatCount;
WORD wVirtualKeyCode;
WORD wVirtualScanCode;
union {
WCHAR UnicodeChar;
CHAR AsciiChar;
} uChar;
DWORD dwControlKeyState;
}
#ifdef __GNUC__
/* gcc's alignment is not what win32 expects */
__attribute__((packed))
#endif
KEY_EVENT_RECORD;
typedef struct _MOUSE_EVENT_RECORD {
COORD dwMousePosition;
DWORD dwButtonState;
DWORD dwControlKeyState;
DWORD dwEventFlags;
} MOUSE_EVENT_RECORD;
typedef struct _WINDOW_BUFFER_SIZE_RECORD { COORD dwSize; } WINDOW_BUFFER_SIZE_RECORD;
typedef struct _MENU_EVENT_RECORD { UINT dwCommandId; } MENU_EVENT_RECORD,*PMENU_EVENT_RECORD;
typedef struct _FOCUS_EVENT_RECORD { BOOL bSetFocus; } FOCUS_EVENT_RECORD;
typedef struct _INPUT_RECORD {
WORD EventType;
union {
KEY_EVENT_RECORD KeyEvent;
MOUSE_EVENT_RECORD MouseEvent;
WINDOW_BUFFER_SIZE_RECORD WindowBufferSizeEvent;
MENU_EVENT_RECORD MenuEvent;
FOCUS_EVENT_RECORD FocusEvent;
} Event;
} INPUT_RECORD,*PINPUT_RECORD;
BOOL WINAPI AllocConsole(void);
#if (_WIN32_WINNT >= 0x0501)
#define ATTACH_PARENT_PROCESS ((DWORD)-1)
BOOL WINAPI AttachConsole(DWORD);
#endif
HANDLE WINAPI CreateConsoleScreenBuffer(DWORD,DWORD,CONST SECURITY_ATTRIBUTES*,DWORD,LPVOID);
BOOL WINAPI FillConsoleOutputAttribute(HANDLE,WORD,DWORD,COORD,PDWORD);
BOOL WINAPI FillConsoleOutputCharacterA(HANDLE,CHAR,DWORD,COORD,PDWORD);
BOOL WINAPI FillConsoleOutputCharacterW(HANDLE,WCHAR,DWORD,COORD,PDWORD);
BOOL WINAPI FlushConsoleInputBuffer(HANDLE);
BOOL WINAPI FreeConsole(void);
BOOL WINAPI GenerateConsoleCtrlEvent(DWORD,DWORD);
UINT WINAPI GetConsoleCP(void);
BOOL WINAPI GetConsoleCursorInfo(HANDLE,PCONSOLE_CURSOR_INFO);
BOOL WINAPI GetConsoleMode(HANDLE,PDWORD);
UINT WINAPI GetConsoleOutputCP(void);
BOOL WINAPI GetConsoleScreenBufferInfo(HANDLE,PCONSOLE_SCREEN_BUFFER_INFO);
DWORD WINAPI GetConsoleTitleA(LPSTR,DWORD);
DWORD WINAPI GetConsoleTitleW(LPWSTR,DWORD);
#if (_WIN32_WINNT >= 0x0500)
BOOL WINAPI GetConsoleDisplayMode(LPDWORD);
HWND WINAPI GetConsoleWindow(void);
#endif
#if (_WIN32_WINNT >= 0x0501)
DWORD WINAPI GetConsoleProcessList(LPDWORD, DWORD);
#endif
COORD WINAPI GetLargestConsoleWindowSize(HANDLE);
BOOL WINAPI GetNumberOfConsoleInputEvents(HANDLE,PDWORD);
BOOL WINAPI GetNumberOfConsoleMouseButtons(PDWORD);
BOOL WINAPI PeekConsoleInputA(HANDLE,PINPUT_RECORD,DWORD,PDWORD);
BOOL WINAPI PeekConsoleInputW(HANDLE,PINPUT_RECORD,DWORD,PDWORD);
BOOL WINAPI ReadConsoleA(HANDLE,PVOID,DWORD,PDWORD,PVOID);
BOOL WINAPI ReadConsoleW(HANDLE,PVOID,DWORD,PDWORD,PVOID);
BOOL WINAPI ReadConsoleInputA(HANDLE,PINPUT_RECORD,DWORD,PDWORD);
BOOL WINAPI ReadConsoleInputW(HANDLE,PINPUT_RECORD,DWORD,PDWORD);
BOOL WINAPI ReadConsoleOutputAttribute(HANDLE,LPWORD,DWORD,COORD,LPDWORD);
BOOL WINAPI ReadConsoleOutputCharacterA(HANDLE,LPSTR,DWORD,COORD,PDWORD);
BOOL WINAPI ReadConsoleOutputCharacterW(HANDLE,LPWSTR,DWORD,COORD,PDWORD);
BOOL WINAPI ReadConsoleOutputA(HANDLE,PCHAR_INFO,COORD,COORD,PSMALL_RECT);
BOOL WINAPI ReadConsoleOutputW(HANDLE,PCHAR_INFO,COORD,COORD,PSMALL_RECT);
BOOL WINAPI ScrollConsoleScreenBufferA(HANDLE,const SMALL_RECT*,const SMALL_RECT*,COORD,const CHAR_INFO*);
BOOL WINAPI ScrollConsoleScreenBufferW(HANDLE,const SMALL_RECT*,const SMALL_RECT*,COORD,const CHAR_INFO*);
BOOL WINAPI SetConsoleActiveScreenBuffer(HANDLE);
BOOL WINAPI SetConsoleCP(UINT);
BOOL WINAPI SetConsoleCtrlHandler(PHANDLER_ROUTINE,BOOL);
BOOL WINAPI SetConsoleCursorInfo(HANDLE,const CONSOLE_CURSOR_INFO*);
BOOL WINAPI SetConsoleCursorPosition(HANDLE,COORD);
#if (_WIN32_WINNT >= 0x0501)
BOOL WINAPI SetConsoleDisplayMode(HANDLE,DWORD,PCOORD);
#endif
BOOL WINAPI SetConsoleMode(HANDLE,DWORD);
BOOL WINAPI SetConsoleOutputCP(UINT);
BOOL WINAPI SetConsoleScreenBufferSize(HANDLE,COORD);
BOOL WINAPI SetConsoleTextAttribute(HANDLE,WORD);
BOOL WINAPI SetConsoleTitleA(LPCSTR);
BOOL WINAPI SetConsoleTitleW(LPCWSTR);
BOOL WINAPI SetConsoleWindowInfo(HANDLE,BOOL,const SMALL_RECT*);
BOOL WINAPI WriteConsoleA(HANDLE,PCVOID,DWORD,PDWORD,PVOID);
BOOL WINAPI WriteConsoleW(HANDLE,PCVOID,DWORD,PDWORD,PVOID);
BOOL WINAPI WriteConsoleInputA(HANDLE,const INPUT_RECORD*,DWORD,PDWORD);
BOOL WINAPI WriteConsoleInputW(HANDLE,const INPUT_RECORD*,DWORD,PDWORD);
BOOL WINAPI WriteConsoleOutputA(HANDLE,const CHAR_INFO*,COORD,COORD,PSMALL_RECT);
BOOL WINAPI WriteConsoleOutputW(HANDLE,const CHAR_INFO*,COORD,COORD,PSMALL_RECT);
BOOL WINAPI WriteConsoleOutputAttribute(HANDLE,const WORD*,DWORD,COORD,PDWORD);
BOOL WINAPI WriteConsoleOutputCharacterA(HANDLE,LPCSTR,DWORD,COORD,PDWORD);
BOOL WINAPI WriteConsoleOutputCharacterW(HANDLE,LPCWSTR,DWORD,COORD,PDWORD);
#ifdef UNICODE
#define FillConsoleOutputCharacter FillConsoleOutputCharacterW
#define GetConsoleTitle GetConsoleTitleW
#define PeekConsoleInput PeekConsoleInputW
#define ReadConsole ReadConsoleW
#define ReadConsoleInput ReadConsoleInputW
#define ReadConsoleOutput ReadConsoleOutputW
#define ReadConsoleOutputCharacter ReadConsoleOutputCharacterW
#define ScrollConsoleScreenBuffer ScrollConsoleScreenBufferW
#define SetConsoleTitle SetConsoleTitleW
#define WriteConsole WriteConsoleW
#define WriteConsoleInput WriteConsoleInputW
#define WriteConsoleOutput WriteConsoleOutputW
#define WriteConsoleOutputCharacter WriteConsoleOutputCharacterW
#else
#define FillConsoleOutputCharacter FillConsoleOutputCharacterA
#define GetConsoleTitle GetConsoleTitleA
#define PeekConsoleInput PeekConsoleInputA
#define ReadConsole ReadConsoleA
#define ReadConsoleInput ReadConsoleInputA
#define ReadConsoleOutput ReadConsoleOutputA
#define ReadConsoleOutputCharacter ReadConsoleOutputCharacterA
#define ScrollConsoleScreenBuffer ScrollConsoleScreenBufferA
#define SetConsoleTitle SetConsoleTitleA
#define WriteConsole WriteConsoleA
#define WriteConsoleInput WriteConsoleInputA
#define WriteConsoleOutput WriteConsoleOutputA
#define WriteConsoleOutputCharacter WriteConsoleOutputCharacterA
#endif
#ifdef __cplusplus
}
#endif
#endif
^ permalink raw reply [flat|nested] 18+ messages in thread
* bug#62792: Emacs 29.0.90 build fails
2023-04-12 17:44 ` Eli Zaretskii
@ 2023-04-12 18:45 ` Tak Ota
2023-04-12 18:57 ` Eli Zaretskii
0 siblings, 1 reply; 18+ messages in thread
From: Tak Ota @ 2023-04-12 18:45 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 62792
[-- Attachment #1: Type: text/plain, Size: 1471 bytes --]
#define __MINGW32_VERSION 3022004L
#define __MINGW32_MAJOR_VERSION 3
#define __MINGW32_MINOR_VERSION 22
#define __MINGW32_PATCHLEVEL 4
On Wed, Apr 12, 2023 at 10:44 AM Eli Zaretskii <eliz@gnu.org> wrote:
> > Cc: 62792@debbugs.gnu.org
> > Date: Wed, 12 Apr 2023 19:37:31 +0300
> > From: Eli Zaretskii <eliz@gnu.org>
> >
> > > w32.c:551:3: error: conflicting types for 'CONSOLE_FONT_INFO'
> > > } CONSOLE_FONT_INFO;
> > > ^
> > > In file included from c:\mingw\include\windows.h:43:0,
> > > from c:\mingw\include\winsock2.h:22,
> > > from
> c:/d/pub/emacs/emacs-29.0.90/nt/inc/sys/socket.h:57,
> > > from thread.h:25,
> > > from lisp.h:2268,
> > > from w32.c:98:
> > > c:\mingw\include\wincon.h:86:3: note: previous declaration of
> 'CONSOLE_FONT_INFO' was here
> > > } CONSOLE_FONT_INFO, *PCONSOLE_FONT_INFO;
> > > ^
> >
> > Please show the definition of CONSOLE_FONT_INFO in your wincon.h, it
> > should begin a few lines before line 86 of wincon.h.
>
> And in addition, please show the values of
>
> __MINGW32_VERSION
> __MINGW32_MAJOR_VERSION
> __MINGW32_MINOR_VERSION
> __MINGW32_PATCHLEVEL
>
> They should all be defined in c:\mingw\include\_mingw.h
>
> I think you are using a very old version of MinGW, where this
> declaration was not protected by a suitable #if condition.
>
[-- Attachment #2: Type: text/html, Size: 2109 bytes --]
^ permalink raw reply [flat|nested] 18+ messages in thread
* bug#62792: Emacs 29.0.90 build fails
2023-04-12 18:36 ` Tak Ota
2023-04-12 18:42 ` Tak Ota
@ 2023-04-12 18:48 ` Tak Ota
2023-04-12 18:59 ` Eli Zaretskii
1 sibling, 1 reply; 18+ messages in thread
From: Tak Ota @ 2023-04-12 18:48 UTC (permalink / raw)
To: Corwin Brust; +Cc: 62792, Eli Zaretskii
[-- Attachment #1: Type: text/plain, Size: 1730 bytes --]
I am curious. What is the reason the next was added to w32.c?
#if _WIN32_WINNT < 0x0501
typedef struct
{
DWORD nFont;
COORD dwFontSize;
} CONSOLE_FONT_INFO;
#endif
This was not in the previous emacs source w32.c.
-Tak
On Wed, Apr 12, 2023 at 11:36 AM Tak Ota <takaaki.ota@gmail.com> wrote:
> Hi Corwin,
>
> ota@Tak-Dell-XPS15 /c/d/pub/emacs/emacs-29.0.90
> $ uname -a
> MINGW32_NT-6.2 TAK-DELL-XPS15 1.0.19(0.48/3/2) 2016-07-13 17:45 i686 Msys
>
> On Wed, Apr 12, 2023 at 9:36 AM Corwin Brust <corwin@bru.st> wrote:
>
>> Hi Tak,
>>
>> On Wed, Apr 12, 2023 at 11:18 AM Tak Ota <takaaki.ota@gmail.com> wrote:
>> >
>> > This is what I saw.
>>
>> Thanks for the error message detail. Unfortunately, I'm still not
>> able to reproduce this error. I'm building the emacs-29 branch under
>> MINGW32, in case that might be it. (It has been several days since I
>> tried x32 build.)
>>
>> Are you building from a git checkout or starting from the 29.0.90
>> source archive?
>>
>> Can you share the output from running "uname -a" in the shell where
>> you are building? Here's mine, for reference:
>>
>> MINGW64_NT-10.0-19043 Avalon 3.3.4-341.x86_64 2022-02-15 17:24 UTC
>> x86_64 Msys
>>
>> Finally, can you answer Eli's question below?
>>
>> >>
>> >> Also, which flavor of MinGW and which version are you using? The
>> >> above should be only visible with _WIN32_WINNT that is smaller than
>> >> 0x0501, which should not happen with latest MinGW64. And looking at
>> >> the latest MinGW64 headers, I see the definition of CONSOLE_FONT_INFO
>> >> structure there that is identical to the above, so how can it
>> >> conflict?
>>
>> Thanks for reporting!
>>
>
[-- Attachment #2: Type: text/html, Size: 2581 bytes --]
^ permalink raw reply [flat|nested] 18+ messages in thread
* bug#62792: Emacs 29.0.90 build fails
2023-04-12 18:45 ` Tak Ota
@ 2023-04-12 18:57 ` Eli Zaretskii
2023-04-12 19:54 ` Tak Ota
0 siblings, 1 reply; 18+ messages in thread
From: Eli Zaretskii @ 2023-04-12 18:57 UTC (permalink / raw)
To: Tak Ota; +Cc: 62792
> From: Tak Ota <takaaki.ota@gmail.com>
> Date: Wed, 12 Apr 2023 11:45:58 -0700
> Cc: 62792@debbugs.gnu.org
>
> #define __MINGW32_VERSION 3022004L
> #define __MINGW32_MAJOR_VERSION 3
> #define __MINGW32_MINOR_VERSION 22
> #define __MINGW32_PATCHLEVEL 4
OK, thanks. I think I see the reason now. Please try the patch below
and tell if it solves the problem.
diff --git a/src/w32.c b/src/w32.c
index 8d344d2..bb3b35f 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -543,7 +543,13 @@ int (WINAPI *pWideCharToMultiByte)(UINT,DWORD,LPCWSTR,int,LPSTR,int,LPCSTR,LPBOO
typedef COORD (WINAPI *GetConsoleFontSize_Proc) (HANDLE, DWORD);
-#if _WIN32_WINNT < 0x0501
+/* Old versions of mingw.org's MinGW, before v5.2.0, don't have a
+ _WIN32_WINNT guard for CONSOLE_FONT_INFO in wincon.h, which causes
+ compilation errors. Note: MinGW64 sets _WIN32_WINNT to a higher
+ version, and its w32api.h version stays fixed at 3.14. */
+#if _WIN32_WINNT < 0x0501 \
+ && (__W32API_MAJOR_VERSION > 5 \
+ || (__W32API_MAJOR_VERSION == 5 && __W32API_MINOR_VERSION >= 2))
typedef struct
{
DWORD nFont;
^ permalink raw reply related [flat|nested] 18+ messages in thread
* bug#62792: Emacs 29.0.90 build fails
2023-04-12 18:48 ` Tak Ota
@ 2023-04-12 18:59 ` Eli Zaretskii
2023-04-12 19:56 ` Tak Ota
0 siblings, 1 reply; 18+ messages in thread
From: Eli Zaretskii @ 2023-04-12 18:59 UTC (permalink / raw)
To: Tak Ota; +Cc: 62792, corwin
> From: Tak Ota <takaaki.ota@gmail.com>
> Date: Wed, 12 Apr 2023 11:48:48 -0700
> Cc: Eli Zaretskii <eliz@gnu.org>, 62792@debbugs.gnu.org
>
> I am curious. What is the reason the next was added to w32.c?
>
> #if _WIN32_WINNT < 0x0501
> typedef struct
> {
> DWORD nFont;
> COORD dwFontSize;
> } CONSOLE_FONT_INFO;
> #endif
>
> This was not in the previous emacs source w32.c.
It was added to support the new command restart-emacs. See the
function get_console_font_size and how it is used in w32_reexec_emacs.
^ permalink raw reply [flat|nested] 18+ messages in thread
* bug#62792: Emacs 29.0.90 build fails
2023-04-12 18:42 ` Tak Ota
@ 2023-04-12 19:01 ` Eli Zaretskii
0 siblings, 0 replies; 18+ messages in thread
From: Eli Zaretskii @ 2023-04-12 19:01 UTC (permalink / raw)
To: Tak Ota; +Cc: 62792, corwin
> From: Tak Ota <takaaki.ota@gmail.com>
> Date: Wed, 12 Apr 2023 11:42:06 -0700
> Cc: Eli Zaretskii <eliz@gnu.org>, 62792@debbugs.gnu.org
>
> I have attached MinGW/include/wincon.h from my system.
Interesting. It sounds like you are using (an old version of)
MinGW64, but your system headers are from mingw.org's MinGW.
^ permalink raw reply [flat|nested] 18+ messages in thread
* bug#62792: Emacs 29.0.90 build fails
2023-04-12 18:57 ` Eli Zaretskii
@ 2023-04-12 19:54 ` Tak Ota
2023-04-13 5:20 ` Eli Zaretskii
0 siblings, 1 reply; 18+ messages in thread
From: Tak Ota @ 2023-04-12 19:54 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 62792
[-- Attachment #1: Type: text/plain, Size: 1368 bytes --]
Yes, this patch averts the error. Thank you.
-Tak
On Wed, Apr 12, 2023 at 11:57 AM Eli Zaretskii <eliz@gnu.org> wrote:
> > From: Tak Ota <takaaki.ota@gmail.com>
> > Date: Wed, 12 Apr 2023 11:45:58 -0700
> > Cc: 62792@debbugs.gnu.org
> >
> > #define __MINGW32_VERSION 3022004L
> > #define __MINGW32_MAJOR_VERSION 3
> > #define __MINGW32_MINOR_VERSION 22
> > #define __MINGW32_PATCHLEVEL 4
>
> OK, thanks. I think I see the reason now. Please try the patch below
> and tell if it solves the problem.
>
> diff --git a/src/w32.c b/src/w32.c
> index 8d344d2..bb3b35f 100644
> --- a/src/w32.c
> +++ b/src/w32.c
> @@ -543,7 +543,13 @@ int (WINAPI
> *pWideCharToMultiByte)(UINT,DWORD,LPCWSTR,int,LPSTR,int,LPCSTR,LPBOO
>
> typedef COORD (WINAPI *GetConsoleFontSize_Proc) (HANDLE, DWORD);
>
> -#if _WIN32_WINNT < 0x0501
> +/* Old versions of mingw.org's MinGW, before v5.2.0, don't have a
> + _WIN32_WINNT guard for CONSOLE_FONT_INFO in wincon.h, which causes
> + compilation errors. Note: MinGW64 sets _WIN32_WINNT to a higher
> + version, and its w32api.h version stays fixed at 3.14. */
> +#if _WIN32_WINNT < 0x0501 \
> + && (__W32API_MAJOR_VERSION > 5 \
> + || (__W32API_MAJOR_VERSION == 5 && __W32API_MINOR_VERSION >= 2))
> typedef struct
> {
> DWORD nFont;
>
[-- Attachment #2: Type: text/html, Size: 2013 bytes --]
^ permalink raw reply [flat|nested] 18+ messages in thread
* bug#62792: Emacs 29.0.90 build fails
2023-04-12 18:59 ` Eli Zaretskii
@ 2023-04-12 19:56 ` Tak Ota
0 siblings, 0 replies; 18+ messages in thread
From: Tak Ota @ 2023-04-12 19:56 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 62792, corwin
[-- Attachment #1: Type: text/plain, Size: 703 bytes --]
I understand now. Thanks for the explanation.
-Tak
On Wed, Apr 12, 2023 at 11:59 AM Eli Zaretskii <eliz@gnu.org> wrote:
> > From: Tak Ota <takaaki.ota@gmail.com>
> > Date: Wed, 12 Apr 2023 11:48:48 -0700
> > Cc: Eli Zaretskii <eliz@gnu.org>, 62792@debbugs.gnu.org
> >
> > I am curious. What is the reason the next was added to w32.c?
> >
> > #if _WIN32_WINNT < 0x0501
> > typedef struct
> > {
> > DWORD nFont;
> > COORD dwFontSize;
> > } CONSOLE_FONT_INFO;
> > #endif
> >
> > This was not in the previous emacs source w32.c.
>
> It was added to support the new command restart-emacs. See the
> function get_console_font_size and how it is used in w32_reexec_emacs.
>
[-- Attachment #2: Type: text/html, Size: 1264 bytes --]
^ permalink raw reply [flat|nested] 18+ messages in thread
* bug#62792: Emacs 29.0.90 build fails
2023-04-12 19:54 ` Tak Ota
@ 2023-04-13 5:20 ` Eli Zaretskii
2023-04-13 16:17 ` Tak Ota
0 siblings, 1 reply; 18+ messages in thread
From: Eli Zaretskii @ 2023-04-13 5:20 UTC (permalink / raw)
To: Tak Ota; +Cc: 62792-done
> From: Tak Ota <takaaki.ota@gmail.com>
> Date: Wed, 12 Apr 2023 12:54:45 -0700
> Cc: 62792@debbugs.gnu.org
>
> Yes, this patch averts the error. Thank you.
Thanks, I've now installed this on the emacs-29 branch, and I'm
closing the bug.
^ permalink raw reply [flat|nested] 18+ messages in thread
* bug#62792: Emacs 29.0.90 build fails
2023-04-13 5:20 ` Eli Zaretskii
@ 2023-04-13 16:17 ` Tak Ota
0 siblings, 0 replies; 18+ messages in thread
From: Tak Ota @ 2023-04-13 16:17 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 62792-done
[-- Attachment #1: Type: text/plain, Size: 376 bytes --]
Sounds good. Thank you.
-Tak
On Wed, Apr 12, 2023 at 10:19 PM Eli Zaretskii <eliz@gnu.org> wrote:
> > From: Tak Ota <takaaki.ota@gmail.com>
> > Date: Wed, 12 Apr 2023 12:54:45 -0700
> > Cc: 62792@debbugs.gnu.org
> >
> > Yes, this patch averts the error. Thank you.
>
> Thanks, I've now installed this on the emacs-29 branch, and I'm
> closing the bug.
>
[-- Attachment #2: Type: text/html, Size: 830 bytes --]
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2023-04-13 16:17 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-11 18:16 bug#62792: Emacs 29.0.90 build fails Tak Ota
2023-04-12 15:33 ` Eli Zaretskii
2023-04-12 16:18 ` Tak Ota
2023-04-12 16:36 ` Corwin Brust
2023-04-12 18:36 ` Tak Ota
2023-04-12 18:42 ` Tak Ota
2023-04-12 19:01 ` Eli Zaretskii
2023-04-12 18:48 ` Tak Ota
2023-04-12 18:59 ` Eli Zaretskii
2023-04-12 19:56 ` Tak Ota
2023-04-12 16:37 ` Eli Zaretskii
2023-04-12 17:44 ` Eli Zaretskii
2023-04-12 18:45 ` Tak Ota
2023-04-12 18:57 ` Eli Zaretskii
2023-04-12 19:54 ` Tak Ota
2023-04-13 5:20 ` Eli Zaretskii
2023-04-13 16:17 ` Tak Ota
2023-04-12 18:16 ` Tak Ota
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).