DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: Srikanth Yalavarthi <syalavarthi@marvell.com>
Cc: <dev@dpdk.org>
Subject: Re: [PATCH 1/1] buildtools: remove absolute paths from pc file
Date: Thu, 1 Oct 2026 12:24:48 +0100	[thread overview]
Message-ID: <ar5DAESh3L7DzokJ@bricha3-mobl1.ger.corp.intel.com> (raw)
In-Reply-To: <aifFFS9gvRn9JYKg@bricha3-mobl1.ger.corp.intel.com>

On Tue, Jun 09, 2026 at 08:47:33AM +0100, Bruce Richardson wrote:
> On Tue, Jun 09, 2026 at 10:02:20AM +0530, Srikanth Yalavarthi wrote:
> > When linking with non-versioned libraries, absolute paths
> > of the libraries are added to libdpdk.pc. This patch replaces
> > the absolute path with correct linker flags, -l<libname>.
> > 
> 
> Do we need to check if we need a "-L" flag for some of these paths that are
> stripped?
> 
> > https://github.com/mesonbuild/meson/issues/7766
> > 
> > Signed-off-by: Srikanth Yalavarthi <syalavarthi@marvell.com>
> > ---
> >  buildtools/pkg-config/set-static-linker-flags.py | 7 +++++++
> >  1 file changed, 7 insertions(+)
> > 
> > diff --git a/buildtools/pkg-config/set-static-linker-flags.py b/buildtools/pkg-config/set-static-linker-flags.py
> > index 2745db34c29..bd217b07fc8 100644
> > --- a/buildtools/pkg-config/set-static-linker-flags.py
> > +++ b/buildtools/pkg-config/set-static-linker-flags.py
> > @@ -6,9 +6,16 @@
> >  # Should be called from meson build itself
> >  import os
> >  import sys
> > +import re
> >  
> >  
> >  def fix_ldflag(f):
> > +    if f.startswith('/'):
> > +        libfile = os.path.basename(f)
> > +        m = re.match(r'^lib(.+?)\.(a|so(?:\..*)?)$', libfile)
> > +        if m:
> > +            return '-l' + m.group(1)
> > +
> >      if not f.startswith('-lrte_'):
> >          return f
> >      return '-l:lib' + f[2:] + '.a'
> > -- 
> > 2.34.1
> > 

I don't have any massive objections to this. I'm just a little concerned
about possible side-effects, i.e. if there are occasions where we may need
or want the full paths in the pkg-config output. However, I suppose we will
never discover that unless we actually put something like this in.

In terms of the two specific libraries that are causing the problems in
your case. Is there no chance of getting whoever develops those to add
proper SONAMES to the libraries to avoid this issue completely?

/Bruce

  parent reply	other threads:[~2026-10-01 11:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-09  4:32 [PATCH 1/1] buildtools: remove absolute paths from pc file Srikanth Yalavarthi
2026-06-09  7:47 ` Bruce Richardson
2026-06-09  8:09   ` Bruce Richardson
2026-09-16 11:45     ` David Marchand
2026-09-28 11:40       ` [EXTERNAL] " Srikanth Yalavarthi
2026-10-01 11:24   ` Bruce Richardson [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-01-07 15:41 Srikanth Yalavarthi
2024-10-09 18:44 ` Stephen Hemminger
2024-10-10  8:02   ` Bruce Richardson
2024-10-10 13:57 ` 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=ar5DAESh3L7DzokJ@bricha3-mobl1.ger.corp.intel.com \
    --to=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=syalavarthi@marvell.com \
    /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