DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Christensen <drc@linux.vnet.ibm.com>
To: Thomas Monjalon <thomas@monjalon.net>, dev@dpdk.org
Cc: david.marchand@redhat.com, bruce.richardson@intel.com,
	dmitry.kozliuk@gmail.com
Subject: Re: [dpdk-dev] [PATCH 3/4] devtools: add ppc64 in meson build test
Date: Mon, 15 Jun 2020 14:43:34 -0700	[thread overview]
Message-ID: <9b811c9b-5b56-57a7-c939-6e5dbf888447@linux.vnet.ibm.com> (raw)
In-Reply-To: <20200614225747.3839569-4-thomas@monjalon.net>

On 6/14/20 3:57 PM, Thomas Monjalon wrote:
> diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh
> index 1d80a029aa..1cde17a2e5 100755
> --- a/devtools/test-meson-builds.sh
> +++ b/devtools/test-meson-builds.sh
> @@ -212,6 +212,11 @@ for f in $srcdir/config/arm/arm64_[bdo]*gcc ; do
>   	unset CC
>   done
> 
> +# ppc configurations
> +for f in $srcdir/config/ppc/ppc* ; do
> +	build build-$(basename $f | cut -d'-' -f-2) $f $use_shared
> +done
> +

The entire script file is poorly structured for multi-architecture 
builds.  The script fails on PPC64LE even before your changes:

------------------------------------
# shared and static linked builds with gcc and clang
for c in gcc clang ; do
        command -v $c >/dev/null 2>&1 || continue
        for s in static shared ; do
                export CC="$CCACHE $c"
                build build-$c-$s $c --default-library=$s
                unset CC
        done
done
------------------------------------

Compilation on clang is not currently supported due to build failures on 
Altivec data types for vectorization:

In file included from ../lib/librte_eal/common/eal_common_options.c:33:
In file included from ../lib/librte_eal/ppc/include/rte_memcpy.h:12:
In file included from ../lib/librte_eal/ppc/include/rte_altivec.h:10:
/usr/lib64/clang/9.0.1/include/altivec.h:55:19: error: unknown type name 
'vector'
static __inline__ vector bool char __ATTRS_o_ai
                   ^
/usr/lib64/clang/9.0.1/include/altivec.h:56:10: error: unknown type name 
'vector'
vec_perm(vector bool char __a, vector bool char __b, vector unsigned 
char __c);

and C99 atomics:

../lib/librte_eal/ppc/include/rte_atomic.h:85:9: error: implicit 
declaration of function '__atomic_exchange_2' is invalid in C99 
[-Werror,-Wimplicit-function-declaration]
         return __atomic_exchange_2(dst, val, __ATOMIC_SEQ_CST);
                ^

The script then immediately launches into an x86 build no matter what 
architecture the system is running on:

------------------------------------
default_machine='nehalem'
ok=$(cc -march=$default_machine -E - < /dev/null > /dev/null 2>&1 || 
echo false)
if [ "$ok" = "false" ] ; then
         default_machine='corei7'
fi
build build-x86-default cc -Dlibdir=lib -Dmachine=$default_machine 
$use_shared
------------------------------------

Which also fails on a Power system:

ninja -v -C ./build-x86-default
ninja: Entering directory `./build-x86-default'
[1/2265] cc -Ilib/76b5a35@@rte_kvargs@sta -Ilib -I../lib -I. -I../ 
-Iconfig -I../config -Ilib/librte_eal/include 
-I../lib/librte_eal/include -Ilib/librte_eal/linux/include 
-I../lib/librte_eal/linux/include -Ilib/librte_eal/ppc/include 
-I../lib/librte_eal/ppc/include -Ilib/librte_kvargs 
-I../lib/librte_kvargs -fdiagnostics-color=always -pipe 
-D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Werror -O2 -g -include 
rte_config.h -Wextra -Wcast-qual -Wdeprecated -Wformat-nonliteral 
-Wformat-security -Wmissing-declarations -Wmissing-prototypes 
-Wnested-externs -Wold-style-definition -Wpointer-arith -Wsign-compare 
-Wstrict-prototypes -Wundef -Wwrite-strings -Wno-packed-not-aligned 
-Wno-missing-field-initializers -D_GNU_SOURCE -fPIC -mcpu=corei7 
-mtune=corei7 -DALLOW_EXPERIMENTAL_API -DALLOW_INTERNAL_API 
-Wno-format-truncation  -MD -MQ 
'lib/76b5a35@@rte_kvargs@sta/librte_kvargs_rte_kvargs.c.o' -MF 
'lib/76b5a35@@rte_kvargs@sta/librte_kvargs_rte_kvargs.c.o.d' -o 
'lib/76b5a35@@rte_kvargs@sta/librte_kvargs_rte_kvargs.c.o' -c 
../lib/librte_kvargs/rte_kvargs.c
FAILED: lib/76b5a35@@rte_kvargs@sta/librte_kvargs_rte_kvargs.c.o


I think the logic of looping through supported configs for test builds 
is the right one, but more changes are required for multi-architecture 
support in this script.  For now I'd abandon the PPC/ARM support 
entirely in this script.

Dave

  reply	other threads:[~2020-06-15 21:43 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-14 22:57 [dpdk-dev] [PATCH 0/4] add PPC and Windows to meson test Thomas Monjalon
2020-06-14 22:57 ` [dpdk-dev] [PATCH 1/4] devtools: shrink cross-compilation test definition Thomas Monjalon
2020-06-14 22:57 ` [dpdk-dev] [PATCH 2/4] devtools: allow non-standard toolchain in meson test Thomas Monjalon
2020-06-14 22:57 ` [dpdk-dev] [PATCH 3/4] devtools: add ppc64 in meson build test Thomas Monjalon
2020-06-15 21:43   ` David Christensen [this message]
2020-06-15 22:13     ` Thomas Monjalon
2020-06-16 20:35       ` David Christensen
2020-06-16 21:26         ` Thomas Monjalon
2020-06-17 21:02           ` David Christensen
2020-06-14 22:57 ` [dpdk-dev] [PATCH 4/4] devtools: add Windows cross-build test with MinGW Thomas Monjalon
2020-06-14 23:09   ` Thomas Monjalon
2020-06-15  1:05     ` Dmitry Kozlyuk
2020-06-15  7:51       ` Thomas Monjalon
2020-06-15 22:22 ` [dpdk-dev] [PATCH v2 0/4] add PPC and Windows cross-compilation to meson test Thomas Monjalon
2020-06-15 22:22   ` [dpdk-dev] [PATCH v2 1/4] devtools: shrink cross-compilation test definition Thomas Monjalon
2020-06-17 21:05     ` David Christensen
2020-06-15 22:22   ` [dpdk-dev] [PATCH v2 2/4] devtools: allow non-standard toolchain in meson test Thomas Monjalon
2020-06-17 21:06     ` David Christensen
2020-06-15 22:22   ` [dpdk-dev] [PATCH v2 3/4] devtools: add ppc64 in meson build test Thomas Monjalon
2020-06-17 21:07     ` David Christensen
2020-06-15 22:22   ` [dpdk-dev] [PATCH v2 4/4] devtools: add Windows cross-build test with MinGW Thomas Monjalon
2020-06-29 23:15   ` [dpdk-dev] [PATCH v2 0/4] add PPC and Windows cross-compilation to meson test Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9b811c9b-5b56-57a7-c939-6e5dbf888447@linux.vnet.ibm.com \
    --to=drc@linux.vnet.ibm.com \
    --cc=bruce.richardson@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=dmitry.kozliuk@gmail.com \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).