On Mon, Mar 01, 2021 at 09:58:48AM +0100, Jan Beulich wrote:
> On 26.02.2021 23:48, Stefano Stabellini wrote:
> > On Fri, 26 Feb 2021, Andrew Cooper wrote:
> >> Looks like a copy&paste error.
> >>
> >> Fixes: f6e1d8515d7 ("automation: add alpine linux x86 build jobs")
> >> Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com>
> > 
> > Thanks for the patch and of course it is correct
> > 
> > Acked-by: Stefano Stabellini <sstabell...@kernel.org>
> > 
> > 
> > However unfortunately it breaks the Alpine Linux gitlab-ci again :-(
> > I created a branch with Roger's patches plus this patch. The two clang
> > Alpine Linux build jobs fail:
> > 
> > https://gitlab.com/xen-project/people/sstabellini/xen/-/jobs/1059686530
> > https://gitlab.com/xen-project/people/sstabellini/xen/-/jobs/1059686532
> > 
> > 
> > The error is the following:
> > 
> > <built-in>:3:10: fatal error: 'cstring' file not found
> > #include "cstring"
> >          ^~~~~~~~~
> > 1 error generated.
> > make[10]: *** [Makefile:120: headers++.chk] Error 1
> > make[10]: *** Waiting for unfinished jobs....
> 
> Doesn't this suggest there's a C++ compiler installed without
> the headers also being available? The headers++.chk rule
> requires neither or both to be present.

Right, that's because the include path for clang++ seems to rely on
the gcc c++ headers:

#include <...> search starts here:
 
/usr/bin/../lib/gcc/x86_64-alpine-linux-musl/10.2.1/../../../../include/c++/10.2.1
 
/usr/bin/../lib/gcc/x86_64-alpine-linux-musl/10.2.1/../../../../include/c++/10.2.1/x86_64-alpine-linux-musl
 
/usr/bin/../lib/gcc/x86_64-alpine-linux-musl/10.2.1/../../../../include/c++/10.2.1/backward
 /usr/include
 /usr/lib/clang/10.0.1/include

It's solved by installing g++, I will prepare a patch against the
docker file. I've got no idea why clang doesn't install the required
c++ headers (or simply pull in g++ if that's required).

It's unrelated to the -ffreestanding issue.

Roger.

Reply via email to