Cross Compile of perf not working


I am encountering some problems regarding the cross compilation of the ‘perf’ tool that comes with the ‘ti-sdk-beagleboard-’ BeagleBoard EVM SDK package. I am no expert in cross compiling.

Following the instructions in the user guide, I export the path

export PATH="/linux-devkit/bin:$PATH"

and source the environment variables

source /linux-devkit/environment-setup

When trying to make the perf tool (found in /board-support//linux-3.3.7-r115/tools/perf/ ) using:

make ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi- distclean

make ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi-

The error is:

Makefile:417: No libdw.h found or old libdw.h found or elfutils is older than 0.138, disables dwarf support. Please install new elfutils-devel/libdw-dev
Makefile:434: *** No libelf.h/libelf found, please install libelf-dev/elfutils-libelf-devel. Stop.

Fixed it by adding

EXTRA_CFLAGS+= /linux-devkit/arm-arago-linux-gnueabi/usr/include

Then another error arises like:

Makefile:482: *** No gnu/libc-version.h found, please install glibc-dev[el]/glibc-static. Stop.

After searching for the libc-version.h, it is located on the toolchain at (/linux-devkit/arm-arago-linux-gnueabi/usr/include/gnu/libc-version.h) I know I have glibc installed on the host as there is also libc-version.h at /usr/include/gnu/.

Is there any way to fix this? I also tried using the Angstrom toolchain, having the same results.

When I compile with the native gcc it does not produce any errors.

If this is not possible, is there another way to obtain performance readings (other than ‘top’) like cpu-cycles or instructions retired?

Thanks for any help,


aa I have the same error when compile this tool for android. I have seen libc-version.h in glibc/include.gnu but i don’t know why it doesn’t work. If you have any suggest, please help me. Thanks

how did you fix this? I’ve run into same issue…