From patchwork Wed Jan 20 14:14:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Pai G, Sunil" X-Patchwork-Id: 1429194 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DLSFr6yfBz9sVR for ; Thu, 21 Jan 2021 01:14:40 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 8490B86D2D; Wed, 20 Jan 2021 14:14:38 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0FPjvi4NlsDa; Wed, 20 Jan 2021 14:14:37 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by hemlock.osuosl.org (Postfix) with ESMTP id 49CBB87014; Wed, 20 Jan 2021 14:14:37 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 1BA57C08A1; Wed, 20 Jan 2021 14:14:37 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 9588DC013A for ; Wed, 20 Jan 2021 14:14:35 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 7BB7487014 for ; Wed, 20 Jan 2021 14:14:35 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nB-qnwhwtSjL for ; Wed, 20 Jan 2021 14:14:34 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by hemlock.osuosl.org (Postfix) with ESMTPS id 7FA7386D2D for ; Wed, 20 Jan 2021 14:14:34 +0000 (UTC) IronPort-SDR: J/GHP2Ml0W0DX1bjqLVBeLlQWkkgYFpdpSR0Huvp6CTCte9DXyYhmObfErf1Ay/Os9WwLDPns3 djxyj8KvpuMA== X-IronPort-AV: E=McAfee;i="6000,8403,9869"; a="175606642" X-IronPort-AV: E=Sophos;i="5.79,361,1602572400"; d="scan'208";a="175606642" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jan 2021 06:14:33 -0800 IronPort-SDR: Gs42T/skdx0g/DUwVF+fjaqK7v9AAYzd8ntwNyXrMQI6yoC/EOMaaZffavi67SLG2MSsy8/7Zy 0oNcQFf708ew== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,361,1602572400"; d="scan'208";a="501614967" Received: from silpixa00400896.ir.intel.com ([10.243.22.222]) by orsmga004.jf.intel.com with ESMTP; 20 Jan 2021 06:14:31 -0800 From: Sunil Pai G To: dev@openvswitch.org Date: Wed, 20 Jan 2021 14:14:29 +0000 Message-Id: <20210120141429.503019-1-sunil.pai.g@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Cc: i.maximets@ovn.org, david.marchand@redhat.com, bluca@debian.org Subject: [ovs-dev] [PATCH v1] acinclude: Remove default library for DPDK. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" 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 [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.") Tested-at: https://github.com/Sunil-Pai-G/ovs/actions/runs/498553105 Signed-off-by: Sunil Pai G Reported-by: Kevin Traynor --- 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 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