unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Building latest on Windows: error in unistd.h
@ 2021-09-22 17:01 Gary Oberbrunner
  2021-09-22 17:33 ` Eli Zaretskii
  0 siblings, 1 reply; 3+ messages in thread
From: Gary Oberbrunner @ 2021-09-22 17:01 UTC (permalink / raw)
  To: emacs-devel

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

I just updated to the latest master (eb42c4b099c171) and did make bootstrap
in my mingw64 terminal (Windows 10), but I get the following  "Please
include config.h first" error:

make[2]: Entering directory '/c/Users/garyo/src/emacs/emacs/lib-src'
  CC       ntlib.o
In file included from ../lib/time.h:44,
                 from ntlib.c:26:
../lib/unistd.h:660:3: error: #error "Please include config.h first."
  660 |  #error "Please include config.h first."
      |   ^~~~~
../lib/unistd.h:662:24: error: expected ';' before 'extern'
  662 | _GL_INLINE_HEADER_BEGIN
      |                        ^
      |                        ;
In file included from ../lib/time.h:47,
                 from ntlib.c:26:
C:/msys64/mingw64/x86_64-w64-mingw32/include/time.h:24:9: error: expected
'=', ',', ';', 'asm' or '__attribute__' before '#pragma'
   24 | #pragma pack(push,_CRT_PACKING)
      |         ^~~~
make[2]: *** [Makefile:418: ntlib.o] Error 1

My configure line looks like this:

./configure --with-jpeg --with-xpm --with-png --with-tiff --with-rsvg
--with-xml2 --with-gnutls --without-imagemagick
--prefix=c:/emacs/emacs-trunk-2021

Something missing/misconfigured on my end I guess?

-- 
Gary

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

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

* Re: Building latest on Windows: error in unistd.h
  2021-09-22 17:01 Building latest on Windows: error in unistd.h Gary Oberbrunner
@ 2021-09-22 17:33 ` Eli Zaretskii
  2021-09-22 17:38   ` Eli Zaretskii
  0 siblings, 1 reply; 3+ messages in thread
From: Eli Zaretskii @ 2021-09-22 17:33 UTC (permalink / raw)
  To: Gary Oberbrunner; +Cc: emacs-devel

> From: Gary Oberbrunner <garyo@oberbrunner.com>
> Date: Wed, 22 Sep 2021 13:01:22 -0400
> 
> I just updated to the latest master (eb42c4b099c171) and did make bootstrap in my mingw64 terminal
> (Windows 10), but I get the following  "Please include config.h first" error:
> 
> make[2]: Entering directory '/c/Users/garyo/src/emacs/emacs/lib-src'
>   CC       ntlib.o
> In file included from ../lib/time.h:44,
>                  from ntlib.c:26:
> ../lib/unistd.h:660:3: error: #error "Please include config.h first."
>   660 |  #error "Please include config.h first."
>       |   ^~~~~
> ../lib/unistd.h:662:24: error: expected ';' before 'extern'
>   662 | _GL_INLINE_HEADER_BEGIN
>       |                        ^
>       |                        ;
> In file included from ../lib/time.h:47,
>                  from ntlib.c:26:
> C:/msys64/mingw64/x86_64-w64-mingw32/include/time.h:24:9: error: expected '=', ',', ';', 'asm' or
> '__attribute__' before '#pragma'
>    24 | #pragma pack(push,_CRT_PACKING)
>       |         ^~~~
> make[2]: *** [Makefile:418: ntlib.o] Error 1
> 
> My configure line looks like this:
> 
> ./configure --with-jpeg --with-xpm --with-png --with-tiff --with-rsvg --with-xml2 --with-gnutls
> --without-imagemagick --prefix=c:/emacs/emacs-trunk-2021
> 
> Something missing/misconfigured on my end I guess?

How come lib/unistd.h is at all generated and used in your MinGW
build?  It isn't supposed to be, we use unistd.h that comes with
MinGW.

Please try to figure out why configure decided to generate
lib/unistd.h.  Crystal ball says you updated your MinGW64 headers not
long ago, and something there causes that.



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

* Re: Building latest on Windows: error in unistd.h
  2021-09-22 17:33 ` Eli Zaretskii
@ 2021-09-22 17:38   ` Eli Zaretskii
  0 siblings, 0 replies; 3+ messages in thread
From: Eli Zaretskii @ 2021-09-22 17:38 UTC (permalink / raw)
  To: garyo; +Cc: emacs-devel

> Date: Wed, 22 Sep 2021 20:33:15 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: emacs-devel@gnu.org
> 
> How come lib/unistd.h is at all generated and used in your MinGW
> build?  It isn't supposed to be, we use unistd.h that comes with
> MinGW.

nt/gnulib-cfg.mk has this:

  OMIT_GNULIB_MODULE_unistd = true

which should force Gnulib not to generate the unistd.h header.  Why
doesn't it work for you?



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

end of thread, other threads:[~2021-09-22 17:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-22 17:01 Building latest on Windows: error in unistd.h Gary Oberbrunner
2021-09-22 17:33 ` Eli Zaretskii
2021-09-22 17:38   ` 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).