Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I was trying to install perf on slackware 13.1 When I first ran make at /usr/src/linux/tools/perf I got some errors. And I found this patch http://www.valimar.it/repo/linux/perf_fix-2.6.33.patch And when I ran make again, it issued some different errors as below. But I've already installed perl package perl-5.10.1-i486-1

libperf.a(trace-event-perl.o): In function `define_flag_value':
/usr/src/linux-2.6.33.4/tools/perf/util/trace-event-perl.c:125: undefined reference to `Perl_push_scope'
/usr/src/linux-2.6.33.4/tools/perf/util/trace-event-perl.c:126: undefined reference to `Perl_save_int'
/usr/src/linux-2.6.33.4/tools/perf/util/trace-event-perl.c:129: undefined reference to `Perl_newSVpv'
/usr/src/linux-2.6.33.4/tools/perf/util/trace-event-perl.c:129: undefined reference to `Perl_sv_2mortal'
/usr/src/linux-2.6.33.4/tools/perf/util/trace-event-perl.c:130: undefined reference to `Perl_newSVpv'
/usr/src/linux-2.6.33.4/tools/perf/util/trace-event-perl.c:130: undefined reference to `Perl_sv_2mortal'
/usr/src/linux-2.6.33.4/tools/perf/util/trace-event-perl.c:131: undefined reference to `Perl_newSVuv'
/usr/src/linux-2.6.33.4/tools/perf/util/trace-event-perl.c:131: undefined reference to `Perl_sv_2mortal'
/usr/src/linux-2.6.33.4/tools/perf/util/trace-event-perl.c:132: undefined reference to `Perl_newSVpv'
/usr/src/linux-2.6.33.4/tools/perf/util/trace-event-perl.c:132: undefined reference to `Perl_sv_2mortal'
/usr/src/linux-2.6.33.4/tools/perf/util/trace-event-perl.c:135: undefined reference to `Perl_get_cv'
/usr/src/linux-2.6.33.4/tools/perf/util/trace-event-perl.c:136: undefined reference to `Perl_call_pv'
/usr/src/linux-2.6.33.4/tools/perf/util/trace-event-perl.c:139: undefined reference to `Perl_free_tmps'
/usr/src/linux-2.6.33.4/tools/perf/util/trace-event-perl.c:132: undefined reference to `Perl_stack_grow'
/usr/src/linux-2.6.33.4/tools/perf/util/trace-event-perl.c:131: undefined reference to `Perl_stack_grow'
/usr/src/linux-2.6.33.4/tools/perf/util/trace-event-perl.c:130: undefined reference to `Perl_stack_grow'
/usr/src/linux-2.6.33.4/tools/perf/util/trace-event-perl.c:129: undefined reference to `Perl_stack_grow'
/usr/src/linux-2.6.33.4/tools/perf/util/trace-event-perl.c:127: undefined reference to `Perl_markstack_grow'
share|improve this question

migrated from stackoverflow.com Jun 4 '11 at 20:31

This question came from our site for professional and enthusiast programmers.

1 Answer 1

Finally I solved this problem by just comment out the following line in Makefile

#ifndef NO_LIBPERL
#PERL_EMBED_LDOPTS = `perl -MExtUtils::Embed -e ldopts 2>/dev/null`
#PERL_EMBED_CCOPTS = `perl -MExtUtils::Embed -e ccopts 2>/dev/null`
#endif

It looked like MExtUtils::Embed generate wrong LDFLAGS for libperl I also found that slackware perl package only provide the static lib libperl.a

share|improve this answer
    
Thanks. This allowed me to solve my isse with perf as well (though on Gentoo rather than Slackware, with kernel2.6.36-gentoo-r4)... though instead of modifying Makefile I just ran make with NO_LIBPERL=1 (though I do have libperl.so; I don't know why those errors either). –  Jakub Narębski Jun 22 '11 at 18:02

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.