DPDK patches and discussions
 help / color / mirror / Atom feed
From: Luca Boccassi <bluca@debian.org>
To: Bruce Richardson <bruce.richardson@intel.com>, dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH 2/2] buildtools/test-meson-builds: workaround pkg-config issue
Date: Thu, 04 Jul 2019 09:39:32 +0100	[thread overview]
Message-ID: <dfc28fbac177d017e3a4a2f57b24d322ff628deb.camel@debian.org> (raw)
In-Reply-To: <20190703164001.24841-3-bruce.richardson@intel.com>

On Wed, 2019-07-03 at 17:40 +0100, Bruce Richardson wrote:
> 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

I have sent a patch upstream to pkg-config to fix the issue, as it
should really support the multiarch layout:

https://gitlab.freedesktop.org/pkg-config/pkg-config/merge_requests/4

-- 
Kind regards,
Luca Boccassi

  reply	other threads:[~2019-07-04  8:39 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 ` [dpdk-dev] [PATCH 2/2] buildtools/test-meson-builds: workaround pkg-config issue Bruce Richardson
2019-07-04  8:39   ` Luca Boccassi [this message]
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=dfc28fbac177d017e3a4a2f57b24d322ff628deb.camel@debian.org \
    --to=bluca@debian.org \
    --cc=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).