From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#53377: 28.0.91: Build fails on MSYS2/MinGW-w64 with Clang Date: Thu, 20 Jan 2022 09:33:00 +0200 Message-ID: <83pmomrheb.fsf@gnu.org> References: <874k5z8fao.fsf@telefonica.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20999"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 53377@debbugs.gnu.org To: =?UTF-8?Q?=C3=93scar?= Fuentes Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jan 20 08:39:46 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nAS2q-0005D9-TY for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 20 Jan 2022 08:39:45 +0100 Original-Received: from localhost ([::1]:58634 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nAS2e-0007IR-GO for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 20 Jan 2022 02:39:35 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:47380) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nARxN-0006rk-V4 for bug-gnu-emacs@gnu.org; Thu, 20 Jan 2022 02:34:12 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34994) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nARxK-00073m-Oi for bug-gnu-emacs@gnu.org; Thu, 20 Jan 2022 02:34:05 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nARxK-0004lP-Ef for bug-gnu-emacs@gnu.org; Thu, 20 Jan 2022 02:34:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 20 Jan 2022 07:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53377 X-GNU-PR-Package: emacs Original-Received: via spool by 53377-submit@debbugs.gnu.org id=B53377.164266398918242 (code B ref 53377); Thu, 20 Jan 2022 07:34:02 +0000 Original-Received: (at 53377) by debbugs.gnu.org; 20 Jan 2022 07:33:09 +0000 Original-Received: from localhost ([127.0.0.1]:56130 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nARwT-0004k9-Az for submit@debbugs.gnu.org; Thu, 20 Jan 2022 02:33:09 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:46384) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nARwS-0004jy-Gd for 53377@debbugs.gnu.org; Thu, 20 Jan 2022 02:33:08 -0500 Original-Received: from [2001:470:142:3::e] (port=36032 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nARwM-00032c-OQ; Thu, 20 Jan 2022 02:33:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=mBlByr9v9iar+MpJHf8baVY7gTpkHvnDzTYuhjA1Hnw=; b=eLkJXSYB3ModibDZsDQV LRwxQculUPaZtuQx68AoT7iXPpjlDc1WTXnYW6K74xPLc6XWANMselYpoTy8pX6rFCGsDGExr2Nw2 /CJrTtajb1uOjd3ftcfBYk/3waZEY2oWP6bADliFB+BtPFp7YY5nhOMUDeYoeGL5giPm/boxR7TD4 vKrZW1kaBGqBWOIGbqsivQEK3tdYjxIzJ4jEsD5NE2oaz1OK+s2hRrxUgBOrWFkLq+5GHmInpKgOb 04urJAaWbFfyvSKgdH3FBwG6MYkn+E4cbhQTLa2Opd1uNDB7WXASb5/NGIgCqryDBslft9gEKG4ZC /yfEB2ppB6k/PQ==; Original-Received: from [87.69.77.57] (port=2136 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nARwM-0002oH-Qs; Thu, 20 Jan 2022 02:33:03 -0500 In-Reply-To: <874k5z8fao.fsf@telefonica.net> (message from =?UTF-8?Q?=C3=93scar?= Fuentes on Thu, 20 Jan 2022 00:41:03 +0100) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:224652 Archived-At: > From: Óscar Fuentes > 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"