RPI Native Build Qt 5.10.1:配置测试体系结构失败

时间:2018-02-19 02:59:33

标签: qt5 native raspberry-pi3

您好我正在尝试使用this guide构建QT 5.10.1。我收到了这个错误;

    Command line: -opengl es2 -device linux-rasp-pi3-vc4-g++ -device-option 
CROSS_COMPILE=arm-linux-gnueabihf- -sysroot /opt/qt5pi/sysroot -prefix 
/usr/local/qt5pi -opensource -confirm-license -skip qtwebengine -skip 
qtscript -nomake examples -no-use-gold-linker -make libs -v
executing config test architecture
+ cd /home/pi/qt5build/config.tests/arch && 
/home/pi/qt5build/qtbase/bin/qmake "CONFIG -= qt debug_and_release 
app_bundle lib_bundle" "CONFIG += shared warn_off console single_arch" 
"QMAKE_CFLAGS += --sysroot=/opt/qt5pi/sysroot" "QMAKE_CXXFLAGS += --
sysroot=/opt/qt5pi/sysroot" "QMAKE_LFLAGS += --sysroot=/opt/qt5pi/sysroot" -
early "CONFIG += cross_compile" /home/pi/qt-everywhere-src-
5.10.1/qtbase/config.tests/arch
 + cd /home/pi/qt5build/config.tests/arch && MAKEFLAGS= /usr/bin/make clean 
&& MAKEFLAGS= /usr/bin/make
> rm -f arch.o
> rm -f *~ core *.core
> arm-linux-gnueabihf-g++ -c -march=armv8-a -mtune=cortex-a53 -mfpu=crypto-
neon-
fp-armv8 -mfloat-abi=hard --sysroot=/opt/qt5pi/sysroot -O2 -w -fPIC  -
I/home/pi/qt-everywhere-src-5.10.1/qtbase/config.tests/arch -I. -
I/home/pi/qt-everywhere-src-5.10.1/qtbase/mkspecs/devices/linux-rasp-
pi3-vc4-g++ -o arch.o /home/pi/qt-everywhere-src-
5.10.1/qtbase/config.tests/arch/arch.cpp
> /home/pi/qt-everywhere-src-5.10.1/qtbase/config.tests/arch/arch.cpp:43:19: 
fatal error: stdio.h: No such file or directory
>  #include <stdio.h>
>                    ^
> compilation terminated.
> Makefile:179: recipe for target 'arch.o' failed
> make: *** [arch.o] Error 1

我检查了/ usr位置中的include文件。如果我添加文件arch.cpp位置,那么它需要另一个文件。我该如何解决这个问题?

感谢您的帮助。

1 个答案:

答案 0 :(得分:0)

fatal error: stdio.h: No such file or directory

这表明您在主机(运行您的机器configure)上缺少构建依赖项,很可能 libc

我不确定您拥有哪个软件包管理器,但使用apt可以安装以下代码:

sudo apt install libc6-dev

如果做不到这一点,您也可以尝试:

sudo apt install build-essential

安装各种编译工具/库。