From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp001-out.apm-internet.net (smtp001-out.apm-internet.net [85.119.248.222]) by sourceware.org (Postfix) with ESMTPS id 1F2F13858C30 for ; Thu, 17 Aug 2023 19:59:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1F2F13858C30 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=sandoe.co.uk Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=sandoe.co.uk Received: (qmail 12405 invoked from network); 17 Aug 2023 19:59:00 -0000 X-APM-Out-ID: 16923023401240 X-APM-Authkey: 257869/1(257869/1) 2 Received: from unknown (HELO smtpclient.apple) (81.138.1.83) by smtp001.apm-internet.net with SMTP; 17 Aug 2023 19:59:00 -0000 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.4\)) Subject: Re: [PATCH] improve error for when /usr/include isn't found [PR90835] From: Iain Sandoe In-Reply-To: Date: Thu, 17 Aug 2023 20:58:59 +0100 Cc: GCC Patches Content-Transfer-Encoding: quoted-printable Message-Id: References: To: Eric Gallager X-Mailer: Apple Mail (2.3696.120.41.1.4) X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00,KAM_COUK,KAM_DMARC_STATUS,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi Eric, thanks for working on this. > On 17 Aug 2023, at 20:35, Eric Gallager wrote: >=20 > This is a pretty simple patch that ought to help Darwin users = understand > better why their build is failing when they forget to pass the > --with-sysroot=3D flag to configure. >=20 > gcc/ChangeLog: >=20 > PR target/90835 > * Makefile.in: improve error message when /usr/include is > missing 1. the main issue with this approach is that the error does not happen = until after the user has waited for the whole of the stage 1 build. (I had in mind the idea that top level configure can identify that = the platform is Darwin, and that there is no sysroot configured;=20 then [for bootstrap] complain if there is no /use/include els [for non-bootstrap] complain always) - this would mean that the fail occurs at initial configure time. 2. if we went with this patch as an incremental improvement: + case ${build_os} in \ + darwin*) \ + echo "(on darwin this usually means you need to pass = the --with-sysroot flag to configure to point it to where the system = headers are actually put)" >&2; \ I think we need to put this in terms that relate to the system and = things the user can find, so ; =E2=80=9Con Darwin this usually means you need to pass the = --with-sysroot=3D flag to point to a valid MacOS SDK=E2=80=9D (In practice, the headers cause the first fail, but we also need to find = the libraries when linking) Iain