From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org, Jiri Olsa <jolsa@redhat.com>,
Jiri Olsa <jolsa@kernel.org>, David Ahern <dsahern@gmail.com>,
Namhyung Kim <namhyung@kernel.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
stable@vger.kernel.org, #@infradead.org, v4.2+@infradead.org,
Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: [PATCH 01/11] perf tools: Fix python extension build
Date: Mon, 29 Feb 2016 16:21:57 -0300 [thread overview]
Message-ID: <1456773727-3005-2-git-send-email-acme@kernel.org> (raw)
In-Reply-To: <1456773727-3005-1-git-send-email-acme@kernel.org>
From: Jiri Olsa <jolsa@redhat.com>
The util/python-ext-sources file contains source files required to build
the python extension relative to $(srctree)/tools/perf,
Such a file path $(FILE).c is handed over to the python extension build
system, which builds the final object in the
$(PYTHON_EXTBUILD)/tmp/$(FILE).o path.
After the build is done all files from $(PYTHON_EXTBUILD)lib/ are
carried as the result binaries.
Above system fails when we add source file relative to ../lib, which we
do for:
../lib/bitmap.c
../lib/find_bit.c
../lib/hweight.c
../lib/rbtree.c
All above objects will be built like:
$(PYTHON_EXTBUILD)/tmp/../lib/bitmap.c
$(PYTHON_EXTBUILD)/tmp/../lib/find_bit.c
$(PYTHON_EXTBUILD)/tmp/../lib/hweight.c
$(PYTHON_EXTBUILD)/tmp/../lib/rbtree.c
which accidentally happens to be final library path:
$(PYTHON_EXTBUILD)/lib/
Changing setup.py to pass full paths of source files to Extension build
class and thus keep all built objects under $(PYTHON_EXTBUILD)tmp
directory.
Reported-by: Jeff Bastian <jbastian@redhat.com>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Tested-by: Josh Boyer <jwboyer@fedoraproject.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: stable@vger.kernel.org # v4.2+
Link: http://lkml.kernel.org/r/20160227201350.GB28494@krava.redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/setup.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tools/perf/util/setup.py b/tools/perf/util/setup.py
index 1833103768cb..c8680984d2d6 100644
--- a/tools/perf/util/setup.py
+++ b/tools/perf/util/setup.py
@@ -22,6 +22,7 @@ cflags = getenv('CFLAGS', '').split()
# switch off several checks (need to be at the end of cflags list)
cflags += ['-fno-strict-aliasing', '-Wno-write-strings', '-Wno-unused-parameter' ]
+src_perf = getenv('srctree') + '/tools/perf'
build_lib = getenv('PYTHON_EXTBUILD_LIB')
build_tmp = getenv('PYTHON_EXTBUILD_TMP')
libtraceevent = getenv('LIBTRACEEVENT')
@@ -30,6 +31,9 @@ libapikfs = getenv('LIBAPI')
ext_sources = [f.strip() for f in file('util/python-ext-sources')
if len(f.strip()) > 0 and f[0] != '#']
+# use full paths with source files
+ext_sources = map(lambda x: '%s/%s' % (src_perf, x) , ext_sources)
+
perf = Extension('perf',
sources = ext_sources,
include_dirs = ['util/include'],
--
2.5.0
next prev parent reply other threads:[~2016-02-29 19:22 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-29 19:21 [GIT PULL 00/11] perf/core improvements and fixes Arnaldo Carvalho de Melo
2016-02-29 19:21 ` Arnaldo Carvalho de Melo [this message]
2016-02-29 19:21 ` [PATCH 02/11] perf trace: Check and discard not only 'nr' but also '__syscall_nr' Arnaldo Carvalho de Melo
2016-02-29 19:21 ` [PATCH 03/11] tracing/syscalls: Rename "/format" tracepoint field name "nr" to "__syscall_nr: Arnaldo Carvalho de Melo
2016-02-29 19:22 ` [PATCH 04/11] tools lib traceevent: Split pevent_print_event() into specific functionality functions Arnaldo Carvalho de Melo
2016-02-29 19:22 ` [PATCH 05/11] perf stat: Check existence of frontend/backed stalled cycles Arnaldo Carvalho de Melo
2016-03-03 8:28 ` Ingo Molnar
2016-03-03 12:49 ` Arnaldo Carvalho de Melo
2016-03-03 12:50 ` Arnaldo Carvalho de Melo
2016-02-29 19:22 ` [PATCH 06/11] perf data: Support converting data from bpf_perf_event_output() Arnaldo Carvalho de Melo
2016-02-29 19:22 ` [PATCH 07/11] perf data: Explicitly set byte order for integer types Arnaldo Carvalho de Melo
2016-02-29 19:22 ` [PATCH 08/11] perf record: Use WARN_ONCE to replace 'if' condition Arnaldo Carvalho de Melo
2016-02-29 19:22 ` [PATCH 09/11] perf record: Extract synthesize code to record__synthesize() Arnaldo Carvalho de Melo
2016-02-29 19:22 ` [PATCH 10/11] perf record: Introduce record__finish_output() to finish a perf.data Arnaldo Carvalho de Melo
2016-02-29 19:22 ` [PATCH 11/11] perf record: Ensure return non-zero rc when mmap fail Arnaldo Carvalho de Melo
2016-03-03 8:21 ` [GIT PULL 00/11] perf/core improvements and fixes Ingo Molnar
2016-03-03 9:15 ` Jiri Olsa
2016-03-03 9:53 ` [PATCH] perf tools: Fix locale handling in pmu parsing Jiri Olsa
2016-03-03 16:20 ` Andi Kleen
2016-03-05 8:14 ` [tip:perf/core] " tip-bot for Jiri Olsa
2016-03-08 13:23 ` Ingo Molnar
2016-03-08 18:42 ` [PATCH][perf/core] perf tools: Omit unnecessary cast in perf_pmu__parse_scale Jiri Olsa
2016-03-09 13:43 ` Arnaldo Carvalho de Melo
2016-03-11 8:46 ` [tip:perf/core] " tip-bot for Jiri Olsa
2016-03-03 14:38 ` [GIT PULL 00/11] perf/core improvements and fixes Arnaldo Carvalho de Melo
2016-03-05 8:08 ` Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1456773727-3005-2-git-send-email-acme@kernel.org \
--to=acme@kernel.org \
--cc=#@infradead.org \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--cc=dsahern@gmail.com \
--cc=jolsa@kernel.org \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=stable@vger.kernel.org \
--cc=v4.2+@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).