Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp1476089lqj; Tue, 4 Jun 2024 02:44:30 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU13lixmAdz6w6YX4JYVpz62DIGjsP2fELXJHCCSxdR2xGNGzTfVm/3Ibil25AWDf7Yf+Gy7si9ZfLt0njZb7HTVROP0caHuufI5vzGfQ== X-Google-Smtp-Source: AGHT+IHrAj3AjL+Lshwo5oJweZx2tsBmVtxk54+0dwYRSWtALRQIC3BydglhtThB5g3CZbmbIgDz X-Received: by 2002:a05:6870:6388:b0:24f:e5f2:1d03 with SMTP id 586e51a60fabf-2508b9c9a35mr13579872fac.24.1717494269793; Tue, 04 Jun 2024 02:44:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717494269; cv=pass; d=google.com; s=arc-20160816; b=T71OYHKfAZvJ6Plq+8QWeb2ZvRGHBlytfmfVxLkj4vcpLEkCmHN20eQx+5VFjy18zA J2beTKgI6D5DSPdt+QhDpnBP45DDcKkuDdZiA7hZsRfaBwQG26Cycu7sMZzS0Hx+KI2J fOXPVIKz96YCiRH0e5x9QtMlglyEN/gzjN4mti1JkeL5K/ODdT+HDB3LedHu3d6rpggE nttZVEkHvZ17iuoeQ0epBzQygJ3Mp7lLZEMSP3tI+fsy+tTCC0c16IVvoYQH6haTL2fZ mLIkNeycS/xqMlJky12ImViHu0qfT78A9ReXiS0ML4948DaGA9Z6YE7Z8Cv2afHspzj8 fa1w== 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=O8o7hcfhEJ6ffUVIwVQMn5klKBKaAX/i0QnDlN/BYlM=; fh=KSiWrCR7xjqa6nMnB8EyauKJbY8zFKZ3kSm6JhLxeok=; b=R90cQ6yDKMsKZBmSt+hlRpV1sF2ak68hiboCgAWyoA2Ck4sHLOqofwMTqGTn0+NpTi MMXKHK1onZmp6oAMHfnVdl3ub3wjbUgrt6yYS9jMVEyLIEn18fUCrW4AWmo1893oFZCq lk3cVaCDXYidpPeNNP07JMMST0FmyvfBcllqR5qkhm0i8FaXZbyzwsUrGoH6hulId4VM 41ww5gGL138j++nS4Zql88Ncc99W7X6nlwvro0vzovixO6TjqDh/UOmMNNGUWTBDEJU8 O3ndMnsMfrAd66eAP0PdZuWMCfJki5jnVq53/jc2ujZfOiePUODze/pe4Vpkk2DXfyQ0 dJ6w==; 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-200361-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-200361-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d2e1a72fcca58-70268f1e0d4si1379430b3a.202.2024.06.04.02.44.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 02:44:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-200361-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; 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-200361-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-200361-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id C9CAC289B91 for ; Tue, 4 Jun 2024 09:34:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 46AC3145A09; Tue, 4 Jun 2024 09:32:53 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7E2DD1459EA; Tue, 4 Jun 2024 09:32:51 +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=1717493572; cv=none; b=KlgimZqJXPGBt5sIQCdsCUovQ3B9jkJma0lDzZ3saZgu5EPF3FlRS8cusyq3z/Bq1g2u6newgNfZCYs+C2sUbGKf6NQPYW0sKuqdJrt6BAe1G4V2IodU0VMxj4txg2/VehXrv0GOMelLeEviQxrvTYC2KZTynW09LttJ0RrT56I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717493572; c=relaxed/simple; bh=N+BgYVByzMrgGeiS8IAeDM2+IOiN9MtSfjmOFc+R2H8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=uGRM6wVL46PHKKKwQnSDQjiBJ/cGexsastSJBM5e6JeHan2Xmh9iY3P/3PhfLARzcI6m05/CBH2iF8UH8YR1LdaCmnicjXXnK/dx62MB5VpCMUBetjxbTJEQRZpAfKhPYAIZg6y1rKWXxksexK3JHzDpEEZlJuASoChfI0WfPjU= 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 538ED1063; Tue, 4 Jun 2024 02:33:15 -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 46F0F3F762; Tue, 4 Jun 2024 02:32:49 -0700 (PDT) From: Leo Yan To: Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , James Clark , Ian Rogers , "Liang, Kan" , Nick Terrell , Thomas Richter , Changbin Du , Fangrui Song , "Mateusz Kowalczyk" , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org Cc: Leo Yan Subject: [PATCH v1 6/6] perf: build: Link lib 'zstd' for static build Date: Tue, 4 Jun 2024 10:32:23 +0100 Message-Id: <20240604093223.1934236-7-leo.yan@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240604093223.1934236-1-leo.yan@arm.com> References: <20240604093223.1934236-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 18aa6e654804..80c237890a06 100644 --- a/tools/build/feature/Makefile +++ b/tools/build/feature/Makefile @@ -159,7 +159,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 e8d3713b081c..acd405bc46de 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