From: Stefan Weil via <qemu-devel@nongnu.org>
To: Arthur Sengileyev <arthur.sengileyev@gmail.com>,
qemu-devel@nongnu.org, QEMU Trivial <qemu-trivial@nongnu.org>,
Stefan Hajnoczi <stefanha@redhat.com>
Cc: Cleber Rosa <crosa@redhat.com>, John Snow <jsnow@redhat.com>
Subject: Re: [PATCH for-10.0] Fix objdump output parser in "nsis.py"
Date: Sat, 12 Apr 2025 20:19:50 +0200 [thread overview]
Message-ID: <d0f79ab8-5e02-4f9d-aa6b-acf8220e5d11@weilnetz.de> (raw)
In-Reply-To: <20250412180830.52742-1-arthur.sengileyev@gmail.com>
Am 12.04.25 um 20:08 schrieb Arthur Sengileyev:
> In msys2 distribution objdump from gcc is using single tab character
> prefix, but objdump from clang is using 4 white space characters instead.
> The script will not identify any dll dependencies for a QEMU build
> generated with clang. This in turn will fail the build, because there
> will be no files inside dlldir and no setup file will be created.
> Instead of checking for whitespace in prefix use lstrip to accommodate
> for differences in outputs.
>
> Signed-off-by: Arthur Sengileyev <arthur.sengileyev@gmail.com>
> ---
> scripts/nsis.py | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/nsis.py b/scripts/nsis.py
> index af4e064819..8f469634eb 100644
> --- a/scripts/nsis.py
> +++ b/scripts/nsis.py
> @@ -23,7 +23,7 @@ def find_deps(exe_or_dll, search_path, analyzed_deps):
> output = subprocess.check_output(["objdump", "-p", exe_or_dll], text=True)
> output = output.split("\n")
> for line in output:
> - if not line.startswith("\tDLL Name: "):
> + if not line.lstrip().startswith("DLL Name: "):
> continue
>
> dep = line.split("DLL Name: ")[1].strip()
Thanks. I use nearly the same code `if not line.strip().startswith("DLL
Name: "):` in my builds for WoA.
@Stefan, can this trivial patch still be applied for 10.0?
I had planned to replace the whole code with objdump by platform
independent Python code, but that's a larger change, and I missed the
deadline.
Reviewed-by: Stefan Weil <sw@weilnetz.de>
next prev parent reply other threads:[~2025-04-12 18:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-12 18:08 [PATCH] Fix objdump output parser in "nsis.py" Arthur Sengileyev
2025-04-12 18:19 ` Stefan Weil via [this message]
2025-04-14 14:43 ` [PATCH for-10.0] " Stefan Hajnoczi
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=d0f79ab8-5e02-4f9d-aa6b-acf8220e5d11@weilnetz.de \
--to=qemu-devel@nongnu.org \
--cc=arthur.sengileyev@gmail.com \
--cc=crosa@redhat.com \
--cc=jsnow@redhat.com \
--cc=qemu-trivial@nongnu.org \
--cc=stefanha@redhat.com \
--cc=sw@weilnetz.de \
/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).