lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 12 Dec 2022 11:28:54 -0300
From:   Arnaldo Carvalho de Melo <acme@...nel.org>
To:     Ian Rogers <irogers@...gle.com>
Cc:     Athira Rajeev <atrajeev@...ux.vnet.ibm.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Mark Rutland <mark.rutland@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Jiri Olsa <jolsa@...nel.org>,
        Namhyung Kim <namhyung@...nel.org>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        LKML <linux-kernel@...r.kernel.org>,
        linux-perf-users@...r.kernel.org, bpf@...r.kernel.org,
        Stephane Eranian <eranian@...gle.com>
Subject: Re: [PATCH 2/3] perf build: Use libtraceevent from the system

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@...lbox 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@...lbox perf]$ perf test python
 19: 'import perf' in python                                         : Ok
⬢[acme@...lbox perf]$

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ