qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Konstantin Kostiuk <kkostiuk@redhat.com>
Cc: QEMU <qemu-devel@nongnu.org>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Yan Vugenfirer" <yvugenfi@redhat.com>
Subject: Re: Cross-compilation artifact is broken
Date: Wed, 12 Mar 2025 14:05:09 +0000	[thread overview]
Message-ID: <Z9GUldol1IQT1uiY@redhat.com> (raw)
In-Reply-To: <CAPMcbCquaBmWhx3jWBKMC1oLrMZBUVhfWFcW=_5uhVqOep4NWw@mail.gmail.com>

On Wed, Mar 12, 2025 at 03:52:45PM +0200, Konstantin Kostiuk wrote:
> Hi All,
> 
> I cross-compiled qemu-ga from current master branch
> (825b96dbcee23d134b691fc75618b59c5f53da32) and found strange behavior.
> 
> Configure CLI:
> ./configure --disable-docs --disable-system --disable-user
> --cross-prefix=x86_64-w64-mingw32- --enable-guest-agent
> --disable-guest-agent-msi --disable-qga-vss
> Build CLI:
> make -j8 qemu-ga
> 
> Linker wrote the following information but exited with 0 code:
> 
> /usr/lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld:
> qga/qemu-ga.exe:/4: section below image base
> /usr/lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld:
> qga/qemu-ga.exe:/24: section below image base
> 
> As a result, this binary failed to start on Windows without any details,
> just a message that the application is not compatible. I also tried to run
> it with wine and got the error:
> 
> wine: failed to start
> L"Z:\\home\\user\\Documents\\repos\\qemu\\build\\qga\\qemu-ga.exe"
> Application could not be started, or no application associated with the
> specified file.
> ShellExecuteEx failed: Bad EXE format for
> Z:\home\user\Documents\repos\qemu\build\qga\qemu-ga.exe.
> 
> I bisected the tree and found the commit that caused the problem:
> https://gitlab.com/qemu-project/qemu/-/commit/563b1a35ed1f1151505d4fe5f723827d1b3fd4bc
> 
> Adding --disable-split-debug to the configure CLI fixes the issue.
> 
> $ x86_64-w64-mingw32-gcc --version
> x86_64-w64-mingw32-gcc (GCC) 14.2.0
> 
> My question is, is this expected behavior or is this a bug?

Your configure args don't include "--enable-debug", so I would
not have expected -gsplit-dwarf to have been enabled, so I'm
surprised that commit casued a problem.


With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



  reply	other threads:[~2025-03-12 14:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-12 13:52 Cross-compilation artifact is broken Konstantin Kostiuk
2025-03-12 14:05 ` Daniel P. Berrangé [this message]
2025-03-12 14:10   ` Konstantin Kostiuk
2025-03-12 14:23   ` Daniel P. Berrangé
2025-03-12 14:47     ` Peter Maydell
2025-03-12 14:55       ` Daniel P. Berrangé
2025-03-12 16:23     ` Alex Bennée
2025-03-14  8:21       ` Konstantin Kostiuk
2025-03-14 10:18         ` Alex Bennée
2025-03-14 14:21     ` Paolo Bonzini
2025-03-14 14:25       ` Daniel P. Berrangé

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=Z9GUldol1IQT1uiY@redhat.com \
    --to=berrange@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=kkostiuk@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=yvugenfi@redhat.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;
as well as URLs for NNTP newsgroup(s).