-   Linux - Embedded & Single-board computer (
-   -   Crosscompile Raspberry Pi "stdio.h: No such file or directory" (

kevindebb 10-25-2012 11:29 AM

Crosscompile Raspberry Pi "stdio.h: No such file or directory"
Hello everybody,

I'm trying to compile my own module on a Ubuntu system for the Raspberry pi. I followed this guide ->

I succeeded to compile the testprogram "Hello world" on my ubuntu and import this with insmod in the kernel from my Raspberry Pi. The problem is when I include <stdint.h> in my more complex module I receive the following error: "stdio.h: No such file or directory". I search for hours how to import this into my kernel folder from the Rpi but I didn't found it. Does anybody know how to import this header file?


obj-m := test.o
        make -C $(KERN_SRC) ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- M=`pwd` modules
        make -C $(KERN_SRC) ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- M=`pwd` clean

Thanks in advance


theNbomr 10-26-2012 05:48 PM

I don't know if the Makefile adds some flag(s) to change the default behavior of gcc so that it doesn't look in 'the usual place' for stdio.h, but since I'm pretty sure there is nothing in stdio.h that can be used from kernel space, it might do that. Do non-kernel sources compile and run correctly when cross compiled?

--- rod.

All times are GMT -5. The time now is 07:49 PM.