qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* Cross-compilation artifact is broken
@ 2025-03-12 13:52 Konstantin Kostiuk
  2025-03-12 14:05 ` Daniel P. Berrangé
  0 siblings, 1 reply; 11+ messages in thread
From: Konstantin Kostiuk @ 2025-03-12 13:52 UTC (permalink / raw)
  To: QEMU, Alex Bennée, Daniel Berrangé, Paolo Bonzini
  Cc: Yan Vugenfirer

[-- Attachment #1: Type: text/plain, Size: 1495 bytes --]

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?

Best Regards,
Konstantin Kostiuk.

[-- Attachment #2: Type: text/html, Size: 2088 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2025-03-14 14:26 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-12 13:52 Cross-compilation artifact is broken Konstantin Kostiuk
2025-03-12 14:05 ` Daniel P. Berrangé
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é

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).