________________________________________
发件人: Bruce Ashfield <[email protected]>
发送时间: 2021年4月28日 22:12
收件人: Zhang, Qiang
抄送: [email protected]
主题: Re: Help on openvswitch

[Please note: This e-mail is from an EXTERNAL e-mail address]

On Tue, Apr 27, 2021 at 11:41 PM Zhang, Qiang <[email protected]> wrote:
>
>
>
> ________________________________________
> 发件人: Bruce Ashfield <[email protected]>
> 发送时间: 2021年4月28日 10:41
> 收件人: Zhang, Qiang
> 抄送: [email protected]
> 主题: Re: Help on openvswitch
>
> [Please note: This e-mail is from an EXTERNAL e-mail address]
>
> On Tue, Apr 27, 2021 at 2:54 AM Zhang, Qiang <[email protected]> 
> wrote:
> >
> > Hello Bruce
> >
> > when openvswitch enable DPDK, the do_configure will trigger follow error:
> >
> > checking whether dpdk is enabled... yes
> > | checking for rte_config.h... yes
> > | checking whether RTE_LIBRTE_VHOST_NUMA is declared... no
> > | checking whether RTE_EAL_NUMA_AWARE_HUGEPAGES is declared... no
> > | checking whether RTE_LIBRTE_PMD_PCAP is declared... no
> > | checking whether RTE_LIBRTE_PMD_AF_XDP is declared... no
> > | checking whether RTE_LIBRTE_VHOST_NUMA is declared... (cached) no
> > | checking whether RTE_LIBRTE_MLX5_PMD is declared... no
> > | checking whether RTE_LIBRTE_MLX4_PMD is declared... no
> > | checking for library containing dlopen... -ldl
> > | checking whether linking with dpdk works... no
> > | configure: error: Could not find DPDK library in default search path, 
> > update PKG_CONFIG_PATH for pkg-config to find the .pc file in non-standard 
> > location
> > | WARNING: exit code 1 from a shell command.
> >
> > I didn't find out why,  have you repeated the question?
> >
>
> >I have seen this with other packages in the past, but can't >find the
> >references to specific fixes now.
> >
> >Have you looked to see if dpdk is in fact producing a .pc file >? We
> >kind of overload package config in OE where it is a general >set of
> >options for recipes, and also the actual pkg-config >application (that
> >needs those .pc files).
> >
> >A quick check shows that openvswitch isn't inheriting the >pkgconfig
> >bbclass, which means our pkg-config-native isn't in the >dependency
> >chain.
>
> Hello Bruce
>
> The 2.15 openvswitch parameter  --with-dpdk= must be 'static' or 'shared'.   
> before  parameter --with-dpdk= be set a path.
>
>  I made the following changes
>
> --- a/recipes-networking/openvswitch/openvswitch_git.bb
> +++ b/recipes-networking/openvswitch/openvswitch_git.bb
> @@ -1,6 +1,6 @@
>  require openvswitch.inc
>
> -DEPENDS += "virtual/kernel"
> +DEPENDS += "virtual/kernel pkgconfig-native"
>
>  PACKAGE_ARCH = "${MACHINE_ARCH}"
>
> @@ -35,7 +35,7 @@ LIC_FILES_CHKSUM = 
> "file://LICENSE;md5=1ce5d23a6429dff345518758f13aaeab"
>  DPDK_INSTALL_DIR ?= "/opt/dpdk"
>
>  PACKAGECONFIG ?= "libcap-ng"
> -PACKAGECONFIG[dpdk] = 
> "--with-dpdk=${STAGING_DIR_TARGET}${DPDK_INSTALL_DIR}/share/${TARGET_ARCH}-native-linuxapp-gcc,,dpdk,dpdk"
> +PACKAGECONFIG[dpdk] = "--with-dpdk=static,,dpdk,dpdk"
>  PACKAGECONFIG[libcap-ng] = "--enable-libcapng,--disable-libcapng,libcap-ng,"
>  PACKAGECONFIG[ssl] = ",--disable-ssl,openssl,"
>
>  The following error will be generated :
>
> checking for struct tcf_t.firstuse... yes
> | checking whether dpdk is enabled... yes
> | checking for DPDK... no
> | configure: error: Package requirements (libdpdk) were not met:
> |
> | No package 'libdpdk' found
> |
> | Consider adjusting the PKG_CONFIG_PATH environment variable if you
> | installed software in a non-standard prefix.
> |
> | Alternatively, you may set the environment variables DPDK_CFLAGS
> | and DPDK_LIBS to avoid the need to call pkg-config.
>
>Let me try and summarize,
>
>DPDK has replaced a flag that used to point to the binary >with a
>static/non-static flag and is using pkg-config to locate the >binary.
>
>If the yocto dpdk package isn't producing a valid set of .pc >files
>that pkg-config is looking for, then it won't find them and >that
>doesn't help us.
>
>So we need to see if the dpdk package is producing them, >and if so,
>why aren't they in the right place.
>
>If we don't want to go that route, did you try setting the >DPDK_CFLAGS
>and DPDK_LIBS to the path to where the libraries have >been installed
>in the package sysroot ?
>

Thanks Bruce help,  this problem occurs only in openvswitch use DPDK 19.11 ,  I 
set DPDK_CFLAGS and DPDK_LIBS resolve it. 

Qiang
>Bruce

> | See the pkg-config man page for more details.
> | WARNING: exit code 1 from a shell command.
>
> Qiang
>
> >I'd start there.
> >
> >Bruce
>
> > Thanks
> > Qiang
>
>
>
> --
> - Thou shalt not follow the NULL pointer, for chaos and madness await
> thee at its end
> - "Use the force Harry" - Gandalf, Star Trek II



--
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#6482): 
https://lists.yoctoproject.org/g/meta-virtualization/message/6482
Mute This Topic: https://lists.yoctoproject.org/mt/82475746/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to