X-Loop: help-debbugs@HIDDEN
Subject: bug#79847: [PATCH 1/1] 31.0.50; xwidgets: pacify macOS compiler warnings
Resent-From: Alexander Adolf <alexander.adolf@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 16 Nov 2025 17:32:01 +0000
Resent-Message-ID: <handler.79847.B.176331430026700 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 79847
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
To: 79847 <at> debbugs.gnu.org
X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.176331430026700
(code B ref -1); Sun, 16 Nov 2025 17:32:01 +0000
Received: (at submit) by debbugs.gnu.org; 16 Nov 2025 17:31:40 +0000
Received: from localhost ([127.0.0.1]:46222 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1vKgbE-0006wa-4l
for submit <at> debbugs.gnu.org; Sun, 16 Nov 2025 12:31:40 -0500
Received: from lists.gnu.org ([2001:470:142::17]:39226)
by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.84_2) (envelope-from <alexander.adolf@HIDDEN>)
id 1vKgbB-0006wK-2b
for submit <at> debbugs.gnu.org; Sun, 16 Nov 2025 12:31:37 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10])
by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.90_1) (envelope-from <alexander.adolf@HIDDEN>)
id 1vKgb5-0004HU-An
for bug-gnu-emacs@HIDDEN; Sun, 16 Nov 2025 12:31:31 -0500
Received: from www191.your-server.de ([188.40.2.11])
by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.90_1) (envelope-from <alexander.adolf@HIDDEN>)
id 1vKgb3-0002QB-GV
for bug-gnu-emacs@HIDDEN; Sun, 16 Nov 2025 12:31:31 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
d=condition-alpha.com; s=default2503; h=Content-Type:MIME-Version:Date:
Subject:To:From:Message-Id:Sender:Reply-To:Cc:Content-Transfer-Encoding:
Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References;
bh=XxehayQTaM8M7/8in/Y1CZo6Oo0GB/Fd6JaSiiXjf+k=; b=G7r/oDHxh8NwiAJjqiMqmPZwCL
VmY1hUVGsXajoPeQ4m+co4gAXhfgQ1mAsqtnosgjRdcTzzLpEKh3kB7A6af90gAWyhalgGMiHEHOV
sIO1/15083DCBD/Akq3ZQxwNhgyafJvwoxbXllkIiLbF48RhZJhMlirWApGYVVwsNbn0bZNyQhzWT
ORRNE3TISf0OrHlnuIhbROZ04QsVx5ND5I6w2QYHnPz9SZbQTJ6zQ4ynlYIWpER+jYELUs77nuC8i
0JMeuzkdflt/lj7uubtdaTUq4UYMEz1XlQpCwrYO3HfOKpSvCIr5bU5hUWV7HBQw/7quOEiPr9ggv
t3CbCnDg==;
Received: from sslproxy02.your-server.de ([78.47.166.47])
by www191.your-server.de with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384
(Exim 4.96.2) (envelope-from <alexander.adolf@HIDDEN>)
id 1vKgax-0009WE-1H for bug-gnu-emacs@HIDDEN;
Sun, 16 Nov 2025 18:31:23 +0100
Received: from localhost ([127.0.0.1])
by sslproxy02.your-server.de with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384
(Exim 4.96) (envelope-from <alexander.adolf@HIDDEN>)
id 1vKgaw-0003Vq-2V for bug-gnu-emacs@HIDDEN;
Sun, 16 Nov 2025 18:31:23 +0100
Message-Id: <9573bce6939f36b65835ff52094e2684@HIDDEN>
From: Alexander Adolf <alexander.adolf@HIDDEN>
Date: Sun, 16 Nov 2025 18:31:22 +0100
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Virus-Scanned: Clear (ClamAV 1.0.9/27822/Fri Nov 14 10:08:05 2025)
Received-SPF: pass client-ip=188.40.2.11;
envelope-from=alexander.adolf@HIDDEN; helo=www191.your-server.de
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001,
SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.9 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.1 (/)
--=-=-=
Content-Type: text/plain
Hello,
on macOS, when including --with-xwidgets in the configure options, but
without having the wxwidgets library installed (e.g. homebrew), so that
the build uses the WebKit from macOS, I get the same compiler warning
for a lengthy list of C files, with dispnew.c being the first one:
clang: warning: no such include directory: '/System/Library/Frameworks/WebKit.framework/Headers' [-Wmissing-include-dirs]
The executable resulting from such a build does work as expected,
however. It seems that the Xcode tools employ some further magic to do
the right thing.
The reason for the compiler warnings is that the hard-coded path for the
macOS WebKit header files in configure.ac may or may not be usable.
Several SDK versions may be installed in parallel, each one providing
its own set of development headers. Usually, the safest bet is to query
for the correct path to SDK files using the xcrun command.
That is what the attached patch does.
It also keeps the original hard-coded path as a fallback in case xcrun
should fail to deliver meaningful results.
Hoping to have helped, and looking forward to your thoughts,
--alexander
--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment;
filename=0001-xwidgets--pacify-macOS-compiler-warnings.patch
Content-Description: [PATCH 1/1] ; xwidgets: pacify macOS compiler warnings
From 95fbd6eb3cc849cdcc878afaebeced77a084c134 Mon Sep 17 00:00:00 2001
From: Alexander Adolf <alexander.adolf@HIDDEN>
Date: Sun, 16 Nov 2025 17:59:02 +0100
Subject: [PATCH 1/1] ; xwidgets: pacify macOS compiler warnings
* configure.ac: when the WebKit header files are not available
in the hard-coded location, query for the location of the
currently active SDK, and resort to the header files there
---
configure.ac | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 44d9cae1e7e..23690eabb40 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4454,7 +4454,16 @@ AC_DEFUN
dnl FIXME: Check framework WebKit2
dnl WEBKIT_REQUIRED=M.m.p
WEBKIT_LIBS="-Wl,-framework -Wl,WebKit"
- WEBKIT_CFLAGS="-I/System/Library/Frameworks/WebKit.framework/Headers"
+ WEBKIT_HEADERS="/System/Library/Frameworks/WebKit.framework/Headers"
+ if test -z "$xcsdkdir" -a -n "$XCRUN" -a ! -d "${WEBKIT_HEADERS}"; then
+ dnl WebKit headers not found. Try Xcode SDK dir if it is sane.
+ xcsdkdir=`$XCRUN --show-sdk-path 2>/dev/null`
+ case $xcsdkdir in
+ *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
+ xcsdkdir="" ;;
+ esac
+ fi
+ WEBKIT_CFLAGS="-I${xcsdkdir}${WEBKIT_HEADERS}"
HAVE_WEBKIT="yes"
HAVE_XWIDGETS=$HAVE_WEBKIT
XWIDGETS_OBJ="xwidget.o"
--
2.50.1 (Apple Git-155)
--=-=-=--
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Alexander Adolf <alexander.adolf@HIDDEN> Subject: bug#79847: Acknowledgement ([PATCH 1/1] 31.0.50; xwidgets: pacify macOS compiler warnings) Message-ID: <handler.79847.B.176331430026700.ack <at> debbugs.gnu.org> References: <9573bce6939f36b65835ff52094e2684@HIDDEN> X-Gnu-PR-Message: ack 79847 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: patch Reply-To: 79847 <at> debbugs.gnu.org Date: Sun, 16 Nov 2025 17:32:01 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): bug-gnu-emacs@HIDDEN If you wish to submit further information on this problem, please send it to 79847 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 79847: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D79847 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
X-Loop: help-debbugs@HIDDEN
Subject: bug#79847: [PATCH 1/1] 31.0.50; xwidgets: pacify macOS compiler warnings
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 17 Nov 2025 12:28:02 +0000
Resent-Message-ID: <handler.79847.B79847.176338243510378 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 79847
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
To: Alexander Adolf <alexander.adolf@HIDDEN>
Cc: 79847 <at> debbugs.gnu.org
Received: via spool by 79847-submit <at> debbugs.gnu.org id=B79847.176338243510378
(code B ref 79847); Mon, 17 Nov 2025 12:28:02 +0000
Received: (at 79847) by debbugs.gnu.org; 17 Nov 2025 12:27:15 +0000
Received: from localhost ([127.0.0.1]:51027 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1vKyKB-0002hK-8l
for submit <at> debbugs.gnu.org; Mon, 17 Nov 2025 07:27:15 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:59230)
by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1vKyK9-0002h2-0P
for 79847 <at> debbugs.gnu.org; Mon, 17 Nov 2025 07:27:13 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
id 1vKyK3-0005ok-7c; Mon, 17 Nov 2025 07:27:07 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
mime-version; bh=ql+nhe5uCd5JSfpYo+tV53sz+OXOLBxuJivBO2JNwl0=; b=mxSmjrW/Jdbs
4Krdsvx6+ynYe6YwNPys/laTxIJqnAjbYDssZ7YuCpGQaKaXHYTHzbOTmqRawr2h3l0FfuNMxh3+f
sJirtGxBbhs1lBRMs7pmeyRDmxSuByl4NuET1DKYYR06w9hdP4jD5X9mDMsxPVG4FddSJ1iI3A+a9
GZM1ZIndYRD5l2tlzCn3bao0f8FZyk5AzFup8zEbHSluge0g2v905rB77l+Ry4nF3ZIRLYUZRbREw
wZ10p9SI+CogQeFyOt6W+PIqnoXZojzW0WejeN8SFbDeX92GozIpYrh+dJYe0MxM1HXKZQgFd0hYR
ugtRK+4IprDwjB/Dp7Nf9g==;
Date: Mon, 17 Nov 2025 14:27:02 +0200
Message-Id: <86o6p0lu95.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <9573bce6939f36b65835ff52094e2684@HIDDEN>
(bug-gnu-emacs@HIDDEN)
References: <9573bce6939f36b65835ff52094e2684@HIDDEN>
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)
> Date: Sun, 16 Nov 2025 18:31:22 +0100
> From: Alexander Adolf via "Bug reports for GNU Emacs,
> the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN>
>
> on macOS, when including --with-xwidgets in the configure options, but
> without having the wxwidgets library installed (e.g. homebrew), so that
> the build uses the WebKit from macOS, I get the same compiler warning
> for a lengthy list of C files, with dispnew.c being the first one:
>
> clang: warning: no such include directory: '/System/Library/Frameworks/WebKit.framework/Headers' [-Wmissing-include-dirs]
>
> The executable resulting from such a build does work as expected,
> however. It seems that the Xcode tools employ some further magic to do
> the right thing.
>
> The reason for the compiler warnings is that the hard-coded path for the
> macOS WebKit header files in configure.ac may or may not be usable.
> Several SDK versions may be installed in parallel, each one providing
> its own set of development headers. Usually, the safest bet is to query
> for the correct path to SDK files using the xcrun command.
>
> That is what the attached patch does.
>
> It also keeps the original hard-coded path as a fallback in case xcrun
> should fail to deliver meaningful results.
>
>
> Hoping to have helped, and looking forward to your thoughts,
Thanks. Could someone who can build Emacs on macOS please test the
patch in the various variants, and provide feedback?
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.