On Tue, Aug 01, 2023 at 12:42:36PM +0000, Ali Alnubani wrote: > > -----Original Message----- > > From: Bruce Richardson <bruce.richard...@intel.com> > > Sent: Tuesday, August 1, 2023 1:51 PM > > To: David Marchand <david.march...@redhat.com> > > Cc: Patrick Robb <pr...@iol.unh.edu>; Tyler Retzlaff > > <roret...@linux.microsoft.com>; dev@dpdk.org; Morten Brørup > > <m...@smartsharesystems.com>; NBU-Contact-Thomas Monjalon > > (EXTERNAL) <tho...@monjalon.net> > > Subject: Re: [PATCH v3] build: update DPDK to use C11 standard > > > > On Tue, Aug 01, 2023 at 11:39:06AM +0100, Bruce Richardson wrote: > > > On Tue, Aug 01, 2023 at 12:35:21PM +0200, David Marchand wrote: > > > > On Tue, Aug 1, 2023 at 12:19 PM Bruce Richardson > > > > <bruce.richard...@intel.com> wrote: > > > > > > > > > > On Mon, Jul 31, 2023 at 08:39:31PM -0400, Patrick Robb wrote: > > > > > > Hi Bruce, > > > > > > I see some failures for this series for our Ubuntu 20.04 > > > > > > containers. > > > <snip> > > > > > > > > > > Hi again, > > > > > > > > > > I've attempted to reproduce this on my Ubuntu 20.04 VM and failed, > > > > > everything seems to build ok. > > > > > > > > > > Looking through the logs, though, there does appear to be a > > > > > difference in > > > > > the configurations in the two cases. I suspect my Ubuntu has an > > > > > updated > > > > > verbs package compared to the image you are using. In the log of the > > failed > > > > > build, I see: > > > > > > > > > > Checking whether type "struct mlx4_wqe_lso_seg" has member > > "mss_hdr_size" with dependencies libmlx4, libibverbs: NO > > > > > Configuring mlx4_autoconf.h using configuration > > > > > > > > > > While building in my VM, I have: > > > > > > > > > > Checking whether type "struct mlx4_wqe_lso_seg" has member > > "mss_hdr_size" with dependencies libmlx4, libibverbs: YES (cached) > > > > > Configuring mlx4_autoconf.h using configuration > > > > > > > > > > So my verbs mlx4 header has got a different set of definitions to > > > > > those in > > > > > the CI machine. My Ubuntu reports as 20.04.6 with libibverbs-dev > > package > > > > > version "28.0-1ubuntu1" > > > > > > > > > > Can the CI image be updated to latest 20.04 packages? > > > > > > > > > > /Bruce > > > > > > > > > > > > > I can reproduce the issue seen at UNH, with a 20.04.6 container and > > > > the same libibverbs as you: > > > > ii libibverbs-dev:amd64 28.0-1ubuntu1 > > > > amd64 Development files for the libibverbs library > > > > > > > > So I suspect something is different in container images.. > > > > > > > > Pasting the (hopefully) relevant meson logs: > > > > > > > > Running compile: > > > > Working directory: /root/dpdk/build/meson-private/tmp0ovvvd9g > > > > Command line: ccache cc -I/usr/include/libnl3 > > > > /root/dpdk/build/meson-private/tmp0ovvvd9g/testfile.c -o > > > > /root/dpdk/build/meson-private/tmp0ovvvd9g/output.obj -pipe -c > > > > -D_FILE_OFFSET_BITS=64 -O0 -std=c11 > > > > > > > > Code: > > > > #include <infiniband/mlx4dv.h> > > > > void bar(void) { > > > > struct mlx4_wqe_lso_seg foo; > > > > foo.mss_hdr_size; > > > > > > > > }; > > > > Compiler stdout: > > > > > > > > Compiler stderr: > > > > In file included from /root/dpdk/build/meson- > > private/tmp0ovvvd9g/testfile.c:1: > > > > /usr/include/infiniband/mlx4dv.h:176:2: error: unknown type name 'off_t' > > > > 176 | off_t uar_mmap_offset; > > > > | ^~~~~ > > > > > > > > Checking whether type "struct mlx4_wqe_lso_seg" has member > > > > "mss_hdr_size" with dependencies libmlx4, libibverbs: NO > > > > > > > Thanks. I'll dig some more. > > > > I think the meson version may be the culprit here. In my meson log I don't > > see the -std=c11 flag appended to the test compilation command. > > > > Let me downgrade my meson version and see if I can reproduce. > > > > /Bruce > > Hello, > > I see two other build failures. > > On Ubuntu 20.04 with clang 10 and rdma-core v47.0 (built from source), I see > errors similar to these: > > drivers/common/mlx5/linux/mlx5_glue.h:58:6: error: redefinition of > 'mlx5_ib_uapi_flow_action_packet_reformat_type' > [..] > drivers/common/mlx5/linux/mlx5_glue.h:59:6: error: redefinition of > 'mlx5_ib_uapi_flow_table_type' > [..] > drivers/common/mlx5/linux/mlx5_glue.h:121:2: error: redefinition of > enumerator 'MLX5DV_DR_ACTION_DEST_REFORMAT' > [..] >
I believe I have a fix for these. The checks for the various structure members need the driver "cflags" passed as args to the check, as the std=c11 means that some things like off_t type are no longer defined (off_t is posix) > On Ubuntu 20.04 while cross compiling for ppc64le with > powerpc64le-linux-gnu-gcc 9.4, I see: > > [..] > lib/acl/acl_run_altivec.h:44:16: error: two or more data types in declaration > specifiers > [..] > lib/acl/acl_run_altivec.h:44:2: error: use of boolean types in AltiVec types > is invalid > [..] > error: incompatible types when assigning to type '__vector unsigned char' > {aka '__vector(16) unsigned char'} from type '__vector __bool int' {aka > '__vector(4) __bool int'} > [..] > lib/acl/acl_run_altivec.h:66:4: error: invalid parameter combination for > AltiVec intrinsic '__builtin_vec_sel' > [..] > This I still need to investigate. In the meantime, I'll do a new version to see if the Ubuntu 20.04 issues with the mlx drivers goes away with my fix. /Bruce