From: Peter Maydell <peter.maydell@linaro.org>
To: Sameeh Jubran <sameeh@daynix.com>
Cc: QEMU Developers <qemu-devel@nongnu.org>,
Michael Roth <mdroth@linux.vnet.ibm.com>,
Yan Vugenfirer <yan@daynix.com>,
Stefan Hajnoczi <stefanha@gmail.com>
Subject: Re: [Qemu-devel] [PATCH qemu-ga] qga: Make qemu-ga compile statically for Windows
Date: Wed, 22 Mar 2017 13:21:41 +0000 [thread overview]
Message-ID: <CAFEAcA-qDLcpTJG9yrYptJHP_p598fakaW7ufzcbih5Wo2ySog@mail.gmail.com> (raw)
In-Reply-To: <20170322130952.8997-1-sameeh@daynix.com>
On 22 March 2017 at 13:09, Sameeh Jubran <sameeh@daynix.com> wrote:
> 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: Stefan Hajnoczi <stefanha@gmail.com>
> Signed-off-by: Sameeh Jubran <sameeh@daynix.com>
> @@ -4138,7 +4138,7 @@ int main(void) { return VSS_CTX_BACKUP; }
> EOF
> if compile_prog "$vss_win32_include" "" ; then
> guest_agent_with_vss="yes"
> - QEMU_CFLAGS="$QEMU_CFLAGS $vss_win32_include"
> + QEMU_CFLAGS="-DGLIB_STATIC_COMPILATION $QEMU_CFLAGS $vss_win32_include"
> libs_qga="-lole32 -loleaut32 -lshlwapi -lstdc++ -Wl,--enable-stdcall-fixup $libs_qga"
> qga_vss_provider="qga/vss-win32/qga-vss.dll qga/vss-win32/qga-vss.tlb"
> else
If we need this for static glib compilation we should
be adding it where we do the "test for glib and
add glib related flags to the CFLAGS", not in the
part of configure where we decide that we're
compiling the guest agent.
Also, please can we have a comment that clearly states
why we need this and that we're working around a
packaging bug in glib for Windows, please?
thanks
-- PMM
next prev parent reply other threads:[~2017-03-22 13:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-22 13:09 [Qemu-devel] [PATCH qemu-ga] qga: Make qemu-ga compile statically for Windows Sameeh Jubran
2017-03-22 13:21 ` Peter Maydell [this message]
2017-03-22 14:12 ` Sameeh Jubran
2017-03-22 13:29 ` Marc-André Lureau
2017-03-22 14:11 ` Sameeh Jubran
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=CAFEAcA-qDLcpTJG9yrYptJHP_p598fakaW7ufzcbih5Wo2ySog@mail.gmail.com \
--to=peter.maydell@linaro.org \
--cc=mdroth@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=sameeh@daynix.com \
--cc=stefanha@gmail.com \
--cc=yan@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).