From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yw1-x1132.google.com (mail-yw1-x1132.google.com [IPv6:2607:f8b0:4864:20::1132]) by sourceware.org (Postfix) with ESMTPS id 2A07A3858C62 for ; Sun, 20 Aug 2023 04:01:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2A07A3858C62 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=gwmail.gwu.edu Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gwmail.gwu.edu Received: by mail-yw1-x1132.google.com with SMTP id 00721157ae682-58d9ba95c78so25730087b3.1 for ; Sat, 19 Aug 2023 21:01:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gwmail.gwu.edu; s=google; t=1692504073; x=1693108873; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=8A3+j6LofcPZ9t+0tXMksYONMWnsTCIIPUPf4btmfEg=; b=BJd3VlQHjkxOaiWXWcTvfywk8nsO5jBh89cDZeH6OM2k8Rvs3ZjWPGBPydvP32zatO Maboo3YylAO2SDuuHVn888wkUcRBpBmK/Z5JRnwgXVZjdjUt30Kp+pdB0JxKxo3Vd6Dl 9B+ay0PC2a8Y4hyX5OyCMvkVOepkMOH9wgnmeyfC8ExznGflHGgKTL+9Jea7Nm6NV7yQ fWDADeGZX+cnTexU10PMCB+ZBpd+1oyZGlEdGCZuIIKPMCFiMB+UxmBED3SA0gE1LWhr Au4vhQj/PDuM4quYuDfLmdr1tGVxD+FfKv/Du0V1ODa5fBGjiYXIVufAPC+xIKsXzF+7 lNDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692504073; x=1693108873; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8A3+j6LofcPZ9t+0tXMksYONMWnsTCIIPUPf4btmfEg=; b=k/4Yrj0O0bXRx44sy+lBCERvmaA3HfCHeYX4q/RyyCVFitpVvxI3gEpkxWa6zYcEuv Xvmd8MzOoX1tSzFxpNFF2+QagJcmutQGLYUr8xnNErVtgU3H0NR5HR+fOFMF4YSKNHbl FfxFWDE0FvoV54jODzgokooZpzjcmkCrQgmX8lsunWt1mUUXgbAgvZ3OnYCpbRk2ddBm yfWaFrQy2wKZ7wWA4h8hndlq4jsVFEICNnEcQIyIRVBjItS1b0wuUygBA7zSMTpRtBSM q49lX3mL4r7UZEW8YDI5Ls/Ijl8rP3k3SqUYKeN7xoBHOiM1xdPXvXVped/CVWyp6Obn bNAw== X-Gm-Message-State: AOJu0Yx03Ia4kFPoOvhOEc8WE20NhlpcTfti4gBqdMiHM1eqtClY/cid ThccmwzayAI2SRUES5tnjEEQRUlHQx53qlrc1Jw0+bNzJz4Wwaiuh6kKjQ== X-Google-Smtp-Source: AGHT+IEsDp0KZXkNbMcFyq7BbjNlY4A1cqUHYtKv4E78qUrU+GJxphxR+BLXtPOyRjWHfpE1JfmOv2eDnQE00Cqc5eo= X-Received: by 2002:a81:4917:0:b0:586:9cbb:eef4 with SMTP id w23-20020a814917000000b005869cbbeef4mr3725388ywa.2.1692504073496; Sat, 19 Aug 2023 21:01:13 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Eric Gallager Date: Sun, 20 Aug 2023 00:01:02 -0400 Message-ID: Subject: Re: [PATCH] improve error for when /usr/include isn't found [PR90835] To: Iain Sandoe Cc: GCC Patches Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,JMQ_SPF_NEUTRAL,KAM_SHORT,RCVD_IN_DNSWL_NONE,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: On Thu, Aug 17, 2023 at 11:38=E2=80=AFPM Eric Gallager wrote: > > On Thu, Aug 17, 2023 at 4:05=E2=80=AFPM Iain Sandoe w= rote: > > > > Hi Eric, > > > > thanks for working on this. > > > > > On 17 Aug 2023, at 20:35, Eric Gallager wrote: > > > > > > This is a pretty simple patch that ought to help Darwin users underst= and > > > better why their build is failing when they forget to pass the > > > --with-sysroot=3D flag to configure. > > > > > > gcc/ChangeLog: > > > > > > 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 t= he platform > > is Darwin, and that there is no sysroot configured; > > 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 header= s are actually put)" >&2; \ > > > > I think we need to put this in terms that relate to the system and thin= gs the user can find, so ; > > =E2=80=9Con Darwin this usually means you need to pass the --with-sysro= ot=3D flag to point to a valid MacOS SDK=E2=80=9D > > > > OK, so would it be ok with that change in wording? > > > (In practice, the headers cause the first fail, but we also need to fin= d the libraries when linking) > > > > Iain > > Committed with your proposed change in wording as r14-3335-g9a5d1fceb86a61: https://gcc.gnu.org/git/?p=3Dgcc.git;a=3Dcommitdiff;h=3D9a5d1fceb86a61c9ead= 380df89ce3c4ba387d2e5 (Jeff approved in reply to one of the other copies)