[v2] ci: fix aarch64 cross compilation in GHA
Checks
Commit Message
CC_FOR_BUILD is a Travis env variable.
This results in GHA aarch64 cross compilation jobs building x86
binaries.
Example in a recent job on main branch:
2021-10-28T09:51:06.4976495Z + .ci/linux-build.sh
2021-10-28T09:51:06.4985674Z + [ -n build ]
2021-10-28T09:51:06.4987636Z + [ true = true ]
2021-10-28T09:51:06.4987991Z + [ = gcc ]
2021-10-28T09:51:06.4989419Z + [ = clang ]
2021-10-28T09:51:06.4990907Z + [ false = true ]
2021-10-28T09:51:06.4991348Z + [ false = true ]
2021-10-28T09:51:06.4992846Z + [ static = static ]
2021-10-28T09:51:06.4993550Z + OPTS= -Dexamples=l2fwd,l3fwd
2021-10-28T09:51:06.4995388Z + OPTS= -Dexamples=l2fwd,l3fwd
-Dplatform=generic
2021-10-28T09:51:06.4996279Z + OPTS= -Dexamples=l2fwd,l3fwd
-Dplatform=generic --default-library=static
2021-10-28T09:51:06.4998553Z + OPTS= -Dexamples=l2fwd,l3fwd
-Dplatform=generic --default-library=static --buildtype=debugoptimized
2021-10-28T09:51:06.4999949Z + OPTS= -Dexamples=l2fwd,l3fwd
-Dplatform=generic --default-library=static --buildtype=debugoptimized
-Dcheck_includes=true
2021-10-28T09:51:06.5002643Z + meson build --werror
-Dexamples=l2fwd,l3fwd -Dplatform=generic --default-library=static
--buildtype=debugoptimized -Dcheck_includes=true
common/cnxk has issues with Ubuntu 18.04 cross compiler.
It is a known issue (https://bugs.dpdk.org/show_bug.cgi?id=697), disable
it.
Fixes: 5d0b4ffa6964 ("ci: add aarch64 clang cross-compilation Travis builds")
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
Changes since v1:
- disable common/cnxk compilation
---
.ci/linux-build.sh | 12 +++++++-----
.github/workflows/build.yml | 2 ++
2 files changed, 9 insertions(+), 5 deletions(-)
Comments
David Marchand <david.marchand@redhat.com> writes:
> CC_FOR_BUILD is a Travis env variable.
> This results in GHA aarch64 cross compilation jobs building x86
> binaries.
>
> Example in a recent job on main branch:
> 2021-10-28T09:51:06.4976495Z + .ci/linux-build.sh
> 2021-10-28T09:51:06.4985674Z + [ -n build ]
> 2021-10-28T09:51:06.4987636Z + [ true = true ]
> 2021-10-28T09:51:06.4987991Z + [ = gcc ]
> 2021-10-28T09:51:06.4989419Z + [ = clang ]
> 2021-10-28T09:51:06.4990907Z + [ false = true ]
> 2021-10-28T09:51:06.4991348Z + [ false = true ]
> 2021-10-28T09:51:06.4992846Z + [ static = static ]
> 2021-10-28T09:51:06.4993550Z + OPTS= -Dexamples=l2fwd,l3fwd
> 2021-10-28T09:51:06.4995388Z + OPTS= -Dexamples=l2fwd,l3fwd
> -Dplatform=generic
> 2021-10-28T09:51:06.4996279Z + OPTS= -Dexamples=l2fwd,l3fwd
> -Dplatform=generic --default-library=static
> 2021-10-28T09:51:06.4998553Z + OPTS= -Dexamples=l2fwd,l3fwd
> -Dplatform=generic --default-library=static --buildtype=debugoptimized
> 2021-10-28T09:51:06.4999949Z + OPTS= -Dexamples=l2fwd,l3fwd
> -Dplatform=generic --default-library=static --buildtype=debugoptimized
> -Dcheck_includes=true
> 2021-10-28T09:51:06.5002643Z + meson build --werror
> -Dexamples=l2fwd,l3fwd -Dplatform=generic --default-library=static
> --buildtype=debugoptimized -Dcheck_includes=true
>
> common/cnxk has issues with Ubuntu 18.04 cross compiler.
> It is a known issue (https://bugs.dpdk.org/show_bug.cgi?id=697), disable
> it.
>
> Fixes: 5d0b4ffa6964 ("ci: add aarch64 clang cross-compilation Travis builds")
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
> Changes since v1:
> - disable common/cnxk compilation
Acked-by: Aaron Conole <aconole@redhat.com>
On Fri, Oct 29, 2021 at 1:28 PM David Marchand
<david.marchand@redhat.com> wrote:
>
> CC_FOR_BUILD is a Travis env variable.
If ARM still has some credits for Travis builds, can you try this patch?
Thanks.
> -----Original Message-----
> From: David Marchand <david.marchand@redhat.com>
> Sent: Friday, October 29, 2021 11:02 PM
> To: Ruifeng Wang <Ruifeng.Wang@arm.com>; Juraj Linkeš
> <juraj.linkes@pantheon.tech>; Honnappa Nagarahalli
> <Honnappa.Nagarahalli@arm.com>
> Cc: dev <dev@dpdk.org>; jerinj@marvell.com; Aaron Conole
> <aconole@redhat.com>; Michael Santana <maicolgabriel@hotmail.com>
> Subject: Re: [dpdk-dev] [PATCH v2] ci: fix aarch64 cross compilation in GHA
>
> On Fri, Oct 29, 2021 at 1:28 PM David Marchand
> <david.marchand@redhat.com> wrote:
> >
> > CC_FOR_BUILD is a Travis env variable.
>
> If ARM still has some credits for Travis builds, can you try this patch?
> Thanks.
I have no credit to try Travis run.
But the change looks good.
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
>
> --
> David Marchand
On Fri, Oct 29, 2021 at 3:37 PM Aaron Conole <aconole@redhat.com> wrote:
> > CC_FOR_BUILD is a Travis env variable.
> > This results in GHA aarch64 cross compilation jobs building x86
> > binaries.
> >
> > Example in a recent job on main branch:
> > 2021-10-28T09:51:06.4976495Z + .ci/linux-build.sh
> > 2021-10-28T09:51:06.4985674Z + [ -n build ]
> > 2021-10-28T09:51:06.4987636Z + [ true = true ]
> > 2021-10-28T09:51:06.4987991Z + [ = gcc ]
> > 2021-10-28T09:51:06.4989419Z + [ = clang ]
> > 2021-10-28T09:51:06.4990907Z + [ false = true ]
> > 2021-10-28T09:51:06.4991348Z + [ false = true ]
> > 2021-10-28T09:51:06.4992846Z + [ static = static ]
> > 2021-10-28T09:51:06.4993550Z + OPTS= -Dexamples=l2fwd,l3fwd
> > 2021-10-28T09:51:06.4995388Z + OPTS= -Dexamples=l2fwd,l3fwd
> > -Dplatform=generic
> > 2021-10-28T09:51:06.4996279Z + OPTS= -Dexamples=l2fwd,l3fwd
> > -Dplatform=generic --default-library=static
> > 2021-10-28T09:51:06.4998553Z + OPTS= -Dexamples=l2fwd,l3fwd
> > -Dplatform=generic --default-library=static --buildtype=debugoptimized
> > 2021-10-28T09:51:06.4999949Z + OPTS= -Dexamples=l2fwd,l3fwd
> > -Dplatform=generic --default-library=static --buildtype=debugoptimized
> > -Dcheck_includes=true
> > 2021-10-28T09:51:06.5002643Z + meson build --werror
> > -Dexamples=l2fwd,l3fwd -Dplatform=generic --default-library=static
> > --buildtype=debugoptimized -Dcheck_includes=true
> >
> > common/cnxk has issues with Ubuntu 18.04 cross compiler.
> > It is a known issue (https://bugs.dpdk.org/show_bug.cgi?id=697), disable
> > it.
> >
> > Fixes: 5d0b4ffa6964 ("ci: add aarch64 clang cross-compilation Travis builds")
> >
> > Signed-off-by: David Marchand <david.marchand@redhat.com>
> Acked-by: Aaron Conole <aconole@redhat.com>
> Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Applied, thanks.
@@ -54,11 +54,13 @@ catch_coredump() {
}
if [ "$AARCH64" = "true" ]; then
- # convert the arch specifier
- if [ "$CC_FOR_BUILD" = "gcc" ]; then
- OPTS="$OPTS --cross-file config/arm/arm64_armv8_linux_gcc"
- elif [ "$CC_FOR_BUILD" = "clang" ]; then
- OPTS="$OPTS --cross-file config/arm/arm64_armv8_linux_clang_ubuntu1804"
+ # Note: common/cnxk is disabled for Ubuntu 18.04
+ # https://bugs.dpdk.org/show_bug.cgi?id=697
+ OPTS="$OPTS -Ddisable_drivers=common/cnxk"
+ if [ "${CC%%clang}" != "$CC" ]; then
+ OPTS="$OPTS --cross-file config/arm/arm64_armv8_linux_clang_ubuntu1804"
+ else
+ OPTS="$OPTS --cross-file config/arm/arm64_armv8_linux_gcc"
fi
fi
@@ -46,6 +46,8 @@ jobs:
compiler: gcc
library: static
cross: i386
+ # Note: common/cnxk is disabled for Ubuntu 18.04
+ # https://bugs.dpdk.org/show_bug.cgi?id=697
- os: ubuntu-18.04
compiler: gcc
library: static