unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Óscar Fuentes" <ofv@wanadoo.es>
Cc: 53377@debbugs.gnu.org
Subject: bug#53377: 28.0.91: Build fails on MSYS2/MinGW-w64 with Clang
Date: Thu, 20 Jan 2022 09:33:00 +0200	[thread overview]
Message-ID: <83pmomrheb.fsf@gnu.org> (raw)
In-Reply-To: <874k5z8fao.fsf@telefonica.net> (message from Óscar Fuentes on Thu, 20 Jan 2022 00:41:03 +0100)

> From: Óscar Fuentes <ofv@wanadoo.es>
> Date: Thu, 20 Jan 2022 00:41:03 +0100
> 
> 
> Building under the Clang environment (which uses clang instead of gcc)
> fails with
> 
> $ make V=1
> make -C lib all
> make[1]: Entering directory '/d/dev/other/MINGW-packages/mingw-w64-emacs/src/build-CLANG64/lib'
> clang -c -D__USE_MINGW_ANSI_STDIO=1   -MMD -MF deps/getopt.d -MP -Wno-switch -Wno-pointer-sign -Wno-string-plus-int -Wno-unknown-attributes -Wno-initializer-overrides -Wno-tautological-compare -Wno-tautological-constant-out-of-range-compare   -march=x86-64 -mtune=generic -O2 -pipe -I. -I../src -I../../emacs-28.0.91/lib -I../../emacs-28.0.91/lib/../src  -o getopt.o ../../emacs-28.0.91/lib/getopt.c
> In file included from ../../emacs-28.0.91/lib/getopt.c:24:
> In file included from ./getopt.h:52:
> In file included from ./unistd.h:40:
> In file included from C:/apps/msys64/clang64/x86_64-w64-mingw32/include/unistd.h:11:
> In file included from ../../emacs-28.0.91/lib/../src/process.h:29:
> In file included from ../../emacs-28.0.91/lib/../src/gnutls.h:31:
> ../../emacs-28.0.91/lib/../src/lisp.h:944:10: fatal error: 'globals.h' file not found

Your problem is that lib/unistd.h is not supposed to exist in the
Windows builds: we don't produce it from lib/unistd.in.h.  So you need
to find out why in your case it was produced.  That's the immediate
reason for the failure.

I see another problem: MS-Windows builds are supposed to use the cpp
option "-I ../nt/inc", to pick up our replacements for missing and
incomplete stuff in system header files, and your compilation command
above doesn't include that flag.  This could be important in this case
because we have our own replacement for unistd.h in nt/inc/; the
system unistd.h is not supposed to be used at all in the Emacs build
on MS-Windows.  It is definitely important for the rest of the build.

So it sounds like you are not using the build machinery for compiling
Emacs on MS-Windows, and if that is intentional, you are up for a
bumpy ride, and reporting bugs about this adventure is not necessarily
a good idea.  You should first make your build process follow the path
of MinGW, otherwise many things will break, either vociferously or
(worse) silently.

> Speaking of configure, it does not even try to locate several libraries.
> The string "jpeg", for instance, only appears in config.log as
> 
> LIBJPEG=''

So something else is seriously wrong, because on my system I have
this:

  configure:18511: checking for jpeglib 6b or later
  configure:18555: result: -ljpeg
  [...]
  emacs_cv_jpeglib=-ljpeg
  [...]
  #define HAVE_JPEG 1
  [...]
  #define EMACS_CONFIG_FEATURES "ACL GIF GMP GNUTLS HARFBUZZ JPEG JSON LCMS2 LIBXML2 MODULES NOTIFY W32NOTIFY PDUMPER PNG RSVG SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS WEBP XPM ZLIB"





      parent reply	other threads:[~2022-01-20  7:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-19 23:41 bug#53377: 28.0.91: Build fails on MSYS2/MinGW-w64 with Clang Óscar Fuentes
2022-01-20  1:14 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-01-20  3:32   ` Óscar Fuentes
2022-01-20  3:41     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-01-20  3:59       ` Óscar Fuentes
2022-01-20  4:52         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-01-20  7:54         ` Eli Zaretskii
2022-01-20  7:40   ` Eli Zaretskii
2022-01-21  4:14     ` Richard Stallman
2022-01-20  7:33 ` Eli Zaretskii [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83pmomrheb.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=53377@debbugs.gnu.org \
    --cc=ofv@wanadoo.es \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).