From: Tarik T. <tta...@gm...> - 2013-01-12 21:26:39
|
Hi, I am using Debian squeeze with linux kernel version 2.6.32-5-686-bigmem on Intel i5 core processor. First I installed linux headers: root@kuca:/home/tarik/Desktop/oprofile-0.9.8# apt-get install linux-headers-2.6.32-5-686-bigmem Reading package lists... Done Building dependency tree Reading state information... Done linux-headers-2.6.32-5-686-bigmem is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. and after that did ./configure --with-perf-events and everything went just fine. Problem appears when executing make command: make[2]: Entering directory `/home/tarik/Desktop/oprofile-0.9.8/libperf_events' g++ -DHAVE_CONFIG_H -I. -I.. -I ../libabi -I ../libutil -I ../libutil++ -I ../libop -I ../libdb -I ../libperf_events -g -O2 -MT operf_utils.o -MD -MP -MF .deps/operf_utils.Tpo -c -o operf_utils.o operf_utils.cpp operf_utils.cpp: In function ‘void __handle_sample_event(event_t*, u64)’: operf_utils.cpp:735: error: ‘PERF_RECORD_MISC_GUEST_KERNEL’ was not declared in this scope operf_utils.cpp:738: error: ‘PERF_RECORD_MISC_GUEST_USER’ was not declared in this scope make[2]: *** [operf_utils.o] Error 1 make[2]: Leaving directory `/home/tarik/Desktop/oprofile-0.9.8/libperf_events' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/tarik/Desktop/oprofile-0.9.8' make: *** [all] Error 2 I read somewhere that this happens because linux headers are not installed but as you can see that is not the case here. I am grateful on any help. Tarik |
From: Maynard J. <may...@us...> - 2013-01-14 15:29:54
|
On 01/12/2013 03:26 PM, Tarik Tankovic wrote: > Hi, > > I am using Debian squeeze with linux kernel version > 2.6.32-5-686-bigmem on Intel i5 core processor. > > First I installed linux headers: > > root@kuca:/home/tarik/Desktop/oprofile-0.9.8# apt-get install > linux-headers-2.6.32-5-686-bigmem > Reading package lists... Done > Building dependency tree > Reading state information... Done > linux-headers-2.6.32-5-686-bigmem is already the newest version. > 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. > > and after that did ./configure --with-perf-events and everything went just fine. There is no configure option named '--with-perf-events'. But since you have the kernel headers package installed, no special options should be needed, so your configure command would have completed OK -- just giving a warning about the unrecognized option. The compile error below was fixed upstream a couple months after 0.9.8 was released. Here's the commit message: commit dbe24f5f0d98b1fe5517d2b137b4c59766e536ad Author: Maynard Johnson <may...@us...> Date: Mon Nov 19 15:16:37 2012 -0600 Handle early perf_events kernel without PERF_RECORD_MISC_GUEST* macros In very early versions of perf_events kernel subsystem, the PERF_RECORD_MISC_GUEST_KERNEL and PERF_RECORD_MISC_GUEST_USER macros (in perf_event.h) were not yet defined. This patch adds a configure check to determine when it's OK for source code to refer to those macros. This patch also does some minor cleanup of the configure script help and warning messages relating to the --with-kernel option. Signed-off-by: Maynard Johnson <may...@us...> configure.ac | 32 ++++++++++++++++++++++++++------ libperf_events/operf_utils.cpp | 2 ++ 2 files changed, 28 insertions(+), 6 deletions(-) ----------------------------------------------------------- A workaround for you (in lieu of applying the patch or checking out from the upstream git repo) is simply to comment out the case statements in operf_utils.cpp where the PERF_RECORD_MISC_GUEST* macros are used. -Maynard > > Problem appears when executing make command: > > make[2]: Entering directory `/home/tarik/Desktop/oprofile-0.9.8/libperf_events' > g++ -DHAVE_CONFIG_H -I. -I.. -I ../libabi -I ../libutil -I > ../libutil++ -I ../libop -I ../libdb -I ../libperf_events -g -O2 > -MT operf_utils.o -MD -MP -MF .deps/operf_utils.Tpo -c -o > operf_utils.o operf_utils.cpp > operf_utils.cpp: In function ‘void __handle_sample_event(event_t*, u64)’: > operf_utils.cpp:735: error: ‘PERF_RECORD_MISC_GUEST_KERNEL’ was not > declared in this scope > operf_utils.cpp:738: error: ‘PERF_RECORD_MISC_GUEST_USER’ was not > declared in this scope > make[2]: *** [operf_utils.o] Error 1 > make[2]: Leaving directory `/home/tarik/Desktop/oprofile-0.9.8/libperf_events' > make[1]: *** [all-recursive] Error 1 > make[1]: Leaving directory `/home/tarik/Desktop/oprofile-0.9.8' > make: *** [all] Error 2 > > I read somewhere that this happens because linux headers are not > installed but as you can see that is not the case here. > > I am grateful on any help. > > Tarik > > ------------------------------------------------------------------------------ > Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, > MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current > with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft > MVPs and experts. SALE $99.99 this month only -- learn more at: > http://p.sf.net/sfu/learnmore_122912 > _______________________________________________ > oprofile-list mailing list > opr...@li... > https://lists.sourceforge.net/lists/listinfo/oprofile-list > |