unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* branch emacs-28 build broken on MinGW64 with gcc 11
@ 2021-11-23 12:19 wsw0108
  2021-11-23 13:07 ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: wsw0108 @ 2021-11-23 12:19 UTC (permalink / raw)
  To: emacs-devel

The error messages as below:

$ make
make -C nt all
make[1]: Entering directory '/d/GitHub/emacs/nt'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/d/GitHub/emacs/nt'
make -C lib all
make[1]: Entering directory '/d/GitHub/emacs/lib'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/d/GitHub/emacs/lib'
make -C lib-src all
make[1]: Entering directory '/d/GitHub/emacs/lib-src'
  CC       ntlib.o
In file included from ../lib/time.h:44,
                 from ntlib.c:35:
../lib/unistd.h:624:3: error: #error "Please include config.h first."
  624 |  #error "Please include config.h first."
      |   ^~~~~
../lib/unistd.h:626:24: error: expected ';' before 'extern'
  626 | _GL_INLINE_HEADER_BEGIN
      |                        ^
      |                        ;
In file included from ../lib/time.h:47,
                 from ntlib.c:35:
E:/msys64/mingw64/x86_64-w64-mingw32/include/time.h:24:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '#pragma'
   24 | #pragma pack(push,_CRT_PACKING)
      |         ^~~~
ntlib.c:417:1: error: conflicting types for 'lstat'; have 'int(const char *, struct _stati64 *)'
  417 | lstat (const char * path, struct stat * buf)
      | ^~~~~
In file included from ../lib/sys/stat.h:47,
                 from ntlib.c:38:
D:/GitHub/emacs/nt/inc/sys/stat.h:162:33: note: previous declaration of 'lstat' with type 'int(const char *, struct stat *)'
  162 | int __cdecl __MINGW_NOTHROW     lstat (const char*, struct stat*);
      |                                 ^~~~~
make[1]: *** [Makefile:418: ntlib.o] Error 1
make[1]: Leaving directory '/d/GitHub/emacs/lib-src'
make: *** [Makefile:436: lib-src] Error 2



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

* Re: branch emacs-28 build broken on MinGW64 with gcc 11
  2021-11-23 12:19 branch emacs-28 build broken on MinGW64 with gcc 11 wsw0108
@ 2021-11-23 13:07 ` Eli Zaretskii
  2021-11-23 14:42   ` wsw0108
  0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2021-11-23 13:07 UTC (permalink / raw)
  To: wsw0108; +Cc: emacs-devel

> From: wsw0108@qq.com
> Date: Tue, 23 Nov 2021 20:19:49 +0800
> 
> The error messages as below:
> 
> $ make
> make -C nt all
> make[1]: Entering directory '/d/GitHub/emacs/nt'
> make[1]: Nothing to be done for 'all'.
> make[1]: Leaving directory '/d/GitHub/emacs/nt'
> make -C lib all
> make[1]: Entering directory '/d/GitHub/emacs/lib'
> make[1]: Nothing to be done for 'all'.
> make[1]: Leaving directory '/d/GitHub/emacs/lib'
> make -C lib-src all
> make[1]: Entering directory '/d/GitHub/emacs/lib-src'
>   CC       ntlib.o
> In file included from ../lib/time.h:44,
>                  from ntlib.c:35:
> ../lib/unistd.h:624:3: error: #error "Please include config.h first."
>   624 |  #error "Please include config.h first."
>       |   ^~~~~
> ../lib/unistd.h:626:24: error: expected ';' before 'extern'
>   626 | _GL_INLINE_HEADER_BEGIN

The Gnulib's unistd.h should not be generated in the MinGW builds.
The file nt/gnulib-cfg.mk has this line:

  OMIT_GNULIB_MODULE_unistd = true

which causes the build process not to generate lib/unistd.h from
lib/unistd.in.h.  You need to investigate why this file was
nevertheless generated on your system.  Perhaps that tree was
previously used for building another configuration, and you didn't say
"make extraclean" before reconfiguring?  Or maybe something is wrong
with your build environment?

I'd start with cloning a fresh Git repository and trying anew.

Bottom line: the problem is most probably specific to your system.

Thanks.



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

* Re: branch emacs-28 build broken on MinGW64 with gcc 11
  2021-11-23 13:07 ` Eli Zaretskii
@ 2021-11-23 14:42   ` wsw0108
  2021-11-23 14:47     ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: wsw0108 @ 2021-11-23 14:42 UTC (permalink / raw)
  To: emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

>> From: wsw0108@qq.com
>> Date: Tue, 23 Nov 2021 20:19:49 +0800
>>
>> The error messages as below:
>>
>> $ make
>> make -C nt all
>> make[1]: Entering directory '/d/GitHub/emacs/nt'
>> make[1]: Nothing to be done for 'all'.
>> make[1]: Leaving directory '/d/GitHub/emacs/nt'
>> make -C lib all
>> make[1]: Entering directory '/d/GitHub/emacs/lib'
>> make[1]: Nothing to be done for 'all'.
>> make[1]: Leaving directory '/d/GitHub/emacs/lib'
>> make -C lib-src all
>> make[1]: Entering directory '/d/GitHub/emacs/lib-src'
>>   CC       ntlib.o
>> In file included from ../lib/time.h:44,
>>                  from ntlib.c:35:
>> ../lib/unistd.h:624:3: error: #error "Please include config.h first."
>>   624 |  #error "Please include config.h first."
>>       |   ^~~~~
>> ../lib/unistd.h:626:24: error: expected ';' before 'extern'
>>   626 | _GL_INLINE_HEADER_BEGIN
>
> The Gnulib's unistd.h should not be generated in the MinGW builds.
> The file nt/gnulib-cfg.mk has this line:
>
>   OMIT_GNULIB_MODULE_unistd = true
>
> which causes the build process not to generate lib/unistd.h from
> lib/unistd.in.h.  You need to investigate why this file was
> nevertheless generated on your system.  Perhaps that tree was
> previously used for building another configuration, and you didn't say
> "make extraclean" before reconfiguring?  Or maybe something is wrong
> with your build environment?
>
> I'd start with cloning a fresh Git repository and trying anew.
>
> Bottom line: the problem is most probably specific to your system.
>
> Thanks.

Sorry, it's my mistake.

After run 'git clean -fdx', the building process can continue without errors.



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

* Re: branch emacs-28 build broken on MinGW64 with gcc 11
  2021-11-23 14:42   ` wsw0108
@ 2021-11-23 14:47     ` Eli Zaretskii
  0 siblings, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2021-11-23 14:47 UTC (permalink / raw)
  To: wsw0108; +Cc: emacs-devel

> From: wsw0108@qq.com
> Date: Tue, 23 Nov 2021 22:42:13 +0800
> 
> Sorry, it's my mistake.
> 
> After run 'git clean -fdx', the building process can continue without errors.

Ok, thanks for telling us.



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

end of thread, other threads:[~2021-11-23 14:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-23 12:19 branch emacs-28 build broken on MinGW64 with gcc 11 wsw0108
2021-11-23 13:07 ` Eli Zaretskii
2021-11-23 14:42   ` wsw0108
2021-11-23 14:47     ` 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).