我无法获得Qt5.11.1交叉编译。。。我尝试过不同的解决方案,比如:
- https://lb.raspberrypi.org/forums/viewtopic.php?t=204529
- https://wiki.qt.io/index.php?title=Raspberrypi_beginners_guide&重定向=否
我的操作系统是manjaro,树莓操作系统是raspbian。
这是我的配置命令:
./Src/configure -opengl es2 -device linux-rasp-pi3-vc4-g++ -device-option CROSS_COMPILE=arm-linux-gnueabihf- -sysroot /run/media/luca/rootfs -opensource -confirm-license -optimized-qmake -reduce-exports -release -skip qtwebengine -skip qtscript -nomake examples -make libs -prefix /usr/local/qt5 -v -no-use-gold-linker -nomake tests -no-compile-examples -no-pch -eglfs -skip qtwaylan
这是输出:
make[3]: ingresso nella directory "/home/luca/Dev/Qt/5.11.1/QtPi3Bplus_build/qtbase/src/network"
arm-linux-gnueabihf-g++ -c -march=armv8-a -mtune=cortex-a53 -mfpu=crypto-neon-fp-armv8 -mfloat-abi=hard --sysroot=/run/media/luca/rootfs -DOPENSSL_API_COMPAT=0x10100000L -O2 -std=c++11 -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -W -Wvla -D_REENTRANT -fPIC -DQT_NO_USING_NAMESPACE -DQT_NO_FOREACH -DQT_USE_SYSTEM_PROXIES -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_NETWORK_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_CORE_LIB -I/home/luca/Dev/Qt/5.11.1/Src/qtbase/src/network -I. -I/home/luca/Dev/Qt/5.11.1/Src/qtbase/src/network/kernel -I/home/luca/Dev/Qt/5.11.1/Src/qtbase/include -I/home/luca/Dev/Qt/5.11.1/Src/qtbase/include/QtNetwork -I../../include -I../../include/QtNetwork -I/home/luca/Dev/Qt/5.11.1/Src/qtbase/include/QtNetwork/5.11.1 -I/home/luca/Dev/Qt/5.11.1/Src/qtbase/include/QtNetwork/5.11.1/QtNetwork -I../../include/QtNetwork/5.11.1 -I../../include/QtNetwork/5.11.1/QtNetwork -I/home/luca/Dev/Qt/5.11.1/Src/qtbase/include/QtCore/5.11.1 -I/home/luca/Dev/Qt/5.11.1/Src/qtbase/include/QtCore/5.11.1/QtCore -I../../include/QtCore/5.11.1 -I../../include/QtCore/5.11.1/QtCore -I/home/luca/Dev/Qt/5.11.1/Src/qtbase/include/QtCore -I../../include/QtCore -I.moc -I/home/luca/Dev/Qt/5.11.1/Src/qtbase/mkspecs/devices/linux-rasp-pi3-vc4-g++ -o .obj/qsslsocket_openssl11.o /home/luca/Dev/Qt/5.11.1/Src/qtbase/src/network/ssl/qsslsocket_openssl11.cpp
In file included from /home/luca/Dev/Qt/5.11.1/Src/qtbase/include/QtCore/qglobal.h:1:0,
from /home/luca/Dev/Qt/5.11.1/Src/qtbase/include/QtNetwork/../../src/network/kernel/qtnetworkglobal.h:43,
from /home/luca/Dev/Qt/5.11.1/Src/qtbase/include/QtNetwork/qtnetworkglobal.h:1,
from /home/luca/Dev/Qt/5.11.1/Src/qtbase/include/QtNetwork/5.11.1/QtNetwork/private/../../../../../src/network/kernel/qtnetworkglobal_p.h:54,
from /home/luca/Dev/Qt/5.11.1/Src/qtbase/include/QtNetwork/5.11.1/QtNetwork/private/qtnetworkglobal_p.h:1,
from /home/luca/Dev/Qt/5.11.1/Src/qtbase/src/network/ssl/qssl_p.h:56,
from /home/luca/Dev/Qt/5.11.1/Src/qtbase/src/network/ssl/qsslsocket_openssl11.cpp:59:
/home/luca/Dev/Qt/5.11.1/Src/qtbase/include/QtCore/../../src/corelib/global/qglobal.h:121:49: error: static assertion failed: Required feature library for file /home/luca/Dev/Qt/5.11.1/Src/qtbase/include/QtCore/../../src/corelib/plugin/qlibrary.h not available.
# define Q_STATIC_ASSERT_X(Condition, Message) static_assert(bool(Condition), Message)
^
/home/luca/Dev/Qt/5.11.1/Src/qtbase/include/QtCore/../../src/corelib/global/qglobal.h:87:36: note: in expansion of macro ‘Q_STATIC_ASSERT_X’
#define QT_REQUIRE_CONFIG(feature) Q_STATIC_ASSERT_X(QT_FEATURE_##feature == 1, "Required feature " #feature " for file " __FILE__ " not available.")
^
/home/luca/Dev/Qt/5.11.1/Src/qtbase/include/QtCore/../../src/corelib/plugin/qlibrary.h:45:1: note: in expansion of macro ‘QT_REQUIRE_CONFIG’
QT_REQUIRE_CONFIG(library);
^
make[3]: *** [Makefile:27760: .obj/qsslsocket_openssl11.o] Error 1
make[3]: uscita dalla directory "/home/luca/Dev/Qt/5.11.1/QtPi3Bplus_build/qtbase/src/network"
make[2]: *** [Makefile:275: sub-network-make_first] Error 2
make[2]: uscita dalla directory "/home/luca/Dev/Qt/5.11.1/QtPi3Bplus_build/qtbase/src"
make[1]: *** [Makefile:49: sub-src-make_first] Error 2
make[1]: uscita dalla directory "/home/luca/Dev/Qt/5.11.1/QtPi3Bplus_build/qtbase"
有人知道这个问题吗??
from /home/luca/Dev/Qt/5.11.1/Src/qtbase/src/network/ssl/qsslsocket_openssl11.cpp:59:
您似乎缺少openSSL库。如果您可以在没有openssl的情况下使用-no-openssl进行配置,或者尝试将其安装到您的sysroot中,然后尝试使用-openssl运行时。
我遇到了同样的问题。问题是Qt找不到libdl.so。为了解决这个问题,我在/sysroot/usr/lib中放入了libdl.so。
为了找到它,我将-功能库标志添加到/配置。我使用的命令:
./configure -release -opengl es2 -device linux-rasp-pi3-g++ -device-option CROSS_COMPILE=armv8-rpi3-linux-gnueabihf- -sysroot /mnt/second/proj/dai/env/work/sysroot -opensource -confirm-license -make libs -nomake examples -nomake tests -prefix /usr/local/qt5pi -extprefix /mnt/second/proj/dai/env/work/qt5pi -hostprefix /mnt/second/proj/dai/env/work/qt5 -v -no-use-gold-linker -sql-mysql -mysql_config /mnt/second/proj/dai/env/work/../mysql_config -ssl -openssl-runtime -feature-library