我尝试使用基于 LMDE Linux 操作系统(联想笔记本电脑)的 Raspberry 零安装 Qt 交叉编译这些说明,使用我写的这个脚本:
#!/bin/bash
./configure -release -opengl es2 -device linux-rasp-pi-g++ -device-option CROSS_COMPILE=/home/so/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- -sysroot /home/so/raspi/sysroot -opensource -confirm-license -skip qtwayland -skip qtlocation -skip qtscript -make libs -prefix /usr/local/qt5pi -extprefix /home/so/raspi/qt5pi -hostprefix /home/so/raspi/qt5 -no-use-gold-linker -v -no-gbm
make
make install
并另存为安装_qt.sh文件。我使用它运行
sudo ./instlation_qt.sh
在输出的最后,我有这个:
so/Desktop/trash/3/qt-everywhere-src-5.12.3/qtbase/bin/qmake -install qinstall /home/so/Desktop/trash/3/qt-everywhere-src-5.12.3/qttranslations/translations/qtxmlpatterns_pl.qm /home/so/raspi/qt5pi/translations/qtxmlpatterns_pl.qm
/home/so/Desktop/trash/3/qt-everywhere-src-5.12.3/qtbase/bin/qmake -install qinstall /home/so/Desktop/trash/3/qt-everywhere-src-5.12.3/qttranslations/translations/qtxmlpatterns_ru.qm /home/so/raspi/qt5pi/translations/qtxmlpatterns_ru.qm
/home/so/Desktop/trash/3/qt-everywhere-src-5.12.3/qtbase/bin/qmake -install qinstall /home/so/Desktop/trash/3/qt-everywhere-src-5.12.3/qttranslations/translations/qtxmlpatterns_sk.qm /home/so/raspi/qt5pi/translations/qtxmlpatterns_sk.qm
/home/so/Desktop/trash/3/qt-everywhere-src-5.12.3/qtbase/bin/qmake -install qinstall /home/so/Desktop/trash/3/qt-everywhere-src-5.12.3/qttranslations/translations/qtxmlpatterns_uk.qm /home/so/raspi/qt5pi/translations/qtxmlpatterns_uk.qm
/home/so/Desktop/trash/3/qt-everywhere-src-5.12.3/qtbase/bin/qmake -install qinstall /home/so/Desktop/trash/3/qt-everywhere-src-5.12.3/qttranslations/translations/qtxmlpatterns_zh_TW.qm /home/so/raspi/qt5pi/translations/qtxmlpatterns_zh_TW.qm
make[2]: Leaving directory '/home/so/Desktop/trash/3/qt-everywhere-src-5.12.3/qttranslations/translations'
make[1]: Leaving directory '/home/so/Desktop/trash/3/qt-everywhere-src-5.12.3/qttranslations'
cd qtdoc/ && ( test -e Makefile || /home/so/Desktop/trash/3/qt-everywhere-src-5.12.3/qtbase/bin/qmake -o Makefile /home/so/Desktop/trash/3/qt-everywhere-src-5.12.3/qtdoc/qtdoc.pro ) && make -f Makefile install
make[1]: Entering directory '/home/so/Desktop/trash/3/qt-everywhere-src-5.12.3/qtdoc'
cd doc/ && ( test -e Makefile || /home/so/Desktop/trash/3/qt-everywhere-src-5.12.3/qtbase/bin/qmake -o Makefile /home/so/Desktop/trash/3/qt-everywhere-src-5.12.3/qtdoc/doc/doc.pro ) && make -f Makefile install
make[2]: Entering directory '/home/so/Desktop/trash/3/qt-everywhere-src-5.12.3/qtdoc/doc'
make[2]: Nothing to be done for 'install'.
make[2]: Leaving directory '/home/so/Desktop/trash/3/qt-everywhere-src-5.12.3/qtdoc/doc'
make[1]: Leaving directory '/home/so/Desktop/trash/3/qt-everywhere-src-5.12.3/qtdoc'
我有一个新 ~/raspi/qt5pi
文件夹,如 中所述./configure ... -extprefix /home/so/raspi/qt5pi ...
。
我认为安装过程成功结束基于这个类似的问题。安装过程是否成功完成?
或者
我在将 Qt 项目交叉编译到我的树莓派零时遇到问题并收到此错误:
19:22:40: Starting /home/pi/Desktop/test_3/bin/test_3 ...
libEGL warning: DRI3: xcb_connect failed
libEGL warning: DRI2: xcb_connect failed
libEGL warning: DRI2: xcb_connect failed
Could not initialize egl display
所以我怀疑有什么问题。我见过这个类似的问题我觉得这里面有些问题。
制作3:“安装”无需执行任何操作。
消息来自于编写命令时的错误,make install
例如:
sudo
之前没有吗?- 基于这个网站,类似:
是由makefile规则中的命令之前的空格而不是制表符引起的...
- 或任何其他东西?
答案1
“‘安装’无需执行任何操作。”消息涉及安装的一小部分:
make[2]: Entering directory '/home/so/Desktop/trash/3/qt-everywhere-src-5.12.3/qtdoc/doc'
make[2]: Nothing to be done for 'install'.
这表示仅在目录中无事可做qtdoc/doc
。
上面的行,例如
/home/so/Desktop/trash/3/qt-everywhere-src-5.12.3/qtbase/bin/qmake -install qinstall /home/so/Desktop/trash/3/qt-everywhere-src-5.12.3/qttranslations/translations/qtxmlpatterns_ru.qm /home/so/raspi/qt5pi/translations/qtxmlpatterns_ru.qm
/home/so/Desktop/trash/3/qt-everywhere-src-5.12.3/qtbase/bin/qmake -install qinstall /home/so/Desktop/trash/3/qt-everywhere-src-5.12.3/qttranslations/translations/qtxmlpatterns_sk.qm /home/so/raspi/qt5pi/translations/qtxmlpatterns_sk.qm
/home/so/Desktop/trash/3/qt-everywhere-src-5.12.3/qtbase/bin/qmake -install qinstall /home/so/Desktop/trash/3/qt-everywhere-src-5.12.3/qttranslations/translations/qtxmlpatterns_uk.qm /home/so/raspi/qt5pi/translations/qtxmlpatterns_uk.qm
/home/so/Desktop/trash/3/qt-everywhere-src-5.12.3/qtbase/bin/qmake -install qinstall /home/so/Desktop/trash/3/qt-everywhere-src-5.12.3/qttranslations/translations/qtxmlpatterns_zh_TW.qm /home/so/raspi/qt5pi/translations/qtxmlpatterns_zh_TW.qm
显示该文件是安装成功。
如果整个安装失败,您的make install
运行将以错误结束,例如
make: *** [Makefile:20: install] Error 2