Received: by 2002:ab2:784b:0:b0:1fd:adc2:8405 with SMTP id m11csp249591lqp; Mon, 10 Jun 2024 02:56:18 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW7zfzrbhtDbHv+WcgL0zC38hnhEiTNd72L6vMfTCSS67hkAis8c36NmkLTxVoete09YKhYhOdR9+IqKjejaVB1AOXJrOIL6rVT+C9fAA== X-Google-Smtp-Source: AGHT+IFqsJJ3V6RVatzcBT/eAeqOPGVa7S/YtQ03cu6SMJg9qe+iXE/3EQjRwCQfWBRED9hhqfaH X-Received: by 2002:a2e:b056:0:b0:2e4:f8e:3a64 with SMTP id 38308e7fff4ca-2eadce4ad6cmr53022361fa.30.1718013378309; Mon, 10 Jun 2024 02:56:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718013378; cv=pass; d=google.com; s=arc-20160816; b=VFnoXS6G56prkRJK13FOwnLoPcHaoUxKuoHZz5XD2bmzlzsgTeM+zj3TFzGbnTg+Qt BPgO74TX8UJZ4hBnVgZKr1DwiO4vxqTQxC3jK3f8XQFRtagt6kLIbvCb1cNZzYGWm/xe RHgmpKN6uX3fEizWP7TAWP6SApSVpgLymWw8oUKy247ILVvXPZ48xxQhpJ4rt4Lw5q6o IszFfgERo43LwWEp6uC2UHOHV+xKhcuiSLA67xqNLKwcTMuwRyoPrD83nL16ZaXt1xxy XiaFx4YUNBMEfAjr8u4bEjWRp8CYabknm1gItOSc/VXXWe9Bn5852GGE2//oWSxSXn6D 2ukA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=pa3XfPaQsxp281YI4R0rjktmMuzmPizinwGBXiqxAs8=; fh=HpB/ghQ4qY+yqVacJINdcRXrsaCBAaUbGMhHL4opc+o=; b=xBW6HwhC665VDg88CIJo1mJCuxE+qgMMBTfMvb5orKtlreXE4ihTgm/NTmdsGxCoJW mWqF7T9vzQSCEReD4wnAvOXTfgANc+QoYsoYSNaTVX2XiQkddNeYFMGKT0pB1iKwkRJx cdIolydHO6UyFVNdQdfpZtqBI+1dJgrpivXa+2hyyZGcGwnuBCZ9R82xmfWyUua3ZFzX R9HNhUCppdGZGhPrgPTkUoyaMFznowUCGj6NjP9VJCix2I23YSjlR2nUmQSLcC+QC4oz E4/D5Ufjqk3RbB8iddnl9vFBjFF+pzHtcTdYBgDUHd82DRyrgaguUhuI4pcIaGGdv1se 2vVw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-207973-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-207973-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-57c808e1577si1059728a12.518.2024.06.10.02.56.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jun 2024 02:56:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-207973-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-207973-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-207973-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 046681F23F5A for ; Mon, 10 Jun 2024 09:56:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 70C1C7BB0C; Mon, 10 Jun 2024 09:55:19 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A421379DDB; Mon, 10 Jun 2024 09:55:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718013318; cv=none; b=Mx6EWotU1a3cX7CmauiMvI/MuV1GtCpoo06HrTBvkwrNP+Zx0OwXYwDro3Vjev+4Zck0Y5Qj5pOK2/JMpwXNi8/sZDgNcBzTJaGvuyLotjYxbG3c9RG9B5XgJcDfiOr9k4UU+YsOvYJFjwH7lX3Re/XUhbgfl4EFK0Qd+OtPVnM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718013318; c=relaxed/simple; bh=TAI5MVvJ3quT5ll1LWwaXnbXGxwg9ZEetfoGD6HWeHs=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Gxj1HoamVuMsxXwt9iTuyi5jj2rHQ6HZEVLq1IxRBY5pOLS7Ozs0N5qwM4uHlR+RB/GC6FJlyaZM7XwXmX1dwk8qypMh+/v44AmH2zKw+19u56vvCrnadr0+sOHcSDnQFRb3zi6lR76mcYGuaq85EgIrEX8DkMlK2oQ8kYT4O0o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C1D4E1688; Mon, 10 Jun 2024 02:55:41 -0700 (PDT) Received: from e132581.cambridge.arm.com (e132581.arm.com [10.2.76.71]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id E9EEC3F73B; Mon, 10 Jun 2024 02:55:14 -0700 (PDT) From: Leo Yan To: Arnaldo Carvalho de Melo , Namhyung Kim , Ian Rogers , James Clark , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Adrian Hunter , "Liang, Kan" , Nick Terrell , Thomas Richter , Quentin Monnet , Changbin Du , Fangrui Song , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Guilherme Amadio Cc: Leo Yan Subject: [PATCH v2 5/6] perf: build: Link lib 'zstd' for static build Date: Mon, 10 Jun 2024 10:54:32 +0100 Message-Id: <20240610095433.336295-6-leo.yan@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240610095433.336295-1-leo.yan@arm.com> References: <20240610095433.336295-1-leo.yan@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit When build static perf, Makefile reports the error: Makefile.config:480: No libdw DWARF unwind found, Please install elfutils-devel/libdw-dev >= 0.158 and/or set LIBDW_DIR The libdw has been installed on the system, but the build system fails to build the feature detecting binary 'test-libdw-dwarf-unwind'. The failure is caused by missing to link the lib 'zstd'. Link lib 'zstd' for the static build, in the end, the dwarf feature can be enabled in the static perf. Signed-off-by: Leo Yan --- tools/build/feature/Makefile | 2 +- tools/perf/Makefile.config | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile index 9e5663eefc01..991bb4fed774 100644 --- a/tools/build/feature/Makefile +++ b/tools/build/feature/Makefile @@ -171,7 +171,7 @@ $(OUTPUT)test-libopencsd.bin: DWARFLIBS := -ldw ifeq ($(findstring -static,${LDFLAGS}),-static) - DWARFLIBS += -lelf -lz -llzma -lbz2 + DWARFLIBS += -lelf -lz -llzma -lbz2 -lzstd LIBDW_VERSION := $(shell $(PKG_CONFIG) --modversion libdw) LIBDW_VERSION_1 := $(word 1, $(subst ., ,$(LIBDW_VERSION))) diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config index db3bc460d4c2..0f918475d7b6 100644 --- a/tools/perf/Makefile.config +++ b/tools/perf/Makefile.config @@ -152,7 +152,7 @@ ifdef LIBDW_DIR endif DWARFLIBS := -ldw ifeq ($(findstring -static,${LDFLAGS}),-static) - DWARFLIBS += -lelf -ldl -lz -llzma -lbz2 + DWARFLIBS += -lelf -ldl -lz -llzma -lbz2 -lzstd LIBDW_VERSION := $(shell $(PKG_CONFIG) --modversion libdw) LIBDW_VERSION_1 := $(word 1, $(subst ., ,$(LIBDW_VERSION))) -- 2.34.1