public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Iain Sandoe <iain@sandoe.co.uk>
To: Eric Gallager <egall@gwmail.gwu.edu>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] improve error for when /usr/include isn't found [PR90835]
Date: Thu, 17 Aug 2023 20:58:59 +0100	[thread overview]
Message-ID: <A1A7DDC9-E0C4-41DA-AB56-F80535CCD79E@sandoe.co.uk> (raw)
In-Reply-To: <CAMfHzOtyCBEjAz668om6aL3cxpfp9kJJK8BHCqCCWiSEAy4wXw@mail.gmail.com>

Hi Eric,

thanks for working on this.

> On 17 Aug 2023, at 20:35, Eric Gallager <egall@gwmail.gwu.edu> wrote:
> 
> 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= 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 the 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 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 ;
“on Darwin this usually means you need to pass the --with-sysroot= flag to point to a valid MacOS SDK”

(In practice, the headers cause the first fail, but we also need to find the libraries when linking)

Iain




  reply	other threads:[~2023-08-17 19:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-17 19:35 Eric Gallager
2023-08-17 19:58 ` Iain Sandoe [this message]
2023-08-18  3:38   ` Eric Gallager
2023-08-20  4:01     ` Eric Gallager

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

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

  git send-email \
    --in-reply-to=A1A7DDC9-E0C4-41DA-AB56-F80535CCD79E@sandoe.co.uk \
    --to=iain@sandoe.co.uk \
    --cc=egall@gwmail.gwu.edu \
    --cc=gcc-patches@gcc.gnu.org \
    /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.
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).