[ovs-dev] [PATCH v1] acinclude: Remove default library for DPDK.
Kevin Traynor
ktraynor at redhat.com
Tue Jan 26 18:24:15 UTC 2021
Hi Sunil,
On 20/01/2021 14:14, Sunil Pai G wrote:
> The default DPDK library used before this patch
> in case pkg-config fails to find libdpdk is only
> valid for make based DPDK builds. Hence remove them.
>
> As a consequence, now this error message [1] is thrown
> when pkg-config cannot find libdpdk instead of proceeding
> to check for a faulty pkg-config and reporting
> incorrect error message [2].
>
> Also, update the documentation to force the user to export
> PKG_CONFIG_PATH since on some systems, the default
> install path for DPDK libraries is not present in the default
> search path of pkg-config.
> Ex: for Fedora 32
> default pkg-config search path:
> /usr/lib64/pkgconfig:/usr/share/pkgconfig
>
> while by default Meson installs DPDK libraries at:
> /usr/local/lib64/pkgconfig
>
This is useful info, I think we should put something like this in the
.rst. See comment below.
> [1] Package libdpdk was not found in the pkg-config search path.
> Perhaps you should add the directory containing `libdpdk.pc'
> to the PKG_CONFIG_PATH environment variable
> Package 'libdpdk', required by 'virtual:world', not found
>
> [2] checking for DPDK... no
> checking for faulty pkg-config version... yes
> configure: error: Please upgrade pkg-config
>
> Fixes: 252e1e576443 ("dpdk: Update to use DPDK v20.11.")
Reported-by: Kevin Traynor <ktraynor at redhat.com>
> Tested-at: https://github.com/Sunil-Pai-G/ovs/actions/runs/498553105
> Signed-off-by: Sunil Pai G <sunil.pai.g at intel.com>
> ---
> Documentation/intro/install/dpdk.rst | 5 ++---
> acinclude.m4 | 8 ++------
> 2 files changed, 4 insertions(+), 9 deletions(-)
>
> diff --git a/Documentation/intro/install/dpdk.rst b/Documentation/intro/install/dpdk.rst
> index a595417ce..37910ba33 100644
> --- a/Documentation/intro/install/dpdk.rst
> +++ b/Documentation/intro/install/dpdk.rst
> @@ -87,6 +87,7 @@ Install DPDK
> $ ninja -C build
> $ sudo ninja -C build install
> $ sudo ldconfig
> + $ export PKG_CONFIG_PATH=/path/to/installed/".pc" file/for/DPDK
>
This command is kind of an odd construction and not always needed. How
about giving the info to know if it's needed and an example. Something like:
Check libdpdk can be found by pkg-config
$ pkg-config --static --libs libdpdk
If not found, add the path to the libdpdk.pc file. e.g. On Fedora 32
$ export PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig
> Detailed information can be found at `DPDK documentation`_.
>
> @@ -97,11 +98,9 @@ Install DPDK
>
> Exporting the path to library is not necessary if the DPDK libraries are
> system installed. For libraries installed using a prefix, export the path
> - to this library and also update the $PKG_CONFIG_PATH for use
> - before building OVS::
> + to this library::
>
> $ export LD_LIBRARY_PATH=/path/to/installed/DPDK/libraries
> - $ export PKG_CONFIG_PATH=/path/to/installed/".pc" file/for/DPDK
>
> .. note::
>
> diff --git a/acinclude.m4 b/acinclude.m4
> index a67e397b6..435685c93 100644
> --- a/acinclude.m4
> +++ b/acinclude.m4
> @@ -350,16 +350,12 @@ AC_DEFUN([OVS_CHECK_DPDK], [
> "shared")
> PKG_CHECK_MODULES([DPDK], [libdpdk], [
> DPDK_INCLUDE="$DPDK_CFLAGS"
> - DPDK_LIB="$DPDK_LIBS"], [
> - DPDK_INCLUDE="-I/usr/local/include/dpdk -I/usr/include/dpdk"
> - DPDK_LIB="-ldpdk"])
> + DPDK_LIB="$DPDK_LIBS"])
> ;;
> "static" | "yes")
> PKG_CHECK_MODULES_STATIC([DPDK], [libdpdk], [
> DPDK_INCLUDE="$DPDK_CFLAGS"
> - DPDK_LIB="$DPDK_LIBS"], [
> - DPDK_INCLUDE="-I/usr/local/include/dpdk -I/usr/include/dpdk"
> - DPDK_LIB="-ldpdk"])
> + DPDK_LIB="$DPDK_LIBS"])
>
> dnl Statically linked private DPDK objects of form
> dnl -l:file.a must be positioned between
>
More information about the dev
mailing list