From: Bruce Richardson <bruce.richardson@intel.com>
To: dev@dpdk.org
Cc: Bruce Richardson <bruce.richardson@intel.com>
Subject: [dpdk-dev] [PATCH 2/2] buildtools/test-meson-builds: workaround pkg-config issue
Date: Wed, 3 Jul 2019 17:40:01 +0100 [thread overview]
Message-ID: <20190703164001.24841-3-bruce.richardson@intel.com> (raw)
In-Reply-To: <20190703164001.24841-1-bruce.richardson@intel.com>
With Debian and Ubuntu, the default installation path for the 64-bit
libraries is set to e.g. /usr/local/lib/x86_64-linux-gnu/, compared to
/usr/local/lib64 on Fedora and Redhat distributions. This causes issues
when using "pkg-config --define-prefix" since pkg-config assumes the prefix
to be the grandparent of where the .pc file is. On Ubuntu we then get the
cflags include path as being "/path/to/install-root/usr/local/lib/include"
i.e. with an extra "lib" in the path.
This issue only applies for test installs on Ubuntu and similar distros,
and is not a problem for regular installs since the --define-prefix
parameter would not be passed to pkg-config in those cases.
The workaround for this in our test build script is to explicitly make
"lib" the "libdir" setting for the install, overriding the distro-provided
default.
Fixes: 7f80a2102bbb ("devtools: test pkg-config file")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
devtools/test-meson-builds.sh | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh
index 57d1af47e..7efc590fe 100755
--- a/devtools/test-meson-builds.sh
+++ b/devtools/test-meson-builds.sh
@@ -76,12 +76,14 @@ for c in gcc clang ; do
done
# test compilation with minimal x86 instruction set
+# set the install path for libraries to "lib" explicitly to prevent problems
+# with pkg-config prefixes if installed in "lib/x86_64-linux-gnu" later.
default_machine='nehalem'
ok=$(cc -march=$default_machine -E - < /dev/null > /dev/null 2>&1 || echo false)
if [ "$ok" = "false" ] ; then
default_machine='corei7'
fi
-build build-x86-default -Dmachine=$default_machine $use_shared
+build build-x86-default -Dlibdir=lib -Dmachine=$default_machine $use_shared
# enable cross compilation if gcc cross-compiler is found
c=aarch64-linux-gnu-gcc
--
2.21.0
next prev parent reply other threads:[~2019-07-03 16:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-03 16:39 [dpdk-dev] [PATCH 0/2] fix issues with Ubuntu 18.04 compilation Bruce Richardson
2019-07-03 16:40 ` [dpdk-dev] [PATCH 1/2] examples: fix pkg-config detection with older make Bruce Richardson
2019-07-03 16:40 ` Bruce Richardson [this message]
2019-07-04 8:39 ` [dpdk-dev] [PATCH 2/2] buildtools/test-meson-builds: workaround pkg-config issue Luca Boccassi
2019-07-04 9:47 ` Bruce Richardson
2019-07-03 16:49 ` [dpdk-dev] [PATCH 0/2] fix issues with Ubuntu 18.04 compilation Luca Boccassi
2019-07-03 21:11 ` Thomas Monjalon
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=20190703164001.24841-3-bruce.richardson@intel.com \
--to=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).