From: Michael Roth <mdroth@linux.vnet.ibm.com>
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, Sameeh Jubran <sameeh@daynix.com>
Subject: [Qemu-devel] [PULL for-2.9 2/2] qga: Make qemu-ga compile statically for Windows
Date: Thu, 30 Mar 2017 23:01:09 -0500 [thread overview]
Message-ID: <1490932869-31217-3-git-send-email-mdroth@linux.vnet.ibm.com> (raw)
In-Reply-To: <1490932869-31217-1-git-send-email-mdroth@linux.vnet.ibm.com>
From: Sameeh Jubran <sameeh@daynix.com>
Attempting to compile qemu-ga statically as follows for Windows causes
the following error:
Compilation:
./configure --disable-docs --target-list=x86_64-softmmu \
--cross-prefix=x86_64-w64-mingw32- --static \
--enable-guest-agent-msi --with-vss-sdk=/path/to/VSSSDK72
make -j8 qemu-ga
Error:
path/to/qemu/stubs/error-printf.c:7: undefined reference to `__imp_g_test_config_vars'
collect2: error: ld returned 1 exit status
Makefile:444: recipe for target 'qemu-ga.exe' failed
make: *** [qemu-ga.exe] Error 1
This is caused by a bug in the pkg-config file for glib as it doesn't define
GLIB_STATIC_COMPILATION for pkg-config --static.
Signed-off-by: Sameeh Jubran <sameeh@daynix.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
configure | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/configure b/configure
index d1ce33b..07018e0 100755
--- a/configure
+++ b/configure
@@ -3066,6 +3066,13 @@ if test "$modules" = yes; then
glib_modules="$glib_modules gmodule-2.0"
fi
+# This workaround is required due to a bug in pkg-config file for glib as it
+# doesn't define GLIB_STATIC_COMPILATION for pkg-config --static
+
+if test "$static" = yes -a "$mingw32" = yes; then
+ QEMU_CFLAGS="-DGLIB_STATIC_COMPILATION $QEMU_CFLAGS"
+fi
+
for i in $glib_modules; do
if $pkg_config --atleast-version=$glib_req_ver $i; then
glib_cflags=$($pkg_config --cflags $i)
--
2.7.4
next prev parent reply other threads:[~2017-03-31 4:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-31 4:01 [Qemu-devel] [PULL for-2.9 0/2] qemu-ga patch queue for 2.9 Michael Roth
2017-03-31 4:01 ` [Qemu-devel] [PULL for-2.9 1/2] qga: don't fail if mount doesn't have slave devices Michael Roth
2017-03-31 4:01 ` Michael Roth [this message]
2017-03-31 10:41 ` [Qemu-devel] [PULL for-2.9 0/2] qemu-ga patch queue for 2.9 Peter Maydell
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=1490932869-31217-3-git-send-email-mdroth@linux.vnet.ibm.com \
--to=mdroth@linux.vnet.ibm.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=sameeh@daynix.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).