Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp6832865rwb; Mon, 12 Dec 2022 07:01:30 -0800 (PST) X-Google-Smtp-Source: AA0mqf5m1VxgbcxJlA7scduWUEFOOwV2hqGb52y5JioypanSLsHGf2V3I7c0A84CywtR1nHXXcbm X-Received: by 2002:a17:902:e952:b0:189:dc3:ee9c with SMTP id b18-20020a170902e95200b001890dc3ee9cmr18655252pll.65.1670857289953; Mon, 12 Dec 2022 07:01:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670857289; cv=none; d=google.com; s=arc-20160816; b=cdUQ2L6p8qlCKqRgp3XJVA+vMlxinFZAlpBGF5POuW+GAwKucLM7rFvNjxeCO8CJ1A 5ZynGj65Y+Yg6RPSNqfLEr77P9Mc8XO+OmeX351KUKCg1cC6HPbHFXxuqCT0kdq+0X6T 1c+lVOFx+LfM48HxCvtupe0gndfC9ySN5uUquWm5NZfoeLDOnXMiYDfkaxdW82n6VAJ0 4877c2eowiCe25T6U5b9t6OK0bbE2xqOqaXG5BF/EU1DPkUjP2Nz4A/vd3Q8nbLYshpx 217o1Vj7fR4JmNjE5bDX5GJdJOoJaUMmiRulIbAgAEElaxEuB9cn+bO4zxjAyiyBcz27 bKiw== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=fNMCCgcrdHUNPrYmxLghQEAnuyp1xfH9cqvkKmRHxVo=; b=r9KK+AuxcVA5N+3nl09M8qKZQhbxJkqoj24yk22fZPIDq/gxfpUF2oHt4KYIqbQgvk MVlxOWrfo17U4Oxh2Fe0MmYrbn9GKbN5EdMM6qLW60+WkQ8r3IFTYXSz0XvmuD6oH5fO mDnCrEMxm4ODnhRY5IR3ypcjyr/tpoNCK3NaHpMz9euFrsZ6NAeI0nfayeN2ZR0roODa bMxqi8RBDBPs12DkfGID/8sikfqDxMMuP8zxqyLC7TY7rr9EHp3huYk0dA0Fp080WNt4 mmbIJbC/Rd0wC75Qzi722VFn3D1OCwcppGGF82Bvfo8fQBM2XRLeF81dhyERaGJ06tNJ uNUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Px4SvP0n; 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 a21-20020a63e855000000b004787836f4b4si10502693pgk.420.2022.12.12.07.01.16; Mon, 12 Dec 2022 07:01:29 -0800 (PST) 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=Px4SvP0n; 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 S232167AbiLLOkT (ORCPT + 76 others); Mon, 12 Dec 2022 09:40:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230015AbiLLOkR (ORCPT ); Mon, 12 Dec 2022 09:40:17 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BA26D6477; Mon, 12 Dec 2022 06:40:16 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 74402B80D8B; Mon, 12 Dec 2022 14:40:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EFDC1C433EF; Mon, 12 Dec 2022 14:40:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670856014; bh=YbnT6Yq83aqglOQM9XhLCXL9nplEN1NrykFoYmTXrZs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Px4SvP0n/u+UVqevgVZw6zjZsqclOrP42PpZL3odSfQBfoSwm0hpgKckyqK3ahv/s 5wHS6KpzvWGa4XCjXKD22ubkP80ANoeL8yIC/kSqL38LEYXvCYBFaaMbEg5YzImBAL xY9K7fnvbfmIdEiVKQER+P/cMWBOmMzJ6ca0q26H2XEmfl9o8owUb2co62nwuqZsXn AnrpIske3AX25oPefiB5JGdo7e1AQ4IAbAdzbTiqJskTLJSfU3EJKcr1dEukPUy9bP DIiySFMTMXqDdj+xb3TttFJbhOsPppanYe9dnId265bwKho37ZIKyzggUQQWot3VtD fYrMFNvNTykiA== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 86B3D4067B; Mon, 12 Dec 2022 11:28:54 -0300 (-03) Date: Mon, 12 Dec 2022 11:28:54 -0300 From: Arnaldo Carvalho de Melo To: Ian Rogers Cc: Athira Rajeev , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Nick Desaulniers , LKML , linux-perf-users@vger.kernel.org, bpf@vger.kernel.org, Stephane Eranian Subject: Re: [PATCH 2/3] perf build: Use libtraceevent from the system Message-ID: References: <36CD1041-0CAE-41C1-8086-C17854531B3E@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Url: http://acmel.wordpress.com X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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 Hi, Just added this to the mix to fix a the python binding: diff --git a/tools/perf/util/setup.py b/tools/perf/util/setup.py index 34fceda3af3a9b26..e80ffbbfacfb8cc0 100644 --- a/tools/perf/util/setup.py +++ b/tools/perf/util/setup.py @@ -63,15 +63,18 @@ libperf = getenv('LIBPERF') ext_sources = [f.strip() for f in open('util/python-ext-sources') if len(f.strip()) > 0 and f[0] != '#'] -if not '-DHAVE_LIBTRACEEVENT' in cflags: +extra_libraries = [] + +if '-DHAVE_LIBTRACEEVENT' in cflags: + extra_libraries += [ 'traceevent' ] +else: ext_sources.remove('util/trace-event.c') # use full paths with source files ext_sources = list(map(lambda x: '%s/%s' % (src_perf, x) , ext_sources)) -extra_libraries = [] if '-DHAVE_LIBNUMA_SUPPORT' in cflags: - extra_libraries = [ 'numa' ] + extra_libraries += [ 'numa' ] if '-DHAVE_LIBCAP_SUPPORT' in cflags: extra_libraries += [ 'cap' ] ⬢[acme@toolbox perf]$ ldd /tmp/build/perf/python/perf.cpython-310-x86_64-linux-gnu.so linux-vdso.so.1 (0x00007fffa59f8000) libunwind-x86_64.so.8 => /lib64/libunwind-x86_64.so.8 (0x00007fb4fde98000) libunwind.so.8 => /lib64/libunwind.so.8 (0x00007fb4fde7f000) liblzma.so.5 => /lib64/liblzma.so.5 (0x00007fb4fde54000) libtraceevent.so.1 => /lib64/libtraceevent.so.1 (0x00007fb4fde2e000) libnuma.so.1 => /lib64/libnuma.so.1 (0x00007fb4fde20000) libcap.so.2 => /lib64/libcap.so.2 (0x00007fb4fde16000) libc.so.6 => /lib64/libc.so.6 (0x00007fb4fdc00000) libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007fb4fdbe0000) /lib64/ld-linux-x86-64.so.2 (0x00007fb4fdf13000) ⬢[acme@toolbox perf]$ perf test python 19: 'import perf' in python : Ok ⬢[acme@toolbox perf]$