diff mbox series

[for-4.15] automation: Fix the Alpine clang builds to use clang

Message ID 20210226110233.27991-1-andrew.cooper3@citrix.com (mailing list archive)
State New
Headers show
Series [for-4.15] automation: Fix the Alpine clang builds to use clang | expand

Commit Message

Andrew Cooper Feb. 26, 2021, 11:02 a.m. UTC
Looks like a copy&paste error.

Fixes: f6e1d8515d7 ("automation: add alpine linux x86 build jobs")
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Doug Goldstein <cardoe@cardoe.com>
CC: Ian Jackson <iwj@xenproject.org>
CC: Stefano Stabellini <sstabellini@kernel.org>
---
 automation/gitlab-ci/build.yaml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Stefano Stabellini Feb. 26, 2021, 10:48 p.m. UTC | #1
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.cooper3@citrix.com>

Thanks for the patch and of course it is correct

Acked-by: Stefano Stabellini <sstabellini@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....







> ---
> CC: Doug Goldstein <cardoe@cardoe.com>
> CC: Ian Jackson <iwj@xenproject.org>
> CC: Stefano Stabellini <sstabellini@kernel.org>
> ---
>  automation/gitlab-ci/build.yaml | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/automation/gitlab-ci/build.yaml b/automation/gitlab-ci/build.yaml
> index d00b8a5123..23ab81d892 100644
> --- a/automation/gitlab-ci/build.yaml
> +++ b/automation/gitlab-ci/build.yaml
> @@ -443,13 +443,13 @@ alpine-3.12-gcc-debug:
>    allow_failure: true
>  
>  alpine-3.12-clang:
> -  extends: .gcc-x86-64-build
> +  extends: .clang-x86-64-build
>    variables:
>      CONTAINER: alpine:3.12
>    allow_failure: true
>  
>  alpine-3.12-clang-debug:
> -  extends: .gcc-x86-64-build-debug
> +  extends: .clang-x86-64-build-debug
>    variables:
>      CONTAINER: alpine:3.12
>    allow_failure: true
> -- 
> 2.11.0
>
Jan Beulich March 1, 2021, 8:58 a.m. UTC | #2
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.cooper3@citrix.com>
> 
> Thanks for the patch and of course it is correct
> 
> Acked-by: Stefano Stabellini <sstabellini@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.

Jan
Roger Pau Monné March 1, 2021, 9:31 a.m. UTC | #3
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.cooper3@citrix.com>
> > 
> > Thanks for the patch and of course it is correct
> > 
> > Acked-by: Stefano Stabellini <sstabellini@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.
Roger Pau Monné March 6, 2021, 9:24 a.m. UTC | #4
On Fri, Feb 26, 2021 at 11:02:33AM +0000, Andrew Cooper wrote:
> Looks like a copy&paste error.
> 
> Fixes: f6e1d8515d7 ("automation: add alpine linux x86 build jobs")
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>

Thanks, Roger.
diff mbox series

Patch

diff --git a/automation/gitlab-ci/build.yaml b/automation/gitlab-ci/build.yaml
index d00b8a5123..23ab81d892 100644
--- a/automation/gitlab-ci/build.yaml
+++ b/automation/gitlab-ci/build.yaml
@@ -443,13 +443,13 @@  alpine-3.12-gcc-debug:
   allow_failure: true
 
 alpine-3.12-clang:
-  extends: .gcc-x86-64-build
+  extends: .clang-x86-64-build
   variables:
     CONTAINER: alpine:3.12
   allow_failure: true
 
 alpine-3.12-clang-debug:
-  extends: .gcc-x86-64-build-debug
+  extends: .clang-x86-64-build-debug
   variables:
     CONTAINER: alpine:3.12
   allow_failure: true