From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 362C8A04C5; Fri, 15 Nov 2019 11:35:37 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4F9E2316B; Fri, 15 Nov 2019 11:35:36 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 1FD1127D; Fri, 15 Nov 2019 11:35:34 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Nov 2019 02:35:33 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,308,1569308400"; d="scan'208";a="236029517" Received: from silpixa00399752.ir.intel.com (HELO silpixa00399752.ger.corp.intel.com) ([10.237.223.78]) by fmsmga002.fm.intel.com with ESMTP; 15 Nov 2019 02:35:32 -0800 From: Ferruh Yigit To: Thomas Monjalon Cc: dev@dpdk.org, stable@dpdk.org, Bruce Richardson Date: Fri, 15 Nov 2019 10:35:25 +0000 Message-Id: <20191115103525.94786-1-ferruh.yigit@intel.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] devtools: fix example build with old pkg-config X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The old version of the pkg-config [1] doesn't support '-define-prefix' and '--path' arguments which is causing failure building the examples [2]. Added checks for pkg-config arguments support and build examples only if they are supported. [1] CentOS Linux release 7.7.1908 (Core) pkg-config version 0.27.1 [2] ## Building cmdline Unknown option --define-prefix gmake: Entering directory `...ild-x86-default/install-root/usr/local/share/dpdk/examples/cmdline' rm -f build/cmdline build/cmdline-static build/cmdline-shared test -d build && rmdir -p build || true Unknown option --define-prefix Unknown option --define-prefix gcc -O3 main.c commands.c parse_obj_list.c -o build/cmdline-shared main.c:14:28: fatal error: cmdline_rdline.h: No such file or directory #include Fixes: 7f80a2102bbb ("devtools: test pkg-config file") Cc: stable@dpdk.org Signed-off-by: Ferruh Yigit --- Cc: Bruce Richardson --- devtools/test-meson-builds.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh index 08e83eb5c..09ab3967b 100755 --- a/devtools/test-meson-builds.sh +++ b/devtools/test-meson-builds.sh @@ -133,7 +133,10 @@ load_env cc pc_file=$(find $DESTDIR -name libdpdk.pc) export PKG_CONFIG_PATH=$(dirname $pc_file):$PKG_CONFIG_PATH -for example in cmdline helloworld l2fwd l3fwd skeleton timer; do - echo "## Building $example" - $MAKE -C $DESTDIR/usr/local/share/dpdk/examples/$example clean all -done +# Ckeck pkg-config parameter support for old versions +if pkg-config --define-prefix --path libdpdk >/dev/null 2>&1; then + for example in cmdline helloworld l2fwd l3fwd skeleton timer; do + echo "## Building $example" + $MAKE -C $DESTDIR/usr/local/share/dpdk/examples/$example clean all + done +fi -- 2.21.0