0

I was trying to cross compile selftest of Linux for ARM architecure , I am getting following errors , I have no idea of about cross compilation :

pradeepgoswami@delandroid02:~/5_1_code/bin/code$ make ARCH=arm CROSS_COMPILE=arm-eabi- -C kernel/tools/testing/selftests/vm/
make: Entering directory `/home/pradeepgoswami/5_1_code/bin/code/kernel/tools/testing/selftests/vm'
arm-eabi-gcc -Wall -o hugepage-mmap hugepage-mmap.c
hugepage-mmap.c:19:20: fatal error: stdlib.h: No such file or directory
 #include <stdlib.h>
                    ^
compilation terminated.
make: *** [hugepage-mmap] Error 1

I am interested in vm test cases of selftest tool

Pradeep Goswami
  • 1,785
  • 1
  • 15
  • 24
  • 2
    `I have no idea or done any research about these errors.` - Why?? Simple googling for error message `fatal error: stdlib.h: No such file or directory` and `arm`. E.g., this is [first output](https://github.com/kivy/python-for-android/issues/159) of my googling. – Tsyvarev Dec 21 '15 at 08:58
  • I think I need to give path of Library for arm-eabi-gcc ? – Pradeep Goswami Dec 21 '15 at 09:04
  • Firstly check that you have that library and header files for it are installed. While library is usually installed with gcc, header files may be part of other package. Use google for find it. – Tsyvarev Dec 21 '15 at 09:57
  • http://stackoverflow.com/questions/23011367/arm-linux-gnu-gcc-fatal-error-stdio-h-no-such-file-or-directory – Punit Vara Dec 22 '15 at 09:20

1 Answers1

0

I was able to cross compile from top of kernel directory using following command :-

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -C tool/testing/selftest

Thanks

Pradeep Goswami
  • 1,785
  • 1
  • 15
  • 24