Home/Support/Support Forum/how to cross compile perf tool in Digi EL 5.7 environment ?
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

how to cross compile perf tool in Digi EL 5.7 environment ?

0 votes
Anyone tried to compile the perf tool on DigiEL 5.7 environment?
I tried following from directory /usr/local/DigiEL-5.7/kernel/linux-2.6.35/tools/perf$ , but getting errors:
export PATH=/usr/local/DigiEL-5.7/x-tools/arm-unknown-linux-uclibcgnueabi/bin:$PATH
export CROSS_COMPILE=arm-linux-
make ARCH=arm

The error is:
Makefile:512: 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:548: *** No libelf.h/libelf found, please install libelf-dev/elfutils-libelf-devel and glibc-dev[el]. Stop.

I can see that libelf.h/libelf are present in the following path:
./x-tools/arm-unknown-linux-uclibcgnueabi/arm-unknown-linux-uclibcgnueabi/sysroot/usr/include/libelf
./x-tools/arm-unknown-linux-uclibcgnueabi/arm-unknown-linux-uclibcgnueabi/sysroot/usr/include/libelf/libelf.h

even if i give sysroot path in the make command getting the same error.
asked Jun 24 in Linux by vijay.bhatt New to the Community (0 points)

Please log in or register to answer this question.

1 Answer

0 votes
try:
export PATH=/usr/local/DigiEL-5.7/x-tools/arm-unknown-linux-uclibcgnueabi/bin:$PATH

export TOOLCHAIN_DIR=/usr/local/DigiEL-5.7/x-tools/arm-unknown-linux-uclibcgnueabi/

Then something like:
CC=arm-linux-gcc ./configure --host=arm-linux --target=arm-linux --prefix=/usr/local/DigiEL-5.7/x-tools/arm-unknown-linux-uclibcgnueabi

make CC=arm-linux-gcc
answered Jun 26 by LeonidM Veteran of the Digi Community (3,170 points)
Thanks..
the suggested commands did not help, still getting the same error:
Makefile:512: 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:548: *** No libelf.h/libelf found, please install libelf-dev/elfutils-libelf-devel and glibc-dev[el].  Stop.

It seems that the sysroot path is not getting exported to the Makefile or Makefile need modification to supply the correct path of sysroot.
...