Builing on Pi3 @ Raspbian Stretch fails
Unsolved
Installation and Deployment
-
Hallo, I try to compile Qt 5.9.1 on a Pi3 @ Raspbian Stretch. It fails again and again.
The configure I use:
sudo ../qt-everywhere-opensource-src-5.9.1/configure -v -opengl es2 -eglfs -no-gtk -device linux-rasp-pi3-g++ -device-option \ CROSS_COMPILE=/usr/bin/ -opensource -force-pkg-config \ -confirm-license -optimized-qmake -no-pch -no-use-gold-linker -reduce-exports -skip qt3d -skip qtactiveqt -skip qtandroidextras \ -skip qtcanvas3d -skip qtdatavis3d -skip qtdoc -skip qtdocgallery -skip qtenginio -skip qtfeedback -skip qtgamepad \ -skip qtimageformats -skip qtlocation -skip qtmacextras -skip qtnetworkauth -skip qtpim -skip qtpurchasing \ -skip qtqa -skip qtremoteobjects -skip qtrepotools -skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus \ -skip qtserialport -skip qtspeech -skip qtsystems -skip qttranslations -skip qtvirtualkeyboard -skip qtwayland \ -skip qtwebchannel -skip qtwebengine -skip qtwebsockets -skip qtwebview -skip qtwinextras -skip qtx11extras \ -release -nomake examples -no-compile-examples -qt-pcre -ssl -evdev -system-freetype -fontconfig -glib \ -qt-pcre -make libs -I /usr/include/glib-2.0/ -I /usr/lib/arm-linux-gnueabihf/glib-2.0/include/ \ -L /usr/lib/arm-linux-gnueabihf/ -I /usr/include/freetype2/ -sysroot / -prefix /usr/local/qt5 -recheck
And this is the error I get:
.obj/qnetworkcookie.o:qnetworkcookie.cpp:function QNetworkCookiePrivate::parseSetCookieHeaderLine(QByteArray const&): error: undefined reference to 'QDateTime::QDateTime(QDateTime&&)' .obj/qnetworkcookie.o:qnetworkcookie.cpp:function QNetworkCookiePrivate::parseSetCookieHeaderLine(QByteArray const&): error: undefined reference to 'QDateTime::fromSecsSinceEpoch(long long, Qt::TimeSpec, int)' .obj/qnetworkreplyhttpimpl.o:qnetworkreplyhttpimpl.cpp:function QNetworkReplyHttpImplPrivate::loadFromCacheIfAllowed(QHttpNetworkRequest&): error: undefined reference to 'QDateTime::toSecsSinceEpoch() const' .obj/qnetworkreplyhttpimpl.o:qnetworkreplyhttpimpl.cpp:function QNetworkReplyHttpImplPrivate::loadFromCacheIfAllowed(QHttpNetworkRequest&): error: undefined reference to 'QDateTime::toSecsSinceEpoch() const' .obj/qauthenticator.o:qauthenticator.cpp:function QAuthenticatorPrivate::calculateResponse(QByteArray const&, QByteArray const&): error: undefined reference to 'QDateTime::currentSecsSinceEpoch()' .obj/qabstractsocket.o:qabstractsocket.cpp:function QAbstractSocketPrivate::flush(): error: undefined reference to 'QIODevicePrivate::allWriteBuffersEmpty() const' .obj/qabstractsocket.o:qabstractsocket.cpp:function QAbstractSocket::disconnectFromHost(): error: undefined reference to 'QIODevicePrivate::allWriteBuffersEmpty() const' .obj/qabstractsocket.o:qabstractsocket.cpp:function QAbstractSocket::disconnectFromHost(): error: undefined reference to 'QIODevicePrivate::allWriteBuffersEmpty() const' .obj/qsslsocket_openssl_symbols.o:qsslsocket_openssl_symbols.cpp:function q_getTimeFromASN1(asn1_string_st const*): error: undefined reference to 'QDateTime::QDateTime(QDateTime&&)' collect2: error: ld returned 1 exit status
Are there any instructions how to build Qt5.9.1 on Pi3? I also tried 5.9.2 . From a tarbal and also via git.
-
Hi and welcome to devnet,
Why are you setting things up for cross-compilation if you are compiling directly on the Pi ?
-
Because it is written in the instructions i found:
https://wiki.qt.io/Native_Build_of_Qt5_on_a_Raspberry_Pi -
Ok, I've missed that article.
From the looks of it, you seem to be currently essentially interested in building qtbase, so you could call configure directly in it to shorten the list of options.
Intuitively, I'd avoid the reduce-exports and sysroot parameters.