From nobody Mon Feb 9 23:15:15 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1490933058412470.8792703168667; Thu, 30 Mar 2017 21:04:18 -0700 (PDT) Received: from localhost ([::1]:38763 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ctnnN-0007w1-4R for importer@patchew.org; Fri, 31 Mar 2017 00:04:17 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54968) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ctnl4-0006YE-6D for qemu-devel@nongnu.org; Fri, 31 Mar 2017 00:01:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ctnl1-00083l-5X for qemu-devel@nongnu.org; Fri, 31 Mar 2017 00:01:54 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:40263 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ctnl1-000837-0M for qemu-devel@nongnu.org; Fri, 31 Mar 2017 00:01:51 -0400 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v2V4026n021319 for ; Fri, 31 Mar 2017 00:01:50 -0400 Received: from e38.co.us.ibm.com (e38.co.us.ibm.com [32.97.110.159]) by mx0b-001b2d01.pphosted.com with ESMTP id 29h4ekum8w-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Fri, 31 Mar 2017 00:01:49 -0400 Received: from localhost by e38.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 30 Mar 2017 22:01:48 -0600 Received: from b03cxnp08028.gho.boulder.ibm.com (9.17.130.20) by e38.co.us.ibm.com (192.168.1.138) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 30 Mar 2017 22:01:46 -0600 Received: from b03ledav005.gho.boulder.ibm.com (b03ledav005.gho.boulder.ibm.com [9.17.130.236]) by b03cxnp08028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v2V41RKt15335742; Thu, 30 Mar 2017 21:01:46 -0700 Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D8E59BE042; Thu, 30 Mar 2017 22:01:45 -0600 (MDT) Received: from localhost (unknown [9.53.92.194]) by b03ledav005.gho.boulder.ibm.com (Postfix) with ESMTP id C0F07BE03A; Thu, 30 Mar 2017 22:01:45 -0600 (MDT) From: Michael Roth To: qemu-devel@nongnu.org Date: Thu, 30 Mar 2017 23:01:09 -0500 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1490932869-31217-1-git-send-email-mdroth@linux.vnet.ibm.com> References: <1490932869-31217-1-git-send-email-mdroth@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 17033104-0028-0000-0000-000007520BE2 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00006875; HX=3.00000240; KW=3.00000007; PH=3.00000004; SC=3.00000206; SDB=6.00841023; UDB=6.00414048; IPR=6.00619088; BA=6.00005248; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00014869; XFM=3.00000013; UTC=2017-03-31 04:01:48 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17033104-0029-0000-0000-000034B8B9D7 Message-Id: <1490932869-31217-3-git-send-email-mdroth@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-03-31_03:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1702020001 definitions=main-1703310034 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 148.163.158.5 Subject: [Qemu-devel] [PULL for-2.9 2/2] qga: Make qemu-ga compile statically for Windows X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, Sameeh Jubran Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Sameeh Jubran Attempting to compile qemu-ga statically as follows for Windows causes the following error: Compilation: ./configure --disable-docs --target-list=3Dx86_64-softmmu \ --cross-prefix=3Dx86_64-w64-mingw32- --static \ --enable-guest-agent-msi --with-vss-sdk=3D/path/to/VSSSDK72 make -j8 qemu-ga Error: path/to/qemu/stubs/error-printf.c:7: undefined reference to `__imp_g_te= st_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 Reviewed-by: Stefan Hajnoczi Signed-off-by: Michael Roth --- 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" =3D yes; then glib_modules=3D"$glib_modules gmodule-2.0" fi =20 +# 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" =3D yes -a "$mingw32" =3D yes; then + QEMU_CFLAGS=3D"-DGLIB_STATIC_COMPILATION $QEMU_CFLAGS" +fi + for i in $glib_modules; do if $pkg_config --atleast-version=3D$glib_req_ver $i; then glib_cflags=3D$($pkg_config --cflags $i) --=20 2.7.4