DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] meson build fail for i40e
@ 2018-05-03 13:29 Shreyansh Jain
  2018-05-03 15:49 ` Bruce Richardson
  0 siblings, 1 reply; 3+ messages in thread
From: Shreyansh Jain @ 2018-05-03 13:29 UTC (permalink / raw)
  To: Bruce Richardson, Beilei Xing; +Cc: dev

Bruce, Beilei,

Can you help me here?

Build targets in project: 263
Found ninja-1.8.2 at /usr/bin/ninja
[585/940] Compiling C object 
'drivers/net/i40e/i40e_avx2_lib@sta/i40e_rxtx_vec_avx2.c.o'.
FAILED: drivers/net/i40e/i40e_avx2_lib@sta/i40e_rxtx_vec_avx2.c.o
ccache cc  -Idrivers/net/i40e/i40e_avx2_lib@sta -Idrivers/net/i40e 
-I../drivers/net/i40e -Ilib/librte_ethdev -I../lib/librte_ethdev 
-Iconfig -I../config -I. -I../ -Ilib/librte_eal/common/include/arch/x86 
-I../lib/librte_eal/common/include/arch/x86 
-Ilib/librte_eal/common/include -I../lib/librte_eal/common/include 
-Ilib/librte_eal/common -I../lib/librte_eal/common 
-Ilib/librte_eal/linuxapp/eal/../../../librte_compat 
-I../lib/librte_eal/linuxapp/eal/../../../librte_compat 
-I../lib/librte_eal/linuxapp/eal/include -Ilib/librte_eal 
-I../lib/librte_eal -Ilib/librte_compat -I../lib/librte_compat 
-Ilib/librte_net -I../lib/librte_net -Ilib/librte_mbuf 
-I../lib/librte_mbuf -Ilib/librte_mempool -I../lib/librte_mempool 
-Ilib/librte_ring -I../lib/librte_ring -Ilib/librte_kvargs 
-I../lib/librte_kvargs -Ilib/librte_hash -I../lib/librte_hash 
-fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall 
-Winvalid-pch -O3 -include rte_config.h -Wsign-compare -Wcast-qual 
-Wno-address-of-packed-member -Wno-format-truncation -fPIC -mavx2 -MMD 
-MQ 'drivers/net/i40e/i40e_avx2_lib@sta/i40e_rxtx_vec_avx2.c.o' -MF 
'drivers/net/i40e/i40e_avx2_lib@sta/i40e_rxtx_vec_avx2.c.o.d' -o 
'drivers/net/i40e/i40e_avx2_lib@sta/i40e_rxtx_vec_avx2.c.o' -c 
../drivers/net/i40e/i40e_rxtx_vec_avx2.c
In file included from ../drivers/net/i40e/i40e_rxtx_vec_avx2.c:40:0:
../drivers/net/i40e/i40e_ethdev.h:888:42: error: 
‘I40E_PFQF_HKEY_MAX_INDEX’ undeclared here (not in a function); did you 
mean ‘I40E_VFQF_HKEY_MAX_INDEX’?
   uint8_t key[(I40E_VFQF_HKEY_MAX_INDEX > I40E_PFQF_HKEY_MAX_INDEX ?
                                           ^~~~~~~~~~~~~~~~~~~~~~~~
                                           I40E_VFQF_HKEY_MAX_INDEX
cc1: warning: unrecognized command line option 
‘-Wno-address-of-packed-member’
[590/940] Compiling C object 
'drivers/net/sfc/base/sfc_base@sta/efx_filter.c.o'.
ninja: build stopped: subcommand failed.

--

This is the ninja configuration:

--->8---
The Meson build system
Version: 0.44.0
Source dir: /home/shreyansh/build/DPDK/03_dpdk
Build dir: /home/shreyansh/build/DPDK/03_dpdk/generic_build
Build type: native build
Project name: DPDK
Native C compiler: ccache cc (gcc 7.3.0)
Build machine cpu family: x86_64
Build machine cpu: x86_64
Library numa found: YES
Has header "numaif.h": YES
Library bsd found: NO
--->8---

And I am pretty sure it was appearing on gcc 7.2 as well.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] meson build fail for i40e
  2018-05-03 13:29 [dpdk-dev] meson build fail for i40e Shreyansh Jain
@ 2018-05-03 15:49 ` Bruce Richardson
  2018-05-05 18:12   ` Shreyansh Jain
  0 siblings, 1 reply; 3+ messages in thread
From: Bruce Richardson @ 2018-05-03 15:49 UTC (permalink / raw)
  To: Shreyansh Jain; +Cc: Beilei Xing, dev

On Thu, May 03, 2018 at 06:59:48PM +0530, Shreyansh Jain wrote:
> Bruce, Beilei,
> 
> Can you help me here?
> 
> Build targets in project: 263
> Found ninja-1.8.2 at /usr/bin/ninja
> [585/940] Compiling C object
> 'drivers/net/i40e/i40e_avx2_lib@sta/i40e_rxtx_vec_avx2.c.o'.
> FAILED: drivers/net/i40e/i40e_avx2_lib@sta/i40e_rxtx_vec_avx2.c.o
> ccache cc  -Idrivers/net/i40e/i40e_avx2_lib@sta -Idrivers/net/i40e
> -I../drivers/net/i40e -Ilib/librte_ethdev -I../lib/librte_ethdev -Iconfig
> -I../config -I. -I../ -Ilib/librte_eal/common/include/arch/x86
> -I../lib/librte_eal/common/include/arch/x86 -Ilib/librte_eal/common/include
> -I../lib/librte_eal/common/include -Ilib/librte_eal/common
> -I../lib/librte_eal/common
> -Ilib/librte_eal/linuxapp/eal/../../../librte_compat
> -I../lib/librte_eal/linuxapp/eal/../../../librte_compat
> -I../lib/librte_eal/linuxapp/eal/include -Ilib/librte_eal
> -I../lib/librte_eal -Ilib/librte_compat -I../lib/librte_compat
> -Ilib/librte_net -I../lib/librte_net -Ilib/librte_mbuf -I../lib/librte_mbuf
> -Ilib/librte_mempool -I../lib/librte_mempool -Ilib/librte_ring
> -I../lib/librte_ring -Ilib/librte_kvargs -I../lib/librte_kvargs
> -Ilib/librte_hash -I../lib/librte_hash -fdiagnostics-color=always -pipe
> -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O3 -include rte_config.h
> -Wsign-compare -Wcast-qual -Wno-address-of-packed-member
> -Wno-format-truncation -fPIC -mavx2 -MMD -MQ
> 'drivers/net/i40e/i40e_avx2_lib@sta/i40e_rxtx_vec_avx2.c.o' -MF
> 'drivers/net/i40e/i40e_avx2_lib@sta/i40e_rxtx_vec_avx2.c.o.d' -o
> 'drivers/net/i40e/i40e_avx2_lib@sta/i40e_rxtx_vec_avx2.c.o' -c
> ../drivers/net/i40e/i40e_rxtx_vec_avx2.c
> In file included from ../drivers/net/i40e/i40e_rxtx_vec_avx2.c:40:0:
> ../drivers/net/i40e/i40e_ethdev.h:888:42: error: ‘I40E_PFQF_HKEY_MAX_INDEX’
> undeclared here (not in a function); did you mean
> ‘I40E_VFQF_HKEY_MAX_INDEX’?
>   uint8_t key[(I40E_VFQF_HKEY_MAX_INDEX > I40E_PFQF_HKEY_MAX_INDEX ?
>                                           ^~~~~~~~~~~~~~~~~~~~~~~~
>                                           I40E_VFQF_HKEY_MAX_INDEX
> cc1: warning: unrecognized command line option
> ‘-Wno-address-of-packed-member’
> [590/940] Compiling C object
> 'drivers/net/sfc/base/sfc_base@sta/efx_filter.c.o'.
> ninja: build stopped: subcommand failed.
> 
> --
> 
> This is the ninja configuration:
> 
> --->8---
> The Meson build system
> Version: 0.44.0
> Source dir: /home/shreyansh/build/DPDK/03_dpdk
> Build dir: /home/shreyansh/build/DPDK/03_dpdk/generic_build
> Build type: native build
> Project name: DPDK
> Native C compiler: ccache cc (gcc 7.3.0)
> Build machine cpu family: x86_64
> Build machine cpu: x86_64
> Library numa found: YES
> Has header "numaif.h": YES
> Library bsd found: NO
> --->8---
> 
> And I am pretty sure it was appearing on gcc 7.2 as well.

Yes, the error is due to missing cflags when compiling the avx2 code on a
non-AVX2 platform. The branch for doing an independent AVX2 static library
is missing proper cflags and include directory references. The below patch
should fix things. If you can confirm it fixes the issue, I'll upstream it
as a proper patch.

Thanks for reporting,
/Bruce

diff --git a/drivers/net/i40e/meson.build b/drivers/net/i40e/meson.build
index f2129df07..d783f3626 100644
--- a/drivers/net/i40e/meson.build
+++ b/drivers/net/i40e/meson.build
@@ -25,6 +25,7 @@ sources = files(
        )

 deps += ['hash']
+includes += include_directories('base')

 if arch_subdir == 'x86'
        dpdk_conf.set('RTE_LIBRTE_I40E_INC_VECTOR', 1)
@@ -40,11 +41,10 @@ if arch_subdir == 'x86'
                                'i40e_rxtx_vec_avx2.c',
                                dependencies: [static_rte_ethdev,
                                        static_rte_kvargs, static_rte_hash],
-                               c_args: '-mavx2')
+                               include_directories: includes,
+                               c_args: [cflags, '-mavx2'])
                objs += i40e_avx2_lib.extract_objects('i40e_rxtx_vec_avx2.c')
        endif
 endif

-includes += include_directories('base')
-
 install_headers('rte_pmd_i40e.h')

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] meson build fail for i40e
  2018-05-03 15:49 ` Bruce Richardson
@ 2018-05-05 18:12   ` Shreyansh Jain
  0 siblings, 0 replies; 3+ messages in thread
From: Shreyansh Jain @ 2018-05-05 18:12 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Beilei Xing, dev

> -----Original Message-----
> From: Bruce Richardson [mailto:bruce.richardson@intel.com]
> Sent: Thursday, May 3, 2018 9:19 PM
> To: Shreyansh Jain <shreyansh.jain@nxp.com>
> Cc: Beilei Xing <beilei.xing@intel.com>; dev@dpdk.org
> Subject: Re: meson build fail for i40e
> 
> On Thu, May 03, 2018 at 06:59:48PM +0530, Shreyansh Jain wrote:
> > Bruce, Beilei,
> >
> > Can you help me here?
> >
> > Build targets in project: 263
> > Found ninja-1.8.2 at /usr/bin/ninja
> > [585/940] Compiling C object
> > 'drivers/net/i40e/i40e_avx2_lib@sta/i40e_rxtx_vec_avx2.c.o'.
> > FAILED: drivers/net/i40e/i40e_avx2_lib@sta/i40e_rxtx_vec_avx2.c.o
> > ccache cc  -Idrivers/net/i40e/i40e_avx2_lib@sta -Idrivers/net/i40e
> > -I../drivers/net/i40e -Ilib/librte_ethdev -I../lib/librte_ethdev -
> Iconfig
> > -I../config -I. -I../ -Ilib/librte_eal/common/include/arch/x86
> > -I../lib/librte_eal/common/include/arch/x86 -
> Ilib/librte_eal/common/include
> > -I../lib/librte_eal/common/include -Ilib/librte_eal/common
> > -I../lib/librte_eal/common
> > -Ilib/librte_eal/linuxapp/eal/../../../librte_compat
> > -I../lib/librte_eal/linuxapp/eal/../../../librte_compat
> > -I../lib/librte_eal/linuxapp/eal/include -Ilib/librte_eal
> > -I../lib/librte_eal -Ilib/librte_compat -I../lib/librte_compat
> > -Ilib/librte_net -I../lib/librte_net -Ilib/librte_mbuf -
> I../lib/librte_mbuf
> > -Ilib/librte_mempool -I../lib/librte_mempool -Ilib/librte_ring
> > -I../lib/librte_ring -Ilib/librte_kvargs -I../lib/librte_kvargs
> > -Ilib/librte_hash -I../lib/librte_hash -fdiagnostics-color=always -
> pipe
> > -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O3 -include rte_config.h
> > -Wsign-compare -Wcast-qual -Wno-address-of-packed-member
> > -Wno-format-truncation -fPIC -mavx2 -MMD -MQ
> > 'drivers/net/i40e/i40e_avx2_lib@sta/i40e_rxtx_vec_avx2.c.o' -MF
> > 'drivers/net/i40e/i40e_avx2_lib@sta/i40e_rxtx_vec_avx2.c.o.d' -o
> > 'drivers/net/i40e/i40e_avx2_lib@sta/i40e_rxtx_vec_avx2.c.o' -c
> > ../drivers/net/i40e/i40e_rxtx_vec_avx2.c
> > In file included from ../drivers/net/i40e/i40e_rxtx_vec_avx2.c:40:0:
> > ../drivers/net/i40e/i40e_ethdev.h:888:42: error:
> ‘I40E_PFQF_HKEY_MAX_INDEX’
> > undeclared here (not in a function); did you mean
> > ‘I40E_VFQF_HKEY_MAX_INDEX’?
> >   uint8_t key[(I40E_VFQF_HKEY_MAX_INDEX > I40E_PFQF_HKEY_MAX_INDEX ?
> >                                           ^~~~~~~~~~~~~~~~~~~~~~~~
> >                                           I40E_VFQF_HKEY_MAX_INDEX
> > cc1: warning: unrecognized command line option
> > ‘-Wno-address-of-packed-member’
> > [590/940] Compiling C object
> > 'drivers/net/sfc/base/sfc_base@sta/efx_filter.c.o'.
> > ninja: build stopped: subcommand failed.
> >
> > --
> >
> > This is the ninja configuration:
> >
> > --->8---
> > The Meson build system
> > Version: 0.44.0
> > Source dir: /home/shreyansh/build/DPDK/03_dpdk
> > Build dir: /home/shreyansh/build/DPDK/03_dpdk/generic_build
> > Build type: native build
> > Project name: DPDK
> > Native C compiler: ccache cc (gcc 7.3.0)
> > Build machine cpu family: x86_64
> > Build machine cpu: x86_64
> > Library numa found: YES
> > Has header "numaif.h": YES
> > Library bsd found: NO
> > --->8---
> >
> > And I am pretty sure it was appearing on gcc 7.2 as well.
> 
> Yes, the error is due to missing cflags when compiling the avx2 code on
> a
> non-AVX2 platform. The branch for doing an independent AVX2 static
> library
> is missing proper cflags and include directory references. The below
> patch
> should fix things. If you can confirm it fixes the issue, I'll upstream
> it
> as a proper patch.
> 
> Thanks for reporting,
> /Bruce
> 
> diff --git a/drivers/net/i40e/meson.build
> b/drivers/net/i40e/meson.build
> index f2129df07..d783f3626 100644
> --- a/drivers/net/i40e/meson.build
> +++ b/drivers/net/i40e/meson.build
> @@ -25,6 +25,7 @@ sources = files(
>         )
> 
>  deps += ['hash']
> +includes += include_directories('base')
> 
>  if arch_subdir == 'x86'
>         dpdk_conf.set('RTE_LIBRTE_I40E_INC_VECTOR', 1)
> @@ -40,11 +41,10 @@ if arch_subdir == 'x86'
>                                 'i40e_rxtx_vec_avx2.c',
>                                 dependencies: [static_rte_ethdev,
>                                         static_rte_kvargs,
> static_rte_hash],
> -                               c_args: '-mavx2')
> +                               include_directories: includes,
> +                               c_args: [cflags, '-mavx2'])
>                 objs +=
> i40e_avx2_lib.extract_objects('i40e_rxtx_vec_avx2.c')
>         endif
>  endif
> 
> -includes += include_directories('base')
> -
>  install_headers('rte_pmd_i40e.h')

Sorry, I had completely forgotten about this.
Yes, this patch works fine for me. Thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-05-05 18:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-03 13:29 [dpdk-dev] meson build fail for i40e Shreyansh Jain
2018-05-03 15:49 ` Bruce Richardson
2018-05-05 18:12   ` Shreyansh Jain

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).