build qt6 on arm64 debian10 or Ubuntu 18
-
For some embarrassing reasons, I need to use qt6 on the arm64 device. Unfortunately, The device only has debian10 or Ubuntu 18.
I didn't find any instructions on whether to build qt6 on such an old system on Google, but there are many clear instructions, at least debian11 or Ubuntu 20.
Fortunately, I found a project on github,
https://github.com/techcaotri/ubuntu-18.04-build-qt6According to this method, I tried on Debian10 (Ubuntu 18 is missing a lot of packages, which is not as smooth as script). After eliminating many problems, the compilation progress has reached 40%, and the following errors are reported
[ 44%] Building CXX object qttools/src/qdoc/CMakeFiles/qdoc.dir/docbookgenerator.cpp.o [ 44%] Generating prl file for target BodymovinPrivate clang: warning: -lstdc++fs: 'linker' input unused [-Wunused-command-line-argument] [ 44%] Running moc --collect-json for target BodymovinPrivate [ 44%] Building CXX object qtlottie/src/bodymovin/CMakeFiles/BodymovinPrivate.dir/cmake_pch.hxx.pch clang: warning: -lstdc++fs: 'linker' input unused [-Wunused-command-line-argument] /root/qt-everywhere-src-6.4.3/qttools/src/qdoc/docbookgenerator.cpp:2463:36: error: no member named 'transform_reduce' in namespace 'std' QString details = std::transform_reduce( ~~~~~^ 1 error generated.
Strangely, I added the relevant header files in according to Google's suggestions, but the compilation did not change at all.
#include <algorithm>
Can someone guide me how to do?
In fact, I didn't find the header file “algorithm” in the include of clang12. I don't know whether this is related to clang12, but the error is not an include error
Or can I skip compiling qdoc? I understand that it should be a relatively unimportant module. However, I did not find the relevant options in configure.
Supplementary notes:
My configuration command is as follows:./configure - shared - prefix/opt/runtime/qt6- opensource - confirm license - nomake examples - nomake tests - skip qtserialbus - skip qtserialport - grounded xcb xinput - release - qt libpng - system zlib - qt pcre - libinput - fontconfig - system freetype - system harfbuzz - xcb xlib - xcb - qpa xcb - no path - no directfb - no use gold linker -- DCMAKE_C_COMPILER: STRING=/usr/bin/clang-12- DCMAKE_CXX_COMPILER: STRING=/usr/bin/clang++-12- DCMAKE_CXX_FLAGS="- lstdc++fs - std=c++17"
-
@kero990 said in build qt6 on arm64 debian10 or Ubuntu 18:
/root/qt-everywhere-src-6.4.3/qttools/src/qdoc/docbookgenerator.cpp:2463:36: error: no member named 'transform_reduce' in namespace 'std'
QString details = std::transform_reduce(I think your compiler is too old. You need at least C++17 capable compiler.
-
@jsulm said in build qt6 on arm64 debian10 or Ubuntu 18:
I think your compiler is too old. You need at least C++17 capable compiler.
Of course, I know that the compiler is too old, but I am not satisfied with the status quo: that is, all qt6 projects cannot run natively on debian10/Ubuntu 18.
I can't rule out the above error, so I'm going to take the second place, hoping to block the compilation of qdoc. Unfortunately, there is no option to do this, and qdoc is even necessary.
In fact, gcc8 and clang12 should support most c++17, so it is not impossible in theory
Maybe i should try an earlier version of qt6. What I'm trying to do now is 6.4.3 -
Now I have compiled 100% with the same configure and cmake in the qtbase directory, and I have successfully made install.
Is this different from compiling in the code root directory? If modules are missing in this compilation, can I compile these modules separately and integrate them into the final qt6 release -
I have successfully compiled qtbase and then proceeded to other top-level directories to use cmake to build and install other modules.
The current issue is that the qmldom module always throws an error during compilation in the qtdeclarative directory.error: no matching function for call to object of type 'QQmlJS::Dom::DirectVisitor' (aka 'function_ref<bool (const QQmlJS::Dom::PathEls::PathComponent &, qxp::function_ref<QQmlJS::Dom::DomItem ()>)>') return visitor(c, lazyWrap); ^~~~~~~
I don't know how to fix this error and it seems like qmldom cannot be excluded from the compilation. However, qtdeclarative is too important to be omitted, so currently I can only use qtbase.
-
@kero990
I've an similiar QQmlJS error message during cross compiling Qt6.7.2 to armv7:qt-everywhere-src-6.7.2/qtdeclarative/src/qmldom/qqmldomitem_p.h:1128:10: error: no matching function for call to ‘QQmlJS::Dom::DomItem::dvItem(QQmlJS::Dom::DirectVisitor&, const QQmlJS::Dom::PathEls::PathComponent&, QQmlJS::Dom::DomItem::dvReference(QQmlJS::Dom::DirectVisitor, const QQmlJS::Dom::PathEls::PathComponent&, QQmlJS::Dom::Path) const::<lambda()>) const’ });
Build environment: Host Ubuntu 22.04, qt-everywhere-src-6.7.2, gcc-arm-8.3-2019.02-x86_64-arm-linux-gnueabi, using Qt's 'configure'
-
@_ba_ said in build qt6 on arm64 debian10 or Ubuntu 18:
Did anybody fixed the problem?
Your gcc is too old: https://doc.qt.io/qt-6/supported-platforms.html
-
@Christian-Ehrlicher: With Ubuntu's cross compiler "arm-linux-gnueabi-..." a build was possible, not yet tested on target.
Thanks!