From nobody Tue Oct 28 02:08:43 2025 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.zohomail.com; dkim=fail; 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 1516113775039107.44133410070697; Tue, 16 Jan 2018 06:42:55 -0800 (PST) Received: from localhost ([::1]:39364 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebSRy-0006OK-7Y for importer@patchew.org; Tue, 16 Jan 2018 09:42:54 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50183) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebS3p-0002nI-VD for qemu-devel@nongnu.org; Tue, 16 Jan 2018 09:18:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ebS3j-0004Vk-Ve for qemu-devel@nongnu.org; Tue, 16 Jan 2018 09:17:57 -0500 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]:42410) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ebS3j-0004VO-Pz for qemu-devel@nongnu.org; Tue, 16 Jan 2018 09:17:51 -0500 Received: by mail-wm0-x242.google.com with SMTP id b141so8767175wme.1 for ; Tue, 16 Jan 2018 06:17:51 -0800 (PST) Received: from 640k.lan (dynamic-adsl-78-12-229-84.clienti.tiscali.it. [78.12.229.84]) by smtp.gmail.com with ESMTPSA id u10sm1537758wrg.6.2018.01.16.06.17.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jan 2018 06:17:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=EmIODxz0suFHBgq71lVGPgrOIwnITsuBrEuho8JqZZY=; b=JVze35xFHzYqnCABfJqCS7Bl0u1i4/jd+pV2yD/5E8GTWlupzsX0zGHl7w4mpQzaV3 nw+9MwLpXhVyKcm2PdBnOZnun6hDVzoDQ8/rGbH2fEziFxqXkp+OX6cTziFXk05K8Y1n 14opipk1Rk8DsI1UBYx12QM9cJtH9UncYi65ZcSPmJ+fEpvDonlC/8btdGcrYwTJWqoF DAmIyweDJgg/xWoGS32zemze4dY5NTMBSKJFv7d40NgeUl2FgmoX6/KvcEd4ca7PnSO6 T2+TlFn98D5IvhKdE/Z3N54yZNvMi3fmJbRAjDlIbBE6Im6WRfnBkmuHejgrSOrpkTAD szbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=EmIODxz0suFHBgq71lVGPgrOIwnITsuBrEuho8JqZZY=; b=jjdfzqJfeO70JrW3Zkl59HFtMwDXwU/+d1oT5G6ANMBc9fvrJL9BRA4s/cGgrVKWg6 qGRvlzpOCTz7tvwcjVvrgOj3zemSem2p8dTri0wT+AwNyJb50xoF+/BAUZyilQ5y7baR 1gRmoJfXEhQMiiqeg0IVarUH3MpAfFKmm//krrvy9/oV/87GfcavAIKZ+GK61BzTtThX pU2m1oHukuFCH18eQKzTSdoBvz0EqFFjyx37/94BBvnV3kiUsV+rkhCfdOEsSzBkexnq qKDFOw4R28lCNw8FBGZDti0ME5EUaf1qtapBXK34wmBdXpjx0Y1cbv6nA4iHVMWFtQjC uuyw== X-Gm-Message-State: AKwxyteLD0YZnbzocXaWPKv/VuEhHDAUV9xynY45u+9HxHvWlVhTRLQV tCeLEJi4aT0BvPzq3GhzEq4UbQ5v X-Google-Smtp-Source: ACJfBosq6zwH8v8BAmDXbLruDsvkFmIhaetevsPbknaw8vBhlYQA4M71cohA5xc4plJnlYYZo/QuaQ== X-Received: by 10.28.211.67 with SMTP id k64mr13093686wmg.95.1516112270518; Tue, 16 Jan 2018 06:17:50 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Tue, 16 Jan 2018 15:16:51 +0100 Message-Id: <1516112253-14480-10-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1516112253-14480-1-git-send-email-pbonzini@redhat.com> References: <1516112253-14480-1-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::242 Subject: [Qemu-devel] [PULL 09/51] build-sys: fix qemu-ga -pthread linking 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: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 From: Marc-Andr=C3=A9 Lureau When linking qemu-ga under some configuration (when gthread-2.0.pc doesn't have -pthread, as happening atm with meson build), you may have this linking issue: /usr/bin/ld: libqemuutil.a(qemu-thread-posix.o): undefined reference to sym= bol 'pthread_setname_np@@GLIBC_2.12' /usr/lib64/libpthread.so.0: error adding symbols: DSO missing from command = line Make sure qemu-ga links with the pthread library, by adding correct flags to libs_qga. This is really a QEMU bug, because it's QEMU code that's using pthread functions, and so we must explicitly link against pthreads. The bug was just masked by the fact that often some pkg-config or another for one of our dependencies will add -pthread to the link line anyway. Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Peter Maydell Message-Id: <20180104160523.22995-2-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini --- configure | 1 + 1 file changed, 1 insertion(+) diff --git a/configure b/configure index 89bd662..ac392d2 100755 --- a/configure +++ b/configure @@ -3464,6 +3464,7 @@ else done if test "$found" =3D "no"; then LIBS=3D"$pthread_lib $LIBS" + libs_qga=3D"$pthread_lib $libs_qga" fi PTHREAD_LIB=3D"$pthread_lib" break --=20 1.8.3.1