Skip to contentSkip to conversation

perf DEBUG=1 build fails due to perl bindings

DISCUSSION Arnaldo Carvalho de Melo 2 participants 3 messages Dec 6, 2009 – Dec 7, 2009 perf events

lore
Share & tools
lore
#0 lore raw

[acme@ana linux-2.6-tip]$ make DEBUG=1 -j3 -C tools/perf/ install
make: Entering directory `/home/acme/git/linux-2.6-tip/tools/perf'
LINK perf
libperf.a(trace-event-perl.o): In function `xs_init':
/home/acme/git/linux-2.6-tip/tools/perf/util/trace-event-perl.c:43: undefined reference to boot_Perf__Trace__Context' /home/acme/git/linux-2.6-tip/tools/perf/util/trace-event-perl.c:45: undefined reference to boot_DynaLoader'
collect2: ld returned 1 exit status
make: *** [perf] Error 1
make: Leaving directory `/home/acme/git/linux-2.6-tip/tools/perf'
[acme@ana linux-2.6-tip]$

#1 lore raw
Quoted 10 lines · Arnaldo Carvalho de Melo

[acme@ana linux-2.6-tip]$ make DEBUG=1 -j3 -C tools/perf/ install
make: Entering directory `/home/acme/git/linux-2.6-tip/tools/perf'
LINK perf
libperf.a(trace-event-perl.o): In function `xs_init':
/home/acme/git/linux-2.6-tip/tools/perf/util/trace-event-perl.c:43: undefined reference to boot_Perf__Trace__Context' /home/acme/git/linux-2.6-tip/tools/perf/util/trace-event-perl.c:45: undefined reference to boot_DynaLoader'
collect2: ld returned 1 exit status
make: *** [perf] Error 1
make: Leaving directory `/home/acme/git/linux-2.6-tip/tools/perf'
[acme@ana linux-2.6-tip]$

Hi,

This patch should fix it.

Thanks,

Tom

[PATCH] perf trace/scripting: Fix compile err when libperl not installed

When I added the xs callbacks into perf, I forgot to re-check the no-libperl case. This patch fixes the undefined reference error for that.

---
 tools/perf/util/trace-event-perl.c |    3 ---
 tools/perf/util/trace-event-perl.h |    4 ++++
 2 files changed, 4 insertions(+), 3 deletions(-)
tools/perf/util/trace-event-perl.c +0 -3
index 51e833f..59564b2 100644
@@ -32,9 +32,6 @@
 
 void xs_init(pTHX);
 
-void boot_Perf__Trace__Context(pTHX_ CV *cv);
-void boot_DynaLoader(pTHX_ CV *cv);
-
 void xs_init(pTHX)
 {
 	const char *file = __FILE__;
tools/perf/util/trace-event-perl.h +4 -0
index 8fe0d86..e88fb26 100644
@@ -34,9 +34,13 @@ typedef int INTERP;
 #define dXSUB_SYS
 #define pTHX_
 static inline void newXS(const char *a, void *b, const char *c) {}
+static void boot_Perf__Trace__Context(pTHX_ CV *cv) {}
+static void boot_DynaLoader(pTHX_ CV *cv) {}
 #else
 #include <EXTERN.h>
 #include <perl.h>
+void boot_Perf__Trace__Context(pTHX_ CV *cv);
+void boot_DynaLoader(pTHX_ CV *cv);
 typedef PerlInterpreter * INTERP;
 #endif
 
Signature · 1 line
1.6.4.GIT
#2 lore raw

[tip:perf/urgent] perf trace/scripting: Fix compile error when libperl not installed

Commit-ID:  3a9a0beba2913edaae39ff8b4645fee10c3acf37
Gitweb:     http://git.kernel.org/tip/3a9a0beba2913edaae39ff8b4645fee10c3acf37
Author:     Tom Zanussi <[email protected]>
AuthorDate: Sun, 6 Dec 2009 20:41:52 -0600
Committer:  Ingo Molnar <[email protected]>
CommitDate: Mon, 7 Dec 2009 06:31:37 +0100

perf trace/scripting: Fix compile error when libperl not installed

When I added the xs callbacks into perf, I forgot to re-check the no-libperl case. This patch fixes the undefined reference error for that.

Cc Frederic Weisbecker <[email protected]>
Cc Mike Galbraith <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Paul Mackerras <[email protected]>

LKML-Reference: <1260153712.6564.4.camel@tropicana>

---
 tools/perf/util/trace-event-perl.c |    3 ---
 tools/perf/util/trace-event-perl.h |    4 ++++
 2 files changed, 4 insertions(+), 3 deletions(-)
tools/perf/util/trace-event-perl.c +0 -3
index 51e833f..59564b2 100644
@@ -32,9 +32,6 @@
 
 void xs_init(pTHX);
 
-void boot_Perf__Trace__Context(pTHX_ CV *cv);
-void boot_DynaLoader(pTHX_ CV *cv);
-
 void xs_init(pTHX)
 {
 	const char *file = __FILE__;
tools/perf/util/trace-event-perl.h +4 -0
index 8fe0d86..e88fb26 100644
@@ -34,9 +34,13 @@ typedef int INTERP;
 #define dXSUB_SYS
 #define pTHX_
 static inline void newXS(const char *a, void *b, const char *c) {}
+static void boot_Perf__Trace__Context(pTHX_ CV *cv) {}
+static void boot_DynaLoader(pTHX_ CV *cv) {}
 #else
 #include <EXTERN.h>
 #include <perl.h>
+void boot_Perf__Trace__Context(pTHX_ CV *cv);
+void boot_DynaLoader(pTHX_ CV *cv);
 typedef PerlInterpreter * INTERP;
 #endif