From patchwork Fri Jan 12 11:30:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 859791 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="hfvdFHSL"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zJ16G62mhz9s75 for ; Fri, 12 Jan 2018 22:41:09 +1100 (AEDT) Received: from localhost ([::1]:35235 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eZxhq-0006js-52 for incoming@patchwork.ozlabs.org; Fri, 12 Jan 2018 06:41:06 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41510) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eZxYa-0007E7-Hg for qemu-devel@nongnu.org; Fri, 12 Jan 2018 06:31:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eZxYZ-0004Ys-M8 for qemu-devel@nongnu.org; Fri, 12 Jan 2018 06:31:32 -0500 Received: from mail-wm0-x241.google.com ([2a00:1450:400c:c09::241]:43317) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eZxYZ-0004Wg-Fj for qemu-devel@nongnu.org; Fri, 12 Jan 2018 06:31:31 -0500 Received: by mail-wm0-x241.google.com with SMTP id g1so11397110wmg.2 for ; Fri, 12 Jan 2018 03:31:31 -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=hfvdFHSLRSUYiX5QJKTmZl5vlq/8dQI3Z3Un6UYAvhOWbeDCv6fProldguuKJUZt0e SXVfpWjmbvZM2vIwIIX3zz031qwPxsOizCB77jqrlHzUc/5eE2wgOXKz1IQbIX1feAwa pwzX4ncKd3OKwt2nLf2P/EHofctEE+pGv3dNtcuYtooh4XQd/fKf3SJqo2zBvy+04D29 z5P5Yyto0L8k2FG1UeYm704ThYLaFuj62TnANHdMorapSBI7JWGNo+RKlIN9rufC2heA n/HVXgacSjpMbsMO+lz+wsfq0yp6q1aT/eBfJO9PQL3zOrQxf4/vcY/HB4ddAwX9s8bi xj3A== 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=AYtDcCB9ocQ6S9uVbAdoUqVSPU87mDdpBGklVb0kaTXn32bxG1Ml+RM7pudE9Gu51Z lTu7K95568OwDt23tXMRMCfWi9Jffw+rpJZorD6BxV4ipSy7sQjScQkZtoJMtS78qo6x wXwYe3sUiS3qxz5ralxQNSs0dYDE/2ztxFJWWzbxt/Pm7DqOf/KmhR4chTrzCvcEgqg0 neZXAmvMKsQIZvqOck93LC2SRyZb5RMSnaZLPHMIJxy7i2VrFiytYF/SsV3w0bijPjhD f7yZjPUclWmekMLrmSEbh8wYXl1kesuTM+6jzpXs5KdmxL3bSE8T7qgoyY7U/EKFOjtT Vosw== X-Gm-Message-State: AKwxytfIe4aBXinQloVO5l2h+mdNDpX04xR1xJl2sWHWKeHTjU+9+Ed3 hkMAzaUoLovGZ2TIypenpAcIm5S5 X-Google-Smtp-Source: ACJfBovyh7T1a6N2kTjKMWQHvQGsNRjjp491bZPbi1s3ndx/F+tYS29at0SLhYP3akhKJvZP87fDZA== X-Received: by 10.28.234.142 with SMTP id g14mr3535331wmi.31.1515756690020; Fri, 12 Jan 2018 03:31:30 -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 l8sm2732271wmg.46.2018.01.12.03.31.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Jan 2018 03:31:29 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Fri, 12 Jan 2018 12:30:33 +0100 Message-Id: <1515756676-3860-10-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1515756676-3860-1-git-send-email-pbonzini@redhat.com> References: <1515756676-3860-1-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::241 Subject: [Qemu-devel] [PULL 09/52] 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_Lureau?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Marc-André 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 symbol '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é 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" = "no"; then LIBS="$pthread_lib $LIBS" + libs_qga="$pthread_lib $libs_qga" fi PTHREAD_LIB="$pthread_lib" break