Re: [PATCH] improve error for when /usr/include isn't found [PR90835]
On Thu, Aug 17, 2023 at 11:38 PM Eric Gallager wrote: > > On Thu, Aug 17, 2023 at 4:05 PM Iain Sandoe wrote: > > > > 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 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” > > > > OK, so would it be ok with that change in wording? > > > (In practice, the headers cause the first fail, but we also need to find > > the libraries when linking) > > > > Iain > > Committed with your proposed change in wording as r14-3335-g9a5d1fceb86a61: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=9a5d1fceb86a61c9ead380df89ce3c4ba387d2e5 (Jeff approved in reply to one of the other copies)
Re: [PATCH] improve error for when /usr/include isn't found [PR90835]
On Thu, Aug 17, 2023 at 4:05 PM Iain Sandoe wrote: > > 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 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” > OK, so would it be ok with that change in wording? > (In practice, the headers cause the first fail, but we also need to find the > libraries when linking) > > Iain > > >
Re: [PATCH] improve error for when /usr/include isn't found [PR90835]
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 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
[PATCH] improve error for when /usr/include isn't found [PR90835]
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 0001-improve-error-for-when-usr-include-isn-t-found.patch Description: Binary data