[Pkg-dpdk-devel] 18.08 build failure on ppc64el

Christian Ehrhardt christian.ehrhardt at canonical.com
Tue Aug 21 15:14:39 BST 2018


Actually I'm moving this to the upstream list.

The following silly fix would resolve it
$ git diff
diff --git a/drivers/net/mlx5/mlx5_nl.c b/drivers/net/mlx5/mlx5_nl.c
index d61826aea..2cc8f49c5 100644
--- a/drivers/net/mlx5/mlx5_nl.c
+++ b/drivers/net/mlx5/mlx5_nl.c
@@ -834,8 +834,8 @@ mlx5_nl_switch_info_cb(struct nlmsghdr *nh, void *arg)
               .switch_id = 0,
       };
       size_t off = NLMSG_LENGTH(sizeof(struct ifinfomsg));
-       bool port_name_set = false;
-       bool switch_id_set = false;
+       int port_name_set = 0;
+       int switch_id_set = 0;

       if (nh->nlmsg_type != RTM_NEWLINK)
               goto error;
@@ -854,7 +854,7 @@ mlx5_nl_switch_info_cb(struct nlmsghdr *nh, void *arg)
                       if (errno ||
                           (size_t)(end - (char *)payload) !=
strlen(payload))
                               goto error;
-                       port_name_set = true;
+                       port_name_set = 1;
                       break;
               case IFLA_PHYS_SWITCH_ID:
                       info.switch_id = 0;
@@ -862,7 +862,7 @@ mlx5_nl_switch_info_cb(struct nlmsghdr *nh, void *arg)
                               info.switch_id <<= 8;
                               info.switch_id |= ((uint8_t *)payload)[i];
                       }
-                       switch_id_set = true;
+                       switch_id_set = 1;
                       break;
               }
               off += RTA_ALIGN(ra->rta_len);


On Tue, Aug 21, 2018 at 4:10 PM Christian Ehrhardt <
christian.ehrhardt at canonical.com> wrote:

> Adding Chao and Gowrishankar for PPC experience.
>
> ---------- Forwarded message ---------
> From: Christian Ehrhardt <christian.ehrhardt at canonical.com>
> Date: Tue, Aug 21, 2018 at 1:29 PM
> Subject: Re: [Pkg-dpdk-devel] 18.08 build failure on ppc64el
> To: Luca Boccassi <bluca at debian.org>, Thomas Monjalon <thomas at monjalon.net
> >
> Cc: <pkg-dpdk-devel at lists.alioth.debian.org>
>
>
> Being MLX code I'm setting Thomas on CC as well, maybe he knows already.
>
> Recreating a test case with sane headers - that is:
>
> /*
> *#include<linux/if_link.h>
> *#include<linux/netlink.h>
> *#include<linux/rtnetlink.h>
> *#include<net/if.h>
> *#include<rdma/rdma_netlink.h>
> *#include<rte_errno.h>
> *#include"mlx5.h"
> *#include"mlx5_utils.h"
> */
>
> #include <stdbool.h>
> #include <stdint.h>
> #include <stdio.h>
>
> Eventually results in:
> # 25 "test.c" 3 4
>  _Bool
> # 25 "test.c"
>       port_name_set =
>
>
> But the error is listing that as type "‘__vector __bool int"
>
> I wonder if any of the more crazy headers redefines bool?!
>
> Enabled these on top, still the same
> #include <linux/if_link.h>
> #include <linux/netlink.h>
> #include <linux/rtnetlink.h>
> #include <net/if.h>
> #include <rdma/rdma_netlink.h>
>
> Finally pulled in the MLX/RTE things
>
> MLX from the 18.08 package and headers from 17.11.3 is too much of a
> Frankenbuild suffering too much.
> I'll need the real thing building locally on ppc64el ...
>
>
> I see it defined as:
>  __attribute__((altivec(bool__))) unsigned port_name_set =
>
> after
> cd ./debian/build/static-root/build/drivers/net/mlx5/
> gcc -Wp,-MD,./.mlx5_nl.o.d.tmp -Wdate-time -D_FORTIFY_SOURCE=2 -m64
> -pthread   -DRTE_MACHINE_CPUFLAG_PPC64 -DRTE_MAC
> HINE_CPUFLAG_ALTIVEC -DRTE_MACHINE_CPUFLAG_VSX
>  -I/home/ubuntu/deb_dpdk/debian/build/static-root/include -include
> /home/ubuntu/deb_dpdk/debian/build/static-root/include/rte_config.h -O3 -std
> =c11 -Wall -Wextra -g -I. -D_BSD_SOURCE -D_DEFAULT_SOURCE
> -D_XOPEN_SOURCE=600 -W -Wall -Wstrict-prototypes -Wmissing-prototypes
> -Wmissing-declarations -Wold-style-definition -Wpointer-arith
> -Wcast-align -Wnested-externs -Wcast-qual -Wformat-nonliteral
> -Wformat-security -Wundef -Wwrite-strings -Wdeprecated
> -Wimplicit-fallthrough=2 -Wno-format-truncation -Wno-strict-prototypes -W
> no-error=cast-qual -DALLOW_EXPERIMENTAL_API -DNDEBUG -UPEDANTIC   -g -g -o
> mlx5_nl.o -c /home/ubuntu/deb_dpdk/drivers/net/mlx5/mlx5_nl.c
>
> Which could be the source of the mismatch.
>
> More after lunch ...
>
>
> P.S. Yes I know I'm supposed to tag 18.05.1-RC , just not getting to it
> yet :-/
>
>
>
> On Fri, Aug 17, 2018 at 8:36 PM Christian Ehrhardt <
> christian.ehrhardt at canonical.com> wrote:
>
>> I've hit the same in my builds right when I hit EOD.
>> Lets coordinate on Monday if it is harder than expected.
>>
>> On Fri, Aug 17, 2018 at 8:12 PM Luca Boccassi <bluca at debian.org> wrote:
>>
>>> I'll have a look next week, but here are the link and the error:
>>>
>>>
>>> https://buildd.debian.org/status/fetch.php?pkg=dpdk&arch=ppc64el&ver=18.08-1&stamp=1534520196&raw=0
>>>
>>> /<<PKGBUILDDIR>>/drivers/net/mlx5/mlx5_nl.c: In function
>>> 'mlx5_nl_switch_info_cb':
>>> /<<PKGBUILDDIR>>/drivers/net/mlx5/mlx5_nl.c:837:23: error: incompatible
>>> types when initializing type '__vector __bool int' {aka '__vector(4) __bool
>>> int'} using type 'int'
>>>   bool port_name_set = false;
>>>                        ^~~~~
>>> /<<PKGBUILDDIR>>/drivers/net/mlx5/mlx5_nl.c:838:23: error: incompatible
>>> types when initializing type '__vector __bool int' {aka '__vector(4) __bool
>>> int'} using type 'int'
>>>   bool switch_id_set = false;
>>>                        ^~~~~
>>> /<<PKGBUILDDIR>>/drivers/net/mlx5/mlx5_nl.c:857:18: error: incompatible
>>> types when assigning to type '__vector __bool int' {aka '__vector(4) __bool
>>> int'} from type 'int'
>>>     port_name_set = true;
>>>                   ^
>>> /<<PKGBUILDDIR>>/drivers/net/mlx5/mlx5_nl.c:865:18: error: incompatible
>>> types when assigning to type '__vector __bool int' {aka '__vector(4) __bool
>>> int'} from type 'int'
>>>     switch_id_set = true;
>>>                   ^
>>> /<<PKGBUILDDIR>>/drivers/net/mlx5/mlx5_nl.c:870:16: error: used vector
>>> type where scalar is required
>>>   info.master = switch_id_set && !port_name_set;
>>>                 ^~~~~~~~~~~~~
>>> /<<PKGBUILDDIR>>/drivers/net/mlx5/mlx5_nl.c:870:33: error: wrong type
>>> argument to unary exclamation mark
>>>   info.master = switch_id_set && !port_name_set;
>>>                                  ^
>>> /<<PKGBUILDDIR>>/drivers/net/mlx5/mlx5_nl.c:871:21: error: used vector
>>> type where scalar is required
>>>   info.representor = switch_id_set && port_name_set;
>>>
>>> --
>>> Kind regards,
>>> Luca Boccassi_______________________________________________
>>> Pkg-dpdk-devel mailing list
>>> Pkg-dpdk-devel at alioth-lists.debian.net
>>> https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-dpdk-devel
>>>
>>
>>
>> --
>> Christian Ehrhardt
>> Software Engineer, Ubuntu Server
>> Canonical Ltd
>>
>
>
> --
> Christian Ehrhardt
> Software Engineer, Ubuntu Server
> Canonical Ltd
>
>
> --
> Christian Ehrhardt
> Software Engineer, Ubuntu Server
> Canonical Ltd
>


-- 
Christian Ehrhardt
Software Engineer, Ubuntu Server
Canonical Ltd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-dpdk-devel/attachments/20180821/6430c33c/attachment-0001.html>


More information about the Pkg-dpdk-devel mailing list