[v8,09/14] ci: switch to generic Arm builds
Checks
Commit Message
Switch to generic build on arm Travis machines to avoid differences in
build configuration caused by different Arm hardware.
Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
---
.ci/linux-build.sh | 4 ++++
1 file changed, 4 insertions(+)
Comments
<snip>
>
> Switch to generic build on arm Travis machines to avoid differences in build
> configuration caused by different Arm hardware.
>
> Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
> ---
> .ci/linux-build.sh | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh index d079801d7..7fe0fcfd8
> 100755
> --- a/.ci/linux-build.sh
> +++ b/.ci/linux-build.sh
> @@ -33,6 +33,10 @@ if [ "$AARCH64" = "1" ]; then
> OPTS="$OPTS --cross-file config/arm/arm64_armv8_linux_gcc"
> fi
>
> +if [ "$(uname -m)" = "aarch64" ]; then
> + OPTS="$OPTS -Dmachine=generic"
> +fi
> +
I do not think we should change it by default. We would need to test generic builds as well as the SoC specific build.
> if [ "$BUILD_DOCS" = "1" ]; then
> OPTS="$OPTS -Denable_docs=true"
> fi
> --
> 2.20.1
> -----Original Message-----
> From: Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>
> Sent: Sunday, November 8, 2020 3:43 PM
> To: Juraj Linkeš <juraj.linkes@pantheon.tech>; bruce.richardson@intel.com;
> Ruifeng Wang <Ruifeng.Wang@arm.com>; Phil Yang <Phil.Yang@arm.com>;
> vcchunga@amazon.com; Dharmik Thakkar <Dharmik.Thakkar@arm.com>;
> jerinjacobk@gmail.com; hemant.agrawal@nxp.com; Ajit Khaparde
> (ajit.khaparde@broadcom.com) <ajit.khaparde@broadcom.com>;
> ferruh.yigit@intel.com; aconole@redhat.com
> Cc: dev@dpdk.org; nd <nd@arm.com>; Honnappa Nagarahalli
> <Honnappa.Nagarahalli@arm.com>; nd <nd@arm.com>
> Subject: RE: [PATCH v8 09/14] ci: switch to generic Arm builds
>
> <snip>
>
> >
> > Switch to generic build on arm Travis machines to avoid differences in
> > build configuration caused by different Arm hardware.
> >
> > Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
> > ---
> > .ci/linux-build.sh | 4 ++++
> > 1 file changed, 4 insertions(+)
> >
> > diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh index
> > d079801d7..7fe0fcfd8
> > 100755
> > --- a/.ci/linux-build.sh
> > +++ b/.ci/linux-build.sh
> > @@ -33,6 +33,10 @@ if [ "$AARCH64" = "1" ]; then
> > OPTS="$OPTS --cross-file config/arm/arm64_armv8_linux_gcc"
> > fi
> >
> > +if [ "$(uname -m)" = "aarch64" ]; then
> > + OPTS="$OPTS -Dmachine=generic"
> > +fi
> > +
> I do not think we should change it by default. We would need to test generic
> builds as well as the SoC specific build.
>
I'll drop the patch. Testing without it revealed a failure in clang Graviton2 build (only in that one build, other build are working fine):
../lib/librte_eal/arm/include/rte_atomic_64.h:76:39: error: instruction requires: lse
Here's the build with full log: https://travis-ci.com/github/jlinkes/dpdk/jobs/433176503
I think we need to add a commit that fixes the failure but I don't know how to fix it.
>
> > if [ "$BUILD_DOCS" = "1" ]; then
> > OPTS="$OPTS -Denable_docs=true"
> > fi
> > --
> > 2.20.1
> -----Original Message-----
> From: Juraj Linkeš <juraj.linkes@pantheon.tech>
> Sent: Wednesday, November 11, 2020 7:46 PM
> To: Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>;
> bruce.richardson@intel.com; Ruifeng Wang <Ruifeng.Wang@arm.com>; Phil
> Yang <Phil.Yang@arm.com>; vcchunga@amazon.com; Dharmik Thakkar
> <Dharmik.Thakkar@arm.com>; jerinjacobk@gmail.com;
> hemant.agrawal@nxp.com; Ajit Khaparde (ajit.khaparde@broadcom.com)
> <ajit.khaparde@broadcom.com>; ferruh.yigit@intel.com;
> aconole@redhat.com
> Cc: dev@dpdk.org; nd <nd@arm.com>; nd <nd@arm.com>
> Subject: RE: [PATCH v8 09/14] ci: switch to generic Arm builds
>
>
>
> > -----Original Message-----
> > From: Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>
> > Sent: Sunday, November 8, 2020 3:43 PM
> > To: Juraj Linkeš <juraj.linkes@pantheon.tech>;
> > bruce.richardson@intel.com; Ruifeng Wang <Ruifeng.Wang@arm.com>;
> Phil
> > Yang <Phil.Yang@arm.com>; vcchunga@amazon.com; Dharmik Thakkar
> > <Dharmik.Thakkar@arm.com>; jerinjacobk@gmail.com;
> > hemant.agrawal@nxp.com; Ajit Khaparde
> > (ajit.khaparde@broadcom.com) <ajit.khaparde@broadcom.com>;
> > ferruh.yigit@intel.com; aconole@redhat.com
> > Cc: dev@dpdk.org; nd <nd@arm.com>; Honnappa Nagarahalli
> > <Honnappa.Nagarahalli@arm.com>; nd <nd@arm.com>
> > Subject: RE: [PATCH v8 09/14] ci: switch to generic Arm builds
> >
> > <snip>
> >
> > >
> > > Switch to generic build on arm Travis machines to avoid differences
> > > in build configuration caused by different Arm hardware.
> > >
> > > Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
> > > ---
> > > .ci/linux-build.sh | 4 ++++
> > > 1 file changed, 4 insertions(+)
> > >
> > > diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh index
> > > d079801d7..7fe0fcfd8
> > > 100755
> > > --- a/.ci/linux-build.sh
> > > +++ b/.ci/linux-build.sh
> > > @@ -33,6 +33,10 @@ if [ "$AARCH64" = "1" ]; then
> > > OPTS="$OPTS --cross-file config/arm/arm64_armv8_linux_gcc"
> > > fi
> > >
> > > +if [ "$(uname -m)" = "aarch64" ]; then
> > > + OPTS="$OPTS -Dmachine=generic"
> > > +fi
> > > +
> > I do not think we should change it by default. We would need to test
> > generic builds as well as the SoC specific build.
> >
>
> I'll drop the patch. Testing without it revealed a failure in clang Graviton2
> build (only in that one build, other build are working fine):
> ../lib/librte_eal/arm/include/rte_atomic_64.h:76:39: error: instruction
> requires: lse
>
> Here's the build with full log: https://travis-
> ci.com/github/jlinkes/dpdk/jobs/433176503
>
> I think we need to add a commit that fixes the failure but I don't know how
> to fix it.
Can you try '-mcpu=native' instead of '-march=native -mtune=native' for native build?
Clang doesn't support '-march=native'.
Reference can be found here:
https://community.arm.com/developer/tools-software/tools/b/tools-software-ides-blog/posts/compiler-flags-across-architectures-march-mtune-and-mcpu
>
> >
> > > if [ "$BUILD_DOCS" = "1" ]; then
> > > OPTS="$OPTS -Denable_docs=true"
> > > fi
> > > --
> > > 2.20.1
> -----Original Message-----
> From: Ruifeng Wang <Ruifeng.Wang@arm.com>
> Sent: Wednesday, November 11, 2020 3:52 PM
> To: Juraj Linkeš <juraj.linkes@pantheon.tech>; Honnappa Nagarahalli
> <Honnappa.Nagarahalli@arm.com>; bruce.richardson@intel.com; Phil Yang
> <Phil.Yang@arm.com>; vcchunga@amazon.com; Dharmik Thakkar
> <Dharmik.Thakkar@arm.com>; jerinjacobk@gmail.com;
> hemant.agrawal@nxp.com; Ajit Khaparde (ajit.khaparde@broadcom.com)
> <ajit.khaparde@broadcom.com>; ferruh.yigit@intel.com; aconole@redhat.com
> Cc: dev@dpdk.org; nd <nd@arm.com>; nd <nd@arm.com>; nd <nd@arm.com>
> Subject: RE: [PATCH v8 09/14] ci: switch to generic Arm builds
>
>
> > -----Original Message-----
> > From: Juraj Linkeš <juraj.linkes@pantheon.tech>
> > Sent: Wednesday, November 11, 2020 7:46 PM
> > To: Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>;
> > bruce.richardson@intel.com; Ruifeng Wang <Ruifeng.Wang@arm.com>; Phil
> > Yang <Phil.Yang@arm.com>; vcchunga@amazon.com; Dharmik Thakkar
> > <Dharmik.Thakkar@arm.com>; jerinjacobk@gmail.com;
> > hemant.agrawal@nxp.com; Ajit Khaparde (ajit.khaparde@broadcom.com)
> > <ajit.khaparde@broadcom.com>; ferruh.yigit@intel.com;
> > aconole@redhat.com
> > Cc: dev@dpdk.org; nd <nd@arm.com>; nd <nd@arm.com>
> > Subject: RE: [PATCH v8 09/14] ci: switch to generic Arm builds
> >
> >
> >
> > > -----Original Message-----
> > > From: Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>
> > > Sent: Sunday, November 8, 2020 3:43 PM
> > > To: Juraj Linkeš <juraj.linkes@pantheon.tech>;
> > > bruce.richardson@intel.com; Ruifeng Wang <Ruifeng.Wang@arm.com>;
> > Phil
> > > Yang <Phil.Yang@arm.com>; vcchunga@amazon.com; Dharmik Thakkar
> > > <Dharmik.Thakkar@arm.com>; jerinjacobk@gmail.com;
> > > hemant.agrawal@nxp.com; Ajit Khaparde
> > > (ajit.khaparde@broadcom.com) <ajit.khaparde@broadcom.com>;
> > > ferruh.yigit@intel.com; aconole@redhat.com
> > > Cc: dev@dpdk.org; nd <nd@arm.com>; Honnappa Nagarahalli
> > > <Honnappa.Nagarahalli@arm.com>; nd <nd@arm.com>
> > > Subject: RE: [PATCH v8 09/14] ci: switch to generic Arm builds
> > >
> > > <snip>
> > >
> > > >
> > > > Switch to generic build on arm Travis machines to avoid
> > > > differences in build configuration caused by different Arm hardware.
> > > >
> > > > Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
> > > > ---
> > > > .ci/linux-build.sh | 4 ++++
> > > > 1 file changed, 4 insertions(+)
> > > >
> > > > diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh index
> > > > d079801d7..7fe0fcfd8
> > > > 100755
> > > > --- a/.ci/linux-build.sh
> > > > +++ b/.ci/linux-build.sh
> > > > @@ -33,6 +33,10 @@ if [ "$AARCH64" = "1" ]; then
> > > > OPTS="$OPTS --cross-file config/arm/arm64_armv8_linux_gcc"
> > > > fi
> > > >
> > > > +if [ "$(uname -m)" = "aarch64" ]; then
> > > > + OPTS="$OPTS -Dmachine=generic"
> > > > +fi
> > > > +
> > > I do not think we should change it by default. We would need to test
> > > generic builds as well as the SoC specific build.
> > >
> >
> > I'll drop the patch. Testing without it revealed a failure in clang
> > Graviton2 build (only in that one build, other build are working fine):
> > ../lib/librte_eal/arm/include/rte_atomic_64.h:76:39: error:
> > instruction
> > requires: lse
> >
> > Here's the build with full log: https://travis-
> > ci.com/github/jlinkes/dpdk/jobs/433176503
> >
> > I think we need to add a commit that fixes the failure but I don't
> > know how to fix it.
>
> Can you try '-mcpu=native' instead of '-march=native -mtune=native' for native
> build?
> Clang doesn't support '-march=native'.
> Reference can be found here:
> https://community.arm.com/developer/tools-software/tools/b/tools-software-
> ides-blog/posts/compiler-flags-across-architectures-march-mtune-and-mcpu
> >
Unfortunately, it did not help:
Compiler for C supports arguments -mcpu=native: YES
Message: Using machine args: ['-mcpu=native']
...
../lib/librte_eal/arm/include/rte_atomic_64.h:76:39: error: instruction requires: lse
Full log here: https://travis-ci.com/github/jlinkes/dpdk/jobs/433414180
> > >
> > > > if [ "$BUILD_DOCS" = "1" ]; then
> > > > OPTS="$OPTS -Denable_docs=true"
> > > > fi
> > > > --
> > > > 2.20.1
<snip>
> > > > >
> > > > > Switch to generic build on arm Travis machines to avoid
> > > > > differences in build configuration caused by different Arm hardware.
> > > > >
> > > > > Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
> > > > > ---
> > > > > .ci/linux-build.sh | 4 ++++
> > > > > 1 file changed, 4 insertions(+)
> > > > >
> > > > > diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh index
> > > > > d079801d7..7fe0fcfd8
> > > > > 100755
> > > > > --- a/.ci/linux-build.sh
> > > > > +++ b/.ci/linux-build.sh
> > > > > @@ -33,6 +33,10 @@ if [ "$AARCH64" = "1" ]; then
> > > > > OPTS="$OPTS --cross-file config/arm/arm64_armv8_linux_gcc"
> > > > > fi
> > > > >
> > > > > +if [ "$(uname -m)" = "aarch64" ]; then
> > > > > + OPTS="$OPTS -Dmachine=generic"
> > > > > +fi
> > > > > +
> > > > I do not think we should change it by default. We would need to
> > > > test generic builds as well as the SoC specific build.
> > > >
> > >
> > > I'll drop the patch. Testing without it revealed a failure in clang
> > > Graviton2 build (only in that one build, other build are working fine):
> > > ../lib/librte_eal/arm/include/rte_atomic_64.h:76:39: error:
> > > instruction
> > > requires: lse
> > >
> > > Here's the build with full log: https://travis-
> > > ci.com/github/jlinkes/dpdk/jobs/433176503
> > >
> > > I think we need to add a commit that fixes the failure but I don't
> > > know how to fix it.
> >
> > Can you try '-mcpu=native' instead of '-march=native -mtune=native'
> > for native build?
> > Clang doesn't support '-march=native'.
> > Reference can be found here:
> > https://community.arm.com/developer/tools-software/tools/b/tools-
> softw
> > are-
> > ides-blog/posts/compiler-flags-across-architectures-march-mtune-and-mc
> > pu
> > >
>
> Unfortunately, it did not help:
> Compiler for C supports arguments -mcpu=native: YES
> Message: Using machine args: ['-mcpu=native'] ...
> ../lib/librte_eal/arm/include/rte_atomic_64.h:76:39: error: instruction
> requires: lse
>
> Full log here: https://travis-ci.com/github/jlinkes/dpdk/jobs/433414180
>
I was able to reproduce this on N1SDP through some hacks. The current code uses the flags " -march=armv8.2-a+crypto -mcpu=neoverse-n1" and the compilation succeeds.
With "-march=native, -mtune=native", the build fails
"-march=native" I see the message " Compiler for C supports arguments -march=native: NO (cached)" and the build fails
"-mtune=native" I see the message " Compiler for C supports arguments -mtune=native: YES (cached)" and the build fails
"-mcpu=native" I see the message "Compiler for C supports arguments -mcpu=native: YES" and the build fails.
Looks like a compiler issue to me
> > > >
> > > > > if [ "$BUILD_DOCS" = "1" ]; then
> > > > > OPTS="$OPTS -Denable_docs=true"
> > > > > fi
> > > > > --
> > > > > 2.20.1
> -----Original Message-----
> From: Juraj Linkeš <juraj.linkes@pantheon.tech>
> Sent: Thursday, November 12, 2020 12:19 AM
> To: Ruifeng Wang <Ruifeng.Wang@arm.com>; Honnappa Nagarahalli
> <Honnappa.Nagarahalli@arm.com>; bruce.richardson@intel.com; Phil Yang
> <Phil.Yang@arm.com>; vcchunga@amazon.com; Dharmik Thakkar
> <Dharmik.Thakkar@arm.com>; jerinjacobk@gmail.com;
> hemant.agrawal@nxp.com; Ajit Khaparde (ajit.khaparde@broadcom.com)
> <ajit.khaparde@broadcom.com>; ferruh.yigit@intel.com;
> aconole@redhat.com
> Cc: dev@dpdk.org; nd <nd@arm.com>; nd <nd@arm.com>; nd
> <nd@arm.com>
> Subject: RE: [PATCH v8 09/14] ci: switch to generic Arm builds
>
>
>
> > -----Original Message-----
> > From: Ruifeng Wang <Ruifeng.Wang@arm.com>
> > Sent: Wednesday, November 11, 2020 3:52 PM
> > To: Juraj Linkeš <juraj.linkes@pantheon.tech>; Honnappa Nagarahalli
> > <Honnappa.Nagarahalli@arm.com>; bruce.richardson@intel.com; Phil Yang
> > <Phil.Yang@arm.com>; vcchunga@amazon.com; Dharmik Thakkar
> > <Dharmik.Thakkar@arm.com>; jerinjacobk@gmail.com;
> > hemant.agrawal@nxp.com; Ajit Khaparde (ajit.khaparde@broadcom.com)
> > <ajit.khaparde@broadcom.com>; ferruh.yigit@intel.com;
> > aconole@redhat.com
> > Cc: dev@dpdk.org; nd <nd@arm.com>; nd <nd@arm.com>; nd
> <nd@arm.com>
> > Subject: RE: [PATCH v8 09/14] ci: switch to generic Arm builds
> >
> >
> > > -----Original Message-----
> > > From: Juraj Linkeš <juraj.linkes@pantheon.tech>
> > > Sent: Wednesday, November 11, 2020 7:46 PM
> > > To: Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>;
> > > bruce.richardson@intel.com; Ruifeng Wang <Ruifeng.Wang@arm.com>;
> > > Phil Yang <Phil.Yang@arm.com>; vcchunga@amazon.com; Dharmik
> Thakkar
> > > <Dharmik.Thakkar@arm.com>; jerinjacobk@gmail.com;
> > > hemant.agrawal@nxp.com; Ajit Khaparde
> (ajit.khaparde@broadcom.com)
> > > <ajit.khaparde@broadcom.com>; ferruh.yigit@intel.com;
> > > aconole@redhat.com
> > > Cc: dev@dpdk.org; nd <nd@arm.com>; nd <nd@arm.com>
> > > Subject: RE: [PATCH v8 09/14] ci: switch to generic Arm builds
> > >
> > >
> > >
> > > > -----Original Message-----
> > > > From: Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>
> > > > Sent: Sunday, November 8, 2020 3:43 PM
> > > > To: Juraj Linkeš <juraj.linkes@pantheon.tech>;
> > > > bruce.richardson@intel.com; Ruifeng Wang <Ruifeng.Wang@arm.com>;
> > > Phil
> > > > Yang <Phil.Yang@arm.com>; vcchunga@amazon.com; Dharmik Thakkar
> > > > <Dharmik.Thakkar@arm.com>; jerinjacobk@gmail.com;
> > > > hemant.agrawal@nxp.com; Ajit Khaparde
> > > > (ajit.khaparde@broadcom.com) <ajit.khaparde@broadcom.com>;
> > > > ferruh.yigit@intel.com; aconole@redhat.com
> > > > Cc: dev@dpdk.org; nd <nd@arm.com>; Honnappa Nagarahalli
> > > > <Honnappa.Nagarahalli@arm.com>; nd <nd@arm.com>
> > > > Subject: RE: [PATCH v8 09/14] ci: switch to generic Arm builds
> > > >
> > > > <snip>
> > > >
> > > > >
> > > > > Switch to generic build on arm Travis machines to avoid
> > > > > differences in build configuration caused by different Arm hardware.
> > > > >
> > > > > Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
> > > > > ---
> > > > > .ci/linux-build.sh | 4 ++++
> > > > > 1 file changed, 4 insertions(+)
> > > > >
> > > > > diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh index
> > > > > d079801d7..7fe0fcfd8
> > > > > 100755
> > > > > --- a/.ci/linux-build.sh
> > > > > +++ b/.ci/linux-build.sh
> > > > > @@ -33,6 +33,10 @@ if [ "$AARCH64" = "1" ]; then
> > > > > OPTS="$OPTS --cross-file config/arm/arm64_armv8_linux_gcc"
> > > > > fi
> > > > >
> > > > > +if [ "$(uname -m)" = "aarch64" ]; then
> > > > > + OPTS="$OPTS -Dmachine=generic"
> > > > > +fi
> > > > > +
> > > > I do not think we should change it by default. We would need to
> > > > test generic builds as well as the SoC specific build.
> > > >
> > >
> > > I'll drop the patch. Testing without it revealed a failure in clang
> > > Graviton2 build (only in that one build, other build are working fine):
> > > ../lib/librte_eal/arm/include/rte_atomic_64.h:76:39: error:
> > > instruction
> > > requires: lse
> > >
> > > Here's the build with full log: https://travis-
> > > ci.com/github/jlinkes/dpdk/jobs/433176503
> > >
> > > I think we need to add a commit that fixes the failure but I don't
> > > know how to fix it.
> >
> > Can you try '-mcpu=native' instead of '-march=native -mtune=native'
> > for native build?
> > Clang doesn't support '-march=native'.
> > Reference can be found here:
> > https://community.arm.com/developer/tools-software/tools/b/tools-
> softw
> > are-
> > ides-blog/posts/compiler-flags-across-architectures-march-mtune-and-mc
> > pu
> > >
>
> Unfortunately, it did not help:
> Compiler for C supports arguments -mcpu=native: YES
> Message: Using machine args: ['-mcpu=native'] ...
> ../lib/librte_eal/arm/include/rte_atomic_64.h:76:39: error: instruction
> requires: lse
>
> Full log here: https://travis-ci.com/github/jlinkes/dpdk/jobs/433414180
>
I created a patch to fix this issue:
http://patches.dpdk.org/patch/84054/
It fixes build when using native detection on N1 with Clang < version 11.
> > > >
> > > > > if [ "$BUILD_DOCS" = "1" ]; then
> > > > > OPTS="$OPTS -Denable_docs=true"
> > > > > fi
> > > > > --
> > > > > 2.20.1
> -----Original Message-----
> From: Ruifeng Wang <Ruifeng.Wang@arm.com>
> Sent: Thursday, November 12, 2020 11:37 AM
> To: Juraj Linkeš <juraj.linkes@pantheon.tech>; Honnappa Nagarahalli
> <Honnappa.Nagarahalli@arm.com>; bruce.richardson@intel.com; Phil Yang
> <Phil.Yang@arm.com>; vcchunga@amazon.com; Dharmik Thakkar
> <Dharmik.Thakkar@arm.com>; jerinjacobk@gmail.com;
> hemant.agrawal@nxp.com; Ajit Khaparde (ajit.khaparde@broadcom.com)
> <ajit.khaparde@broadcom.com>; ferruh.yigit@intel.com; aconole@redhat.com
> Cc: dev@dpdk.org; nd <nd@arm.com>; nd <nd@arm.com>; nd <nd@arm.com>;
> nd <nd@arm.com>
> Subject: RE: [PATCH v8 09/14] ci: switch to generic Arm builds
>
>
> > -----Original Message-----
> > From: Juraj Linkeš <juraj.linkes@pantheon.tech>
> > Sent: Thursday, November 12, 2020 12:19 AM
> > To: Ruifeng Wang <Ruifeng.Wang@arm.com>; Honnappa Nagarahalli
> > <Honnappa.Nagarahalli@arm.com>; bruce.richardson@intel.com; Phil Yang
> > <Phil.Yang@arm.com>; vcchunga@amazon.com; Dharmik Thakkar
> > <Dharmik.Thakkar@arm.com>; jerinjacobk@gmail.com;
> > hemant.agrawal@nxp.com; Ajit Khaparde (ajit.khaparde@broadcom.com)
> > <ajit.khaparde@broadcom.com>; ferruh.yigit@intel.com;
> > aconole@redhat.com
> > Cc: dev@dpdk.org; nd <nd@arm.com>; nd <nd@arm.com>; nd
> <nd@arm.com>
> > Subject: RE: [PATCH v8 09/14] ci: switch to generic Arm builds
> >
> >
> >
> > > -----Original Message-----
> > > From: Ruifeng Wang <Ruifeng.Wang@arm.com>
> > > Sent: Wednesday, November 11, 2020 3:52 PM
> > > To: Juraj Linkeš <juraj.linkes@pantheon.tech>; Honnappa Nagarahalli
> > > <Honnappa.Nagarahalli@arm.com>; bruce.richardson@intel.com; Phil
> > > Yang <Phil.Yang@arm.com>; vcchunga@amazon.com; Dharmik Thakkar
> > > <Dharmik.Thakkar@arm.com>; jerinjacobk@gmail.com;
> > > hemant.agrawal@nxp.com; Ajit Khaparde (ajit.khaparde@broadcom.com)
> > > <ajit.khaparde@broadcom.com>; ferruh.yigit@intel.com;
> > > aconole@redhat.com
> > > Cc: dev@dpdk.org; nd <nd@arm.com>; nd <nd@arm.com>; nd
> > <nd@arm.com>
> > > Subject: RE: [PATCH v8 09/14] ci: switch to generic Arm builds
> > >
> > >
> > > > -----Original Message-----
> > > > From: Juraj Linkeš <juraj.linkes@pantheon.tech>
> > > > Sent: Wednesday, November 11, 2020 7:46 PM
> > > > To: Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>;
> > > > bruce.richardson@intel.com; Ruifeng Wang <Ruifeng.Wang@arm.com>;
> > > > Phil Yang <Phil.Yang@arm.com>; vcchunga@amazon.com; Dharmik
> > Thakkar
> > > > <Dharmik.Thakkar@arm.com>; jerinjacobk@gmail.com;
> > > > hemant.agrawal@nxp.com; Ajit Khaparde
> > (ajit.khaparde@broadcom.com)
> > > > <ajit.khaparde@broadcom.com>; ferruh.yigit@intel.com;
> > > > aconole@redhat.com
> > > > Cc: dev@dpdk.org; nd <nd@arm.com>; nd <nd@arm.com>
> > > > Subject: RE: [PATCH v8 09/14] ci: switch to generic Arm builds
> > > >
> > > >
> > > >
> > > > > -----Original Message-----
> > > > > From: Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>
> > > > > Sent: Sunday, November 8, 2020 3:43 PM
> > > > > To: Juraj Linkeš <juraj.linkes@pantheon.tech>;
> > > > > bruce.richardson@intel.com; Ruifeng Wang <Ruifeng.Wang@arm.com>;
> > > > Phil
> > > > > Yang <Phil.Yang@arm.com>; vcchunga@amazon.com; Dharmik Thakkar
> > > > > <Dharmik.Thakkar@arm.com>; jerinjacobk@gmail.com;
> > > > > hemant.agrawal@nxp.com; Ajit Khaparde
> > > > > (ajit.khaparde@broadcom.com) <ajit.khaparde@broadcom.com>;
> > > > > ferruh.yigit@intel.com; aconole@redhat.com
> > > > > Cc: dev@dpdk.org; nd <nd@arm.com>; Honnappa Nagarahalli
> > > > > <Honnappa.Nagarahalli@arm.com>; nd <nd@arm.com>
> > > > > Subject: RE: [PATCH v8 09/14] ci: switch to generic Arm builds
> > > > >
> > > > > <snip>
> > > > >
> > > > > >
> > > > > > Switch to generic build on arm Travis machines to avoid
> > > > > > differences in build configuration caused by different Arm hardware.
> > > > > >
> > > > > > Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
> > > > > > ---
> > > > > > .ci/linux-build.sh | 4 ++++
> > > > > > 1 file changed, 4 insertions(+)
> > > > > >
> > > > > > diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh index
> > > > > > d079801d7..7fe0fcfd8
> > > > > > 100755
> > > > > > --- a/.ci/linux-build.sh
> > > > > > +++ b/.ci/linux-build.sh
> > > > > > @@ -33,6 +33,10 @@ if [ "$AARCH64" = "1" ]; then
> > > > > > OPTS="$OPTS --cross-file config/arm/arm64_armv8_linux_gcc"
> > > > > > fi
> > > > > >
> > > > > > +if [ "$(uname -m)" = "aarch64" ]; then
> > > > > > + OPTS="$OPTS -Dmachine=generic"
> > > > > > +fi
> > > > > > +
> > > > > I do not think we should change it by default. We would need to
> > > > > test generic builds as well as the SoC specific build.
> > > > >
> > > >
> > > > I'll drop the patch. Testing without it revealed a failure in
> > > > clang
> > > > Graviton2 build (only in that one build, other build are working fine):
> > > > ../lib/librte_eal/arm/include/rte_atomic_64.h:76:39: error:
> > > > instruction
> > > > requires: lse
> > > >
> > > > Here's the build with full log: https://travis-
> > > > ci.com/github/jlinkes/dpdk/jobs/433176503
> > > >
> > > > I think we need to add a commit that fixes the failure but I don't
> > > > know how to fix it.
> > >
> > > Can you try '-mcpu=native' instead of '-march=native -mtune=native'
> > > for native build?
> > > Clang doesn't support '-march=native'.
> > > Reference can be found here:
> > > https://community.arm.com/developer/tools-software/tools/b/tools-
> > softw
> > > are-
> > > ides-blog/posts/compiler-flags-across-architectures-march-mtune-and-
> > > mc
> > > pu
> > > >
> >
> > Unfortunately, it did not help:
> > Compiler for C supports arguments -mcpu=native: YES
> > Message: Using machine args: ['-mcpu=native'] ...
> > ../lib/librte_eal/arm/include/rte_atomic_64.h:76:39: error:
> > instruction
> > requires: lse
> >
> > Full log here:
> > https://travis-ci.com/github/jlinkes/dpdk/jobs/433414180
> >
> I created a patch to fix this issue:
> http://patches.dpdk.org/patch/84054/
> It fixes build when using native detection on N1 with Clang < version 11.
Thanks for fixing the issue, Ruifeng. Should I add it to this patch series?
> > > > >
> > > > > > if [ "$BUILD_DOCS" = "1" ]; then
> > > > > > OPTS="$OPTS -Denable_docs=true"
> > > > > > fi
> > > > > > --
> > > > > > 2.20.1
@@ -33,6 +33,10 @@ if [ "$AARCH64" = "1" ]; then
OPTS="$OPTS --cross-file config/arm/arm64_armv8_linux_gcc"
fi
+if [ "$(uname -m)" = "aarch64" ]; then
+ OPTS="$OPTS -Dmachine=generic"
+fi
+
if [ "$BUILD_DOCS" = "1" ]; then
OPTS="$OPTS -Denable_docs=true"
fi