[v2] ci: check C++ headers with clang
Checks
Commit Message
If not passing an explicit compiler for C++, meson uses c++ which
defaults to /usr/bin/g++ on a Ubuntu system.
Explicitly choose which compiler to use for C++.
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
Changes since v1:
- rebased,
- moved CXX tweaking in the branch enabling headers check,
---
.ci/linux-build.sh | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
Comments
David Marchand <david.marchand@redhat.com> writes:
> If not passing an explicit compiler for C++, meson uses c++ which
> defaults to /usr/bin/g++ on a Ubuntu system.
> Explicitly choose which compiler to use for C++.
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
> Changes since v1:
> - rebased,
> - moved CXX tweaking in the branch enabling headers check,
>
Not sure why we got a segfault with this in IOL:
36/120 DPDK:fast-tests / eal_flags_misc_autotest FAIL 3.78s killed by signal 11 SIGSEGV
I don't think it is related.
Acked-by: Aaron Conole <aconole@redhat.com>
On Mon, Jul 7, 2025 at 3:41 PM Aaron Conole <aconole@redhat.com> wrote:
>
> David Marchand <david.marchand@redhat.com> writes:
>
> > If not passing an explicit compiler for C++, meson uses c++ which
> > defaults to /usr/bin/g++ on a Ubuntu system.
> > Explicitly choose which compiler to use for C++.
> >
> > Signed-off-by: David Marchand <david.marchand@redhat.com>
> > ---
> > Changes since v1:
> > - rebased,
> > - moved CXX tweaking in the branch enabling headers check,
> >
>
> Not sure why we got a segfault with this in IOL:
>
> 36/120 DPDK:fast-tests / eal_flags_misc_autotest FAIL 3.78s killed by signal 11 SIGSEGV
Strange segfault indeed.
The logs show:
...
EAL: VFIO support initialized
EAL: invalid parameters for --log-color
EAL: invalid log arguments.
EAL: Unregistering with invalid input parameter
EAL: Memzone is not allocated
This smells like a double free... maybe a race in the cleanup phase.
And then this reminds me of a change we did for v25.07.
d84bf0d9aeb4 ("eal/linux: unregister alarm callback before free")
But I don't see something wrong with this change.
Copying author and reviewer.
> I don't think it is related.
I don't see how my patch on testing headers with C++ could be related :-).
On Thu, Jul 3, 2025 at 10:20 AM David Marchand
<david.marchand@redhat.com> wrote:
>
> If not passing an explicit compiler for C++, meson uses c++ which
> defaults to /usr/bin/g++ on a Ubuntu system.
> Explicitly choose which compiler to use for C++.
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> Acked-by: Aaron Conole <aconole@redhat.com>
Applied, thanks.
@@ -102,9 +102,14 @@ OPTS="$OPTS -Dplatform=generic"
OPTS="$OPTS -Ddefault_library=$DEF_LIB"
OPTS="$OPTS -Dbuildtype=$buildtype"
if [ "$STDATOMIC" = "true" ]; then
- OPTS="$OPTS -Denable_stdatomic=true"
+ OPTS="$OPTS -Denable_stdatomic=true"
else
- OPTS="$OPTS -Dcheck_includes=true"
+ OPTS="$OPTS -Dcheck_includes=true"
+ if [ "${CC%%clang}" != "$CC" ]; then
+ export CXX=clang++
+ else
+ export CXX=g++
+ fi
fi
if [ "$MINI" = "true" ]; then
OPTS="$OPTS -Denable_drivers=net/null"