You need to have the libelf development package installed. Look for libpfm or elfutils.
On Tue, Jul 15, 2008 at 10:13 PM, Ioan Raicu <[EMAIL PROTECTED]> wrote: > libpfm-3.4 compiled and installed fine, but pfmon-3.4 still doesn't > compile. Its complaining that it can't find "libelf.h", but I can't seem to > locate this anywhere either. Where should this header file be? > > Thanks, > Ioan > > PS: See the error below: > > [EMAIL PROTECTED] pfmon-3.4]$ make > compiling pfmon for ia64 architecture > compiling pfmon as a shared binary > make[1]: Entering directory > `/mnt/autofs/home/iraicu/perfmon/pfmon-3.4/pfmon' > gcc -ggdb -g -Wall -Werror -D_REENTRANT -I/home/iraicu/usr/local/include > -DCONFIG_PFMON_IA64 -DPFMON_DEBUG > -DDATADIR=\"/home/iraicu/usr/local/share/pfmon\" -I. > -I/home/iraicu/usr/include/libelf -D_GNU_SOURCE -DCONFIG_PFMON_IA64 > -DPFMON_DEBUG -g -c pfmon.c > gcc -ggdb -g -Wall -Werror -D_REENTRANT -I/home/iraicu/usr/local/include > -DCONFIG_PFMON_IA64 -DPFMON_DEBUG > -DDATADIR=\"/home/iraicu/usr/local/share/pfmon\" -I. > -I/home/iraicu/usr/include/libelf -D_GNU_SOURCE -DCONFIG_PFMON_IA64 > -DPFMON_DEBUG -g -c pfmon_smpl.c > gcc -ggdb -g -Wall -Werror -D_REENTRANT -I/home/iraicu/usr/local/include > -DCONFIG_PFMON_IA64 -DPFMON_DEBUG > -DDATADIR=\"/home/iraicu/usr/local/share/pfmon\" -I. > -I/home/iraicu/usr/include/libelf -D_GNU_SOURCE -DCONFIG_PFMON_IA64 > -DPFMON_DEBUG -g -c pfmon_util.c > gcc -ggdb -g -Wall -Werror -D_REENTRANT -I/home/iraicu/usr/local/include > -DCONFIG_PFMON_IA64 -DPFMON_DEBUG > -DDATADIR=\"/home/iraicu/usr/local/share/pfmon\" -I. > -I/home/iraicu/usr/include/libelf -D_GNU_SOURCE -DCONFIG_PFMON_IA64 > -DPFMON_DEBUG -g -c pfmon_system.c > gcc -ggdb -g -Wall -Werror -D_REENTRANT -I/home/iraicu/usr/local/include > -DCONFIG_PFMON_IA64 -DPFMON_DEBUG > -DDATADIR=\"/home/iraicu/usr/local/share/pfmon\" -I. > -I/home/iraicu/usr/include/libelf -D_GNU_SOURCE -DCONFIG_PFMON_IA64 > -DPFMON_DEBUG -g -c pfmon_task.c > gcc -ggdb -g -Wall -Werror -D_REENTRANT -I/home/iraicu/usr/local/include > -DCONFIG_PFMON_IA64 -DPFMON_DEBUG > -DDATADIR=\"/home/iraicu/usr/local/share/pfmon\" -I. > -I/home/iraicu/usr/include/libelf -D_GNU_SOURCE -DCONFIG_PFMON_IA64 > -DPFMON_DEBUG -g -c pfmon_symbols.c > pfmon_symbols.c:29:20: libelf.h: No such file or directory > pfmon_symbols.c: In function `pfmon_get_entry_point': > pfmon_symbols.c:1180: error: `Elf' undeclared (first use in this function) > pfmon_symbols.c:1180: error: (Each undeclared identifier is reported only > once > pfmon_symbols.c:1180: error: for each function it appears in.) > pfmon_symbols.c:1180: error: `elf' undeclared (first use in this function) > pfmon_symbols.c:1181: error: `Elf64_Ehdr' undeclared (first use in this > function) > pfmon_symbols.c:1181: error: `ehdr64' undeclared (first use in this > function) > pfmon_symbols.c:1182: error: `Elf32_Ehdr' undeclared (first use in this > function) > pfmon_symbols.c:1182: error: `ehdr32' undeclared (first use in this > function) > pfmon_symbols.c:1194: warning: implicit declaration of function > `elf_version' > pfmon_symbols.c:1194: error: `EV_CURRENT' undeclared (first use in this > function) > pfmon_symbols.c:1194: error: `EV_NONE' undeclared (first use in this > function) > pfmon_symbols.c:1200: warning: implicit declaration of function `elf_begin' > pfmon_symbols.c:1200: error: `ELF_C_READ' undeclared (first use in this > function) > pfmon_symbols.c:1207: warning: implicit declaration of function `elf_kind' > pfmon_symbols.c:1207: error: `ELF_K_ELF' undeclared (first use in this > function) > pfmon_symbols.c:1212: warning: implicit declaration of function > `elf_getident' > pfmon_symbols.c:1212: warning: assignment makes pointer from integer without > a cast > pfmon_symbols.c:1213: error: `EI_CLASS' undeclared (first use in this > function) > pfmon_symbols.c:1214: error: `ELFCLASS64' undeclared (first use in this > function) > pfmon_symbols.c:1215: warning: implicit declaration of function > `elf64_getehdr' > pfmon_symbols.c:1219: error: `ELFCLASS32' undeclared (first use in this > function) > pfmon_symbols.c:1220: warning: implicit declaration of function > `elf32_getehdr' > pfmon_symbols.c:1228: warning: implicit declaration of function `elf_end' > pfmon_symbols.c: In function `pfmon_program_is_abi32': > pfmon_symbols.c:1237: error: `Elf' undeclared (first use in this function) > pfmon_symbols.c:1237: error: `elf' undeclared (first use in this function) > pfmon_symbols.c:1248: error: `EV_CURRENT' undeclared (first use in this > function) > pfmon_symbols.c:1248: error: `EV_NONE' undeclared (first use in this > function) > pfmon_symbols.c:1254: error: `ELF_C_READ' undeclared (first use in this > function) > pfmon_symbols.c:1261: error: `ELF_K_ELF' undeclared (first use in this > function) > pfmon_symbols.c:1266: warning: assignment makes pointer from integer without > a cast > pfmon_symbols.c:1267: error: `EI_CLASS' undeclared (first use in this > function) > pfmon_symbols.c:1267: error: `ELFCLASS32' undeclared (first use in this > function) > make[1]: *** [pfmon_symbols.o] Error 1 > make[1]: Leaving directory `/mnt/autofs/home/iraicu/perfmon/pfmon-3.4/pfmon' > make: *** [all] Error 2 > > stephane eranian wrote: > > Hello again, > > Which version of libpfm/pfmon are you using? > > I have seen this problem before. I think the name of the field has > simply changed. > > Please try with libpfm-3.4 and pfmon-3.4, they should still work on > older v2.6.29 and > perfmon v2.0 itanium systems. > > You can grab them from our website: http://perfmon2.sf.net > > > > On Tue, Jul 15, 2008 at 7:18 PM, Ioan Raicu <[EMAIL PROTECTED]> wrote: > > > > Aha, > > OK, so I found a IA64 machine, with kernel 2.6.9, but I don't have root > access to it. So I am installing from the sources: > [EMAIL PROTECTED] libpfm-3.1]$ make > ... > gcc -Wall -I/mnt/autofs/home/iraicu/perfmon/libpfm-3.1/examples/../include > -O2 -g -c ita2_irr.c > gcc -Wall -o ita2_irr -O2 -g > -L/mnt/autofs/home/iraicu/perfmon/libpfm-3.1/examples/../libpfm ita2_irr.o > /mnt/autofs/home/iraicu/perfmon/libpfm-3.1/examples/../lib/libpfm.a -lm > make[1]: Leaving directory > `/mnt/autofs/home/iraicu/perfmon/libpfm-3.1/examples' > make[1]: Entering directory > `/mnt/autofs/home/iraicu/perfmon/libpfm-3.1/include' > make[1]: Nothing to be done for `all'. > make[1]: Leaving directory > `/mnt/autofs/home/iraicu/perfmon/libpfm-3.1/include' > make[1]: Entering directory > `/mnt/autofs/home/iraicu/perfmon/libpfm-3.1/docs' > make[1]: Nothing to be done for `all'. > make[1]: Leaving directory `/mnt/autofs/home/iraicu/perfmon/libpfm-3.1/docs' > [EMAIL PROTECTED] libpfm-3.1]$ make install > make[1]: Entering directory `/mnt/autofs/home/iraicu/perfmon/libpfm-3.1/lib' > mkdir -p /home/iraicu/usr/local/lib > install -m 644 libpfm.a libpfm.so.3.1.0 /home/iraicu/usr/local/lib > make[1]: Leaving directory `/mnt/autofs/home/iraicu/perfmon/libpfm-3.1/lib' > make[1]: Entering directory > `/mnt/autofs/home/iraicu/perfmon/libpfm-3.1/examples' > make[1]: Nothing to be done for `install'. > make[1]: Leaving directory > `/mnt/autofs/home/iraicu/perfmon/libpfm-3.1/examples' > make[1]: Entering directory > `/mnt/autofs/home/iraicu/perfmon/libpfm-3.1/include' > mkdir -p /home/iraicu/usr/local/include/perfmon > install -m 644 perfmon/perfmon.h perfmon/perfmon_default_smpl.h > perfmon/pfmlib.h perfmon/pfmlib_comp.h perfmon/pfmlib_comp_ia64.h > perfmon/pfmlib_os.h perfmon/pfmlib_os_ia64.h perfmon/pfmlib_generic_ia64.h > perfmon/pfmlib_itanium.h perfmon/pfmlib_itanium2.h > /home/iraicu/usr/local/include/perfmon > make[1]: Leaving directory > `/mnt/autofs/home/iraicu/perfmon/libpfm-3.1/include' > make[1]: Entering directory > `/mnt/autofs/home/iraicu/perfmon/libpfm-3.1/docs' > mkdir -p /home/iraicu/usr/local/share/man/man3 > ( cd man3; install -m 644 *.3 /home/iraicu/usr/local/share/man/man3 ) > make[1]: Leaving directory `/mnt/autofs/home/iraicu/perfmon/libpfm-3.1/docs' > > This was OK, looked normal. > > Then I try to compile pfmon, and I get: > bash-3.00$ make > make[1]: Entering directory > `/mnt/autofs/home/iraicu/perfmon/pfmon-3.0/pfmon' > gcc -Wall -I/home/iraicu/usr/local/include -I/usr/include/libelf -I. -O2 -g > -D_REENTRANT -D_GNU_SOURCE -DDESTROOT=\"/home/iraicu/usr/local\" > -DCONFIG_PFMON_GENERIC_IA64 -DCONFIG_PFMON_ITANIUM -DCONFIG_PFMON_ITANIUM2 > -DCONFIG_PFMON_SMPL_MOD_RAW_IA64 -DCONFIG_PFMON_SMPL_MOD_COMPACT_IA64 > -DCONFIG_PFMON_SMPL_MOD_EXAMPLE_IA64 -DCONFIG_PFMON_SMPL_MOD_BTB_IA64 > -DCONFIG_PFMON_SMPL_MOD_DET_ITA -DCONFIG_PFMON_SMPL_MOD_DET_ITA2 > -DPFMON_DEBUG -c pfmon.c > gcc -Wall -I/home/iraicu/usr/local/include -I/usr/include/libelf -I. -O2 -g > -D_REENTRANT -D_GNU_SOURCE -DDESTROOT=\"/home/iraicu/usr/local\" > -DCONFIG_PFMON_GENERIC_IA64 -DCONFIG_PFMON_ITANIUM -DCONFIG_PFMON_ITANIUM2 > -DCONFIG_PFMON_SMPL_MOD_RAW_IA64 -DCONFIG_PFMON_SMPL_MOD_COMPACT_IA64 > -DCONFIG_PFMON_SMPL_MOD_EXAMPLE_IA64 -DCONFIG_PFMON_SMPL_MOD_BTB_IA64 > -DCONFIG_PFMON_SMPL_MOD_DET_ITA -DCONFIG_PFMON_SMPL_MOD_DET_ITA2 > -DPFMON_DEBUG -c pfmon_smpl.c > gcc -Wall -I/home/iraicu/usr/local/include -I/usr/include/libelf -I. -O2 -g > -D_REENTRANT -D_GNU_SOURCE -DDESTROOT=\"/home/iraicu/usr/local\" > -DCONFIG_PFMON_GENERIC_IA64 -DCONFIG_PFMON_ITANIUM -DCONFIG_PFMON_ITANIUM2 > -DCONFIG_PFMON_SMPL_MOD_RAW_IA64 -DCONFIG_PFMON_SMPL_MOD_COMPACT_IA64 > -DCONFIG_PFMON_SMPL_MOD_EXAMPLE_IA64 -DCONFIG_PFMON_SMPL_MOD_BTB_IA64 > -DCONFIG_PFMON_SMPL_MOD_DET_ITA -DCONFIG_PFMON_SMPL_MOD_DET_ITA2 > -DPFMON_DEBUG -c pfmon_util.c > gcc -Wall -I/home/iraicu/usr/local/include -I/usr/include/libelf -I. -O2 -g > -D_REENTRANT -D_GNU_SOURCE -DDESTROOT=\"/home/iraicu/usr/local\" > -DCONFIG_PFMON_GENERIC_IA64 -DCONFIG_PFMON_ITANIUM -DCONFIG_PFMON_ITANIUM2 > -DCONFIG_PFMON_SMPL_MOD_RAW_IA64 -DCONFIG_PFMON_SMPL_MOD_COMPACT_IA64 > -DCONFIG_PFMON_SMPL_MOD_EXAMPLE_IA64 -DCONFIG_PFMON_SMPL_MOD_BTB_IA64 > -DCONFIG_PFMON_SMPL_MOD_DET_ITA -DCONFIG_PFMON_SMPL_MOD_DET_ITA2 > -DPFMON_DEBUG -c pfmon_util_ia64.c > pfmon_util_ia64.c: In function `pfmon_get_breakpoint_addr': > pfmon_util_ia64.c:726: error: structure has no member named `_si_pad0' > make[1]: *** [pfmon_util_ia64.o] Error 1 > make[1]: Leaving directory `/mnt/autofs/home/iraicu/perfmon/pfmon-3.0/pfmon' > make: *** [all] Error 2 > > I updated both config.mk for both libpfm and pfmon. Note that for libpfm, I > had to modify the default compiler from icc to gcc, and I changed the > install path. > > Any ideas on what I am missing, that is preventing pfmon from compiling? > > Thanks, > Ioan > > stephane eranian wrote: > > Hello, > > You are missing the kernel support. Suse does have perfmon > support in 2.6.x kernels but that is on Itanium systems only, I think. > > > On Tue, Jul 15, 2008 at 6:50 PM, Ioan Raicu <[EMAIL PROTECTED]> wrote: > > > Hi, > I have installed the following RPMs. > libpfm-3.4-1.fc10.x86_64.rpm > pfmon-3.4-1.fc10.x86_64.rpm > > I then tried to run pfmon, but I got: > [EMAIL PROTECTED]:~/perfmon> pfmon > host kernel is missing perfmon support or /sys is not available > > My pfmon version is 3.4. I am also running Suse 10 on dual 54xx Xeon > CPUs. > [EMAIL PROTECTED]:~/perfmon> uname -a > Linux gto 2.6.22.5-31-default #1 SMP 2007/09/21 22:29:00 UTC x86_64 > x86_64 x86_64 GNU/Linux > > I assume that my kernel doesn't have the support for perfmon enabled, > although I read online that Suse does have perfmon support in kernel > 2.6.x. Are there instructions on how I can add perfmon support to my > kernel? Or is it simply another RPM (which I couldn't find) I can install? > > Thanks in advance, > Ioan > > -- > =================================================== > Ioan Raicu > Ph.D. Candidate > =================================================== > Distributed Systems Laboratory > Computer Science Department > University of Chicago > 1100 E. 58th Street, Ryerson Hall > Chicago, IL 60637 > =================================================== > Email: [EMAIL PROTECTED] > Web: http://www.cs.uchicago.edu/~iraicu > http://dev.globus.org/wiki/Incubator/Falkon > http://dsl-wiki.cs.uchicago.edu/index.php/Main_Page > =================================================== > =================================================== > > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > perfmon2-devel mailing list > perfmon2-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/perfmon2-devel > > > > > > -- > =================================================== > Ioan Raicu > Ph.D. Candidate > =================================================== > Distributed Systems Laboratory > Computer Science Department > University of Chicago > 1100 E. 58th Street, Ryerson Hall > Chicago, IL 60637 > =================================================== > Email: [EMAIL PROTECTED] > Web: http://www.cs.uchicago.edu/~iraicu > http://dev.globus.org/wiki/Incubator/Falkon > http://dsl-wiki.cs.uchicago.edu/index.php/Main_Page > =================================================== > =================================================== > > > > > > > -- > =================================================== > Ioan Raicu > Ph.D. Candidate > =================================================== > Distributed Systems Laboratory > Computer Science Department > University of Chicago > 1100 E. 58th Street, Ryerson Hall > Chicago, IL 60637 > =================================================== > Email: [EMAIL PROTECTED] > Web: http://www.cs.uchicago.edu/~iraicu > http://dev.globus.org/wiki/Incubator/Falkon > http://dsl-wiki.cs.uchicago.edu/index.php/Main_Page > =================================================== > =================================================== > > ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ perfmon2-devel mailing list perfmon2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perfmon2-devel