Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp1051034rwo; Wed, 2 Aug 2023 08:04:23 -0700 (PDT) X-Google-Smtp-Source: APBJJlErRXcZz+FjZJu/zDnq3yMrl+TOX74lTHjERymm2NnBvLCfiNc0QwMs7wJ5gx00E/G8bQnl X-Received: by 2002:aa7:c582:0:b0:521:d2ab:e4df with SMTP id g2-20020aa7c582000000b00521d2abe4dfmr7699178edq.19.1690988662735; Wed, 02 Aug 2023 08:04:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690988662; cv=none; d=google.com; s=arc-20160816; b=xEd9hVxs+lw60msuOULjEsr8ySdXQiWyDChwn+c8gpnWmpySdV4Qowk1DoV7jnFltd KAobgA46d0qO0FX5sGvelgc+nBqAhooMAflZ1HCPEndg/OOWkU1Tj09Hg+9sFicLYoWw E0QBJWQDswVlgx6GNogm3/pjDo+4DlZ/PA6NAh6EgnQ9ALn/Qgk7depi3zzU9seojlxT z7CEiXaWuLbTGxxlMeY6OBQQStkOq6FxkcrX6ZtkZbt8skcDvrmD7eeEfVa8YYmwhG+n ns2OUsUVFNV0v4Dv93RO5HiLXii6PvJigut2fzm2IzOi2PDaKTrkb3yOBkBprPKmliGa 5dSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=XGilR8q5ULUvtV4EBo1jkvDij/oTxnbItho4zvJ9Rmg=; fh=CGXAaOA1rfwES3fgSVpiALGn6ik9Rx5IzkT4oFcKTck=; b=NBxMjzlb+wgWHprefzGrvcDDh9FOuJ2bOMIQeqEd7RScoG4RuDqfg7FW0PUnonlnXD C4Ul2lm03rXH1qYVtw2oq5nrelyZk4I3IVRKUKojQ8EOJYWuDj9zsMezUBFD8ZA7StBX yHO+R+g4pFBsyPDAo8bGhg/wGDCW3D+U3aMkQc6YaaTfYl+jjQlpXj8BZmyEbCN3sWeO 2hWs2EOPHHv9s35IZZeL0N5j23FIjLxJTF6r+B4nq1P+L0oBS5vxd3nBN4O9FaGh/4+r PxsaqENCo/V/FKDkKN0zkNPuJ020ALBCE+QAuwBG4vlXia5ZHqzf8OKUuRP0MRc+kiLn kgKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MzdqEgSP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r2-20020aa7da02000000b0051ff2b7561fsi9934476eds.140.2023.08.02.08.03.53; Wed, 02 Aug 2023 08:04:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MzdqEgSP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233416AbjHBO2g (ORCPT + 99 others); Wed, 2 Aug 2023 10:28:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34650 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232733AbjHBO2f (ORCPT ); Wed, 2 Aug 2023 10:28:35 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3CFC71723; Wed, 2 Aug 2023 07:28:27 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C65D0619B3; Wed, 2 Aug 2023 14:28:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F1B44C433C7; Wed, 2 Aug 2023 14:28:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690986506; bh=Z4JOTOXE88xHck3RMo4XJjkzZ+TXGkjviveE+ctMbxc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=MzdqEgSPFmXZJINCHiAYXr0aqydeYRU8nvXGVdAKvsnZo77OkFFdGtgiUWLr/2G0y JL6tTyhQJE8LIw30oRey+gJqdzTs1u04FRYAJrkAdw4mPVs3LYXlYMaQULzIFD4LxH PY7hQX0OQcot636XJRSxAuK7S8hXxslLn7rML6oLggu3fxH3kHKMFXh8chYll1dZmq Gz3hN2BujhBdTJvkOfElcafRoCHLmTyXRFq9r0vYHnmPaOYQvZPuUzCK7faTLMh4k7 9LnxAXvF5VBYVhXt8t6FeB0BbGNo+QHtR3EWcsIaZ6DoekDyGfGRq2MOYDgvxBRa7i BSdiImK1bw2yA== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 6A0054012D; Wed, 2 Aug 2023 11:28:23 -0300 (-03) Date: Wed, 2 Aug 2023 11:28:23 -0300 From: Arnaldo Carvalho de Melo To: Thomas Richter Cc: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, irogers@google.com, wangnan0@huawei.com, jolsa@kernel.org, svens@linux.ibm.com, gor@linux.ibm.com, sumanthk@linux.ibm.com, hca@linux.ibm.com Subject: Re: [PATCH 1/2 Resend] perf build: Update feature check for clang and llvm Message-ID: References: <20230725150347.3479291-1-tmricht@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230725150347.3479291-1-tmricht@linux.ibm.com> X-Url: http://acmel.wordpress.com X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Tue, Jul 25, 2023 at 05:03:46PM +0200, Thomas Richter escreveu: > Perf build auto-detects features and packages already installed > for its build. This is done in directory tools/build/feature. This > directory contains small sample programs. When they successfully > compile the necessary prereqs in form of libraries and header > files are present. > > Such a check is also done for llvm and clang. And the checks fail. > > Fix this and update to the latest C++ standard and use the > new library provided by clang (which contains new packaging) > see this link for reference: > https://fedoraproject.org/wiki/Changes/Stop-Shipping-Individual-Component-Libraries-In-clang-lib-Package > > Output before: > # rm -f ./test-clang.bin; make test-clang.bin; ./test-clang.bin; \ > ll test-clang.make.output > g++ -MD -Wall -Werror -o test-clang.bin test-clang.cpp \ > > test-clang.make.output 2>&1 -std=gnu++14 \ > -I/usr/include \ > -L/usr/lib64 \ > -Wl,--start-group -lclangBasic -lclangDriver \ > -lclangFrontend -lclangEdit -lclangLex \ > -lclangAST -Wl,--end-group \ > -lLLVM-16 \ > \ > > test-clang.make.output 2>&1 > make: *** [Makefile:356: test-clang.bin] Error 1 > -bash: ./test-clang.bin: No such file or directory > -rw-r--r--. 1 root root 252041 Jul 12 09:56 test-clang.make.output > # > > File test-clang.make.output contains many lines of unreferenced > symbols. > > Output after: > # rm -f ./test-clang.bin; make test-clang.bin; ./test-clang.bin; \ > cat test-clang.make.output > g++ -MD -Wall -Werror -o test-clang.bin test-clang.cpp \ > > test-clang.make.output 2>&1 -std=gnu++17 \ > -I/usr/include \ > -L/usr/lib64 \ > -Wl,--start-group -lclang-cpp -Wl,--end-group \ > -lLLVM-16 \ > \ > > test-clang.make.output 2>&1 > # Thanks, tested and applied. Added some notes about needing to have 'llvm-devel' and 'clang-devel' installed to do the tests. - arnaldo > Signed-off-by: Thomas Richter > --- > tools/build/feature/Makefile | 10 ++++------ > 1 file changed, 4 insertions(+), 6 deletions(-) > > diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile > index 2cd6dbbee088..3184f387990a 100644 > --- a/tools/build/feature/Makefile > +++ b/tools/build/feature/Makefile > @@ -340,7 +340,7 @@ $(OUTPUT)test-jvmti-cmlr.bin: > $(BUILD) > > $(OUTPUT)test-llvm.bin: > - $(BUILDXX) -std=gnu++14 \ > + $(BUILDXX) -std=gnu++17 \ > -I$(shell $(LLVM_CONFIG) --includedir) \ > -L$(shell $(LLVM_CONFIG) --libdir) \ > $(shell $(LLVM_CONFIG) --libs Core BPF) \ > @@ -348,17 +348,15 @@ $(OUTPUT)test-llvm.bin: > > $(@:.bin=.make.output) 2>&1 > > $(OUTPUT)test-llvm-version.bin: > - $(BUILDXX) -std=gnu++14 \ > + $(BUILDXX) -std=gnu++17 \ > -I$(shell $(LLVM_CONFIG) --includedir) \ > > $(@:.bin=.make.output) 2>&1 > > $(OUTPUT)test-clang.bin: > - $(BUILDXX) -std=gnu++14 \ > + $(BUILDXX) -std=gnu++17 \ > -I$(shell $(LLVM_CONFIG) --includedir) \ > -L$(shell $(LLVM_CONFIG) --libdir) \ > - -Wl,--start-group -lclangBasic -lclangDriver \ > - -lclangFrontend -lclangEdit -lclangLex \ > - -lclangAST -Wl,--end-group \ > + -Wl,--start-group -lclang-cpp -Wl,--end-group \ > $(shell $(LLVM_CONFIG) --libs Core option) \ > $(shell $(LLVM_CONFIG) --system-libs) \ > > $(@:.bin=.make.output) 2>&1 > -- > 2.41.0 > -- - Arnaldo