All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Makefile.perf: make python module depend on traceevent
@ 2015-06-18 12:51 riku.voipio
  2015-06-26 11:17 ` Riku Voipio
  0 siblings, 1 reply; 2+ messages in thread
From: riku.voipio @ 2015-06-18 12:51 UTC (permalink / raw)
  To: linux-kbuild, linux-kernel
  Cc: acme, mingo, a.p.zijlstra, hekuang, Riku Voipio

From: Riku Voipio <riku.voipio@linaro.org>

Building python module might fail if libtraceevent-dynamic-list
hasn't been built before:

to LDFLAGS:

  GEN      python/perf.so
/usr/bin/ld: cannot open linker script file /x/tools/lib/traceevent/libtraceevent-dynamic-list: No such file or directory
collect2: error: ld returned 1 exit status
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
cp: cannot stat ?python_ext_build/lib/perf.so?: No such file or directory

Add explicit Makefile dependency to make sure libtraceevent-dynamic-list
is built before.

Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
---
 tools/perf/Makefile.perf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index b1dfcd8..66045d0 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -188,7 +188,7 @@ export PYTHON_EXTBUILD_LIB PYTHON_EXTBUILD_TMP
 python-clean := $(call QUIET_CLEAN, python) $(RM) -r $(PYTHON_EXTBUILD) $(OUTPUT)python/perf.so
 
 PYTHON_EXT_SRCS := $(shell grep -v ^\# util/python-ext-sources)
-PYTHON_EXT_DEPS := util/python-ext-sources util/setup.py $(LIBTRACEEVENT) $(LIBAPI)
+PYTHON_EXT_DEPS := util/python-ext-sources util/setup.py $(LIBTRACEEVENT) $(LIBTRACEEVENT_DYNAMIC_LIST) $(LIBAPI)
 
 $(OUTPUT)python/perf.so: $(PYTHON_EXT_SRCS) $(PYTHON_EXT_DEPS)
 	$(QUIET_GEN)CFLAGS='$(CFLAGS)' $(PYTHON_WORD) util/setup.py \
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Makefile.perf: make python module depend on traceevent
  2015-06-18 12:51 [PATCH] Makefile.perf: make python module depend on traceevent riku.voipio
@ 2015-06-26 11:17 ` Riku Voipio
  0 siblings, 0 replies; 2+ messages in thread
From: Riku Voipio @ 2015-06-26 11:17 UTC (permalink / raw)
  To: linux-kbuild; +Cc: acme, hekuang, wangnan0

On 18 June 2015 at 15:51,  <riku.voipio@linaro.org> wrote:
> From: Riku Voipio <riku.voipio@linaro.org>
>
> Building python module might fail if libtraceevent-dynamic-list
> hasn't been built before:
>
> to LDFLAGS:
>
>   GEN      python/perf.so
> /usr/bin/ld: cannot open linker script file /x/tools/lib/traceevent/libtraceevent-dynamic-list: No such file or directory
> collect2: error: ld returned 1 exit status
> error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
> cp: cannot stat ?python_ext_build/lib/perf.so?: No such file or directory
>
> Add explicit Makefile dependency to make sure libtraceevent-dynamic-list
> is built before.

Forget this broken patch, the correct patch has already been applied:

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/tools/perf/Makefile.perf?id=5d618324dd4442d20dbdb039176787199ba2f12b

perf tools: Move libtraceevent dynamic list to separated LDFLAGS variable

Riku

> ---
>  tools/perf/Makefile.perf | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
> index b1dfcd8..66045d0 100644
> --- a/tools/perf/Makefile.perf
> +++ b/tools/perf/Makefile.perf
> @@ -188,7 +188,7 @@ export PYTHON_EXTBUILD_LIB PYTHON_EXTBUILD_TMP
>  python-clean := $(call QUIET_CLEAN, python) $(RM) -r $(PYTHON_EXTBUILD) $(OUTPUT)python/perf.so
>
>  PYTHON_EXT_SRCS := $(shell grep -v ^\# util/python-ext-sources)
> -PYTHON_EXT_DEPS := util/python-ext-sources util/setup.py $(LIBTRACEEVENT) $(LIBAPI)
> +PYTHON_EXT_DEPS := util/python-ext-sources util/setup.py $(LIBTRACEEVENT) $(LIBTRACEEVENT_DYNAMIC_LIST) $(LIBAPI)
>
>  $(OUTPUT)python/perf.so: $(PYTHON_EXT_SRCS) $(PYTHON_EXT_DEPS)
>         $(QUIET_GEN)CFLAGS='$(CFLAGS)' $(PYTHON_WORD) util/setup.py \
> --
> 2.1.4
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-06-26 11:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-18 12:51 [PATCH] Makefile.perf: make python module depend on traceevent riku.voipio
2015-06-26 11:17 ` Riku Voipio

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.