Important: Please read the Qt Code of Conduct -

RaspberryPi2EGLFS cross compile Error <stdio.h> no such file or directory

  • Hi, I am trying to compile QT by cross-compile by follow this tutorial.
    Everything is good before i hit this line:

    ./configure -release -opengl es2 -device linux-rasp-pi2-g++ -device-option CROSS_COMPILE=~/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf- -sysroot ~/raspi/sysroot -opensource -confirm-license -make libs -prefix /usr/local/qt5pi -extprefix ~/raspi/qt5pi -hostprefix ~/raspi/qt5 -v

    This is the first error i got, and bunch of errors following...

    Determining architecture... ()
    /home/daywong/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++ -c -pipe -march=armv7-a -marm -mthumb-interwork -mfpu=neon-vfpv4 -mtune=cortex-a7 -mabi=aapcs-linux -mfloat-abi=hard --sysroot=/home/daywong/raspi/sysroot -g -Wall -W -fPIC  -I. -I../../mkspecs/devices/linux-rasp-pi2-g++ -o arch.o arch.cpp
    arch.cpp:37:19: fatal error: stdio.h: No such file or directory
     #include <stdio.h>
    compilation terminated.

    I am using Virtual box with Ubuntu 14.04 LTS as the compile machine. Any idea of what i did wrong? Thanks

  • @daywong

    Are the header files in the correct path?

  • Is there a stdio.h in ~/raspi/sysroot/usr/include? If not maybe the rsync wasn´t successfull.

  • @sneubert said:


    Thats correct. Tried to re-run rsync, stdio.h is there finally.