patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: dev@dpdk.org, stable@dpdk.org,
	Bruce Richardson <bruce.richardson@intel.com>
Subject: [dpdk-stable] [PATCH] devtools: fix example build with old pkg-config
Date: Fri, 15 Nov 2019 10:35:25 +0000
Message-ID: <20191115103525.94786-1-ferruh.yigit@intel.com> (raw)

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 <cmdline_rdline.h>

Fixes: 7f80a2102bbb ("devtools: test pkg-config file")
Cc: stable@dpdk.org

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
Cc: Bruce Richardson <bruce.richardson@intel.com>
---
 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


             reply	other threads:[~2019-11-15 10:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-15 10:35 Ferruh Yigit [this message]
2019-11-15 10:41 ` Bruce Richardson
     [not found] ` <20191115151700.64354-1-bruce.richardson@intel.com>
2019-11-15 15:16   ` [dpdk-stable] [PATCH v2 1/2] devtools: fix example builds with older pkg-config Bruce Richardson
2019-11-15 15:17   ` [dpdk-stable] [PATCH v2 2/2] examples: suppress errors for missing pkg-config path flag Bruce Richardson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191115103525.94786-1-ferruh.yigit@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=stable@dpdk.org \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ https://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git