app/test: fix rpath for drivers in meson build

Message ID 18f843ba879918cf02416f428bb810e7ea8cde10.1593623742.git.tredaelli@redhat.com (mailing list archive)
State Accepted, archived
Delegated to: David Marchand
Headers
Series app/test: fix rpath for drivers in meson build |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-nxp-Performance success Performance Testing PASS
ci/travis-robot success Travis build: passed
ci/Intel-compilation success Compilation OK
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-testing success Testing PASS

Commit Message

Timothy Redaelli July 1, 2020, 5:16 p.m. UTC
  This commit fixes the setting of relative rpath on dpdk-test for
drivers ($libdir/dpdk/pmd-$abiver) to the correct absolute rpath
($prefix$libdir/dpdk/pmd-$abiver)

Fixes: b5dc795a8a55 ("test: build app with meson as dpdk-test")
Cc: harry.van.haaren@intel.com
Cc: stable@dpdk.org
Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
---
 app/test/meson.build | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
  

Comments

Bruce Richardson July 2, 2020, 9:16 a.m. UTC | #1
On Wed, Jul 01, 2020 at 07:16:38PM +0200, Timothy Redaelli wrote:
> This commit fixes the setting of relative rpath on dpdk-test for
> drivers ($libdir/dpdk/pmd-$abiver) to the correct absolute rpath
> ($prefix$libdir/dpdk/pmd-$abiver)
> 
> Fixes: b5dc795a8a55 ("test: build app with meson as dpdk-test")
> Cc: harry.van.haaren@intel.com
> Cc: stable@dpdk.org
> Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
> ---
>  app/test/meson.build | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
I'm not sure I agree with this change. It's better to have a relative
rather than absolute rpath, I think. What problems is it causing to have a
relative vs absolute rpath?
  
Timothy Redaelli July 2, 2020, 10:42 a.m. UTC | #2
On Thu, 2 Jul 2020 10:16:48 +0100
Bruce Richardson <bruce.richardson@intel.com> wrote:

> On Wed, Jul 01, 2020 at 07:16:38PM +0200, Timothy Redaelli wrote:
> > This commit fixes the setting of relative rpath on dpdk-test for
> > drivers ($libdir/dpdk/pmd-$abiver) to the correct absolute rpath
> > ($prefix$libdir/dpdk/pmd-$abiver)
> > 
> > Fixes: b5dc795a8a55 ("test: build app with meson as dpdk-test")
> > Cc: harry.van.haaren@intel.com
> > Cc: stable@dpdk.org
> > Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
> > ---
> >  app/test/meson.build | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> I'm not sure I agree with this change. It's better to have a relative
> rather than absolute rpath, I think. What problems is it causing to have a
> relative vs absolute rpath?
> 

I only backported the same fix done in app/meson.build since,
currently, app/test/meson.build adds a rpath to "lib64/dpdk/pmd-20.0"
that doesn't exists since, in this case, it should be
"../lib64/dpdk/pmd-20.0" on Fedora, or
"../lib/x86_64-linux-gnu/dpdk/pmds-20.0" on Debian.

If we want relative paths we should change "install_rpath:" line on
app/meson.build too.

Debian workarounded that bug by stripping rpaths from dpdk-test [1],
but I'd like to avoid doing that on Fedora/RHEL too, when we'll
migrate to meson, since currently check-rpaths (invoked by rpmbuild) is
complaining about the invalid rpath:

ERROR   0002: file '/usr/bin/dpdk-test' contains an invalid rpath
'lib64/dpdk/pmds-20.0' in [lib64/dpdk/pmds-20.0]

[1]
https://salsa.debian.org/debian/dpdk/-/blob/unstable/debian/rules#L175
  
Bruce Richardson July 2, 2020, 11:01 a.m. UTC | #3
On Thu, Jul 02, 2020 at 12:42:06PM +0200, Timothy Redaelli wrote:
> On Thu, 2 Jul 2020 10:16:48 +0100
> Bruce Richardson <bruce.richardson@intel.com> wrote:
> 
> > On Wed, Jul 01, 2020 at 07:16:38PM +0200, Timothy Redaelli wrote:
> > > This commit fixes the setting of relative rpath on dpdk-test for
> > > drivers ($libdir/dpdk/pmd-$abiver) to the correct absolute rpath
> > > ($prefix$libdir/dpdk/pmd-$abiver)
> > > 
> > > Fixes: b5dc795a8a55 ("test: build app with meson as dpdk-test")
> > > Cc: harry.van.haaren@intel.com
> > > Cc: stable@dpdk.org
> > > Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
> > > ---
> > >  app/test/meson.build | 3 ++-
> > >  1 file changed, 2 insertions(+), 1 deletion(-)
> > > 
> > I'm not sure I agree with this change. It's better to have a relative
> > rather than absolute rpath, I think. What problems is it causing to have a
> > relative vs absolute rpath?
> > 
> 
> I only backported the same fix done in app/meson.build since,
> currently, app/test/meson.build adds a rpath to "lib64/dpdk/pmd-20.0"
> that doesn't exists since, in this case, it should be
> "../lib64/dpdk/pmd-20.0" on Fedora, or
> "../lib/x86_64-linux-gnu/dpdk/pmds-20.0" on Debian.
> 
> If we want relative paths we should change "install_rpath:" line on
> app/meson.build too.
> 
> Debian workarounded that bug by stripping rpaths from dpdk-test [1],
> but I'd like to avoid doing that on Fedora/RHEL too, when we'll
> migrate to meson, since currently check-rpaths (invoked by rpmbuild) is
> complaining about the invalid rpath:
> 
> ERROR   0002: file '/usr/bin/dpdk-test' contains an invalid rpath
> 'lib64/dpdk/pmds-20.0' in [lib64/dpdk/pmds-20.0]
> 
> [1]
> https://salsa.debian.org/debian/dpdk/-/blob/unstable/debian/rules#L175
>
Ok, in that case no problem:

Acked-by: Bruce Richarson <bruce.richardson@intel.com>
  
David Marchand July 7, 2020, 11:32 a.m. UTC | #4
On Wed, Jul 1, 2020 at 7:26 PM Timothy Redaelli <tredaelli@redhat.com> wrote:
> This commit fixes the setting of relative rpath on dpdk-test for
> drivers ($libdir/dpdk/pmd-$abiver) to the correct absolute rpath
> ($prefix$libdir/dpdk/pmd-$abiver)
>
> Fixes: b5dc795a8a55 ("test: build app with meson as dpdk-test")
> Cc: stable@dpdk.org
> Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>

Acked-by: Bruce Richarson <bruce.richardson@intel.com>

Applied, thanks.
  

Patch

diff --git a/app/test/meson.build b/app/test/meson.build
index 5233ead46..476b332cb 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -424,7 +424,8 @@  dpdk_test = executable('dpdk-test',
 	link_whole: link_libs + link_nodes,
 	dependencies: test_dep_objs,
 	c_args: cflags,
-	install_rpath: driver_install_path,
+	install_rpath: join_paths(get_option('prefix'),
+			 driver_install_path),
 	install: true)
 
 has_hugepage = run_command('has-hugepage.sh').stdout().strip() != '0'