From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
To: Bruce Richardson <bruce.richardson@intel.com>
Cc: dev@dpdk.org, stable@dpdk.org,
Michal Berger <michallinuxstuff@gmail.com>,
thomas@monjalon.net
Subject: Re: [dpdk-dev] [PATCH] buildtools: fix build with meson 0.60
Date: Wed, 27 Oct 2021 19:45:28 +0300 [thread overview]
Message-ID: <20211027194528.51329515@sovereign> (raw)
In-Reply-To: <YXl7UJ1LYYNeX0/Z@bricha3-MOBL.ger.corp.intel.com>
2021-10-27 17:16 (UTC+0100), Bruce Richardson:
> On Tue, Oct 26, 2021 at 10:32:39PM +0300, Dmitry Kozlyuk wrote:
> > Meson 0.60 switched the format of uninstalled static libraries
> > to thin archives, that is, they contain only paths to object files,
> > not the files themselves. Files cannot be extracted in this case,
> > resulting in build errors:
> >
> > ar: `x' cannot be used on thin archives.
> >
> > Handle thin archives when invoking pmdinfogen
> > by directly using the files referenced in the archive.
> >
> > Bugzilla ID: 836
> > Fixes: e6e9730c7066 ("buildtools: support object file extraction for Windows")
> > Cc: stable@dpdk.org
> >
> > Reported-by: Michal Berger <michallinuxstuff@gmail.com>
> > Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
> > ---
> > buildtools/gen-pmdinfo-cfile.py | 23 ++++++++++++++---------
> > 1 file changed, 14 insertions(+), 9 deletions(-)
> >
>
> Here is an alternative fix that works in my testing, based on my earlier
> suggestion:
>
> Regards,
> /Bruce
>
> diff --git a/buildtools/gen-pmdinfo-cfile.py b/buildtools/gen-pmdinfo-cfile.py
> index 58fe3ad152..5fbd51658a 100644
> --- a/buildtools/gen-pmdinfo-cfile.py
> +++ b/buildtools/gen-pmdinfo-cfile.py
> @@ -9,12 +9,13 @@
>
> _, tmp_root, ar, archive, output, *pmdinfogen = sys.argv
> with tempfile.TemporaryDirectory(dir=tmp_root) as temp:
> - run_ar = lambda command: subprocess.run(
> - [ar, command, os.path.abspath(archive)],
> - stdout=subprocess.PIPE, check=True, cwd=temp
> - )
> - # Don't use "ar p", because its output is corrupted on Windows.
> - run_ar("x")
> - names = run_ar("t").stdout.decode().splitlines()
> - paths = [os.path.join(temp, name) for name in names]
> + paths = []
> + for name in subprocess.run([ar, "t", archive], stdout=subprocess.PIPE,
> + check=True).stdout.decode().splitlines():
> + if os.path.exists(name):
> + paths.append(name)
> + else:
> + subprocess.run([ar, "x", os.path.abspath(archive), name],
> + check=True, cwd=temp)
> + paths.append(os.path.join(temp, name))
> subprocess.run(pmdinfogen + paths + [output], check=True)
>
It buys with simplicity.
I hoped to avoid creating temporary directories in vain
when all archives are thin, but maybe it's not that important.
next prev parent reply other threads:[~2021-10-27 16:45 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-26 19:32 [dpdk-dev] [PATCH] buildtools: fix build with meson 0.60 Dmitry Kozlyuk
2021-10-27 10:53 ` Bruce Richardson
2021-10-27 16:16 ` Bruce Richardson
2021-10-27 16:45 ` Dmitry Kozlyuk [this message]
2021-11-01 16:54 ` Bruce Richardson
2021-11-01 17:36 ` Dmitry Kozlyuk
2021-11-01 17:03 ` [dpdk-dev] [PATCH v2] " Bruce Richardson
2021-11-02 18:08 ` Dmitry Kozlyuk
2021-11-03 13:20 ` Thomas Monjalon
2021-11-03 13:32 ` 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=20211027194528.51329515@sovereign \
--to=dmitry.kozliuk@gmail.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=michallinuxstuff@gmail.com \
--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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.