Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Build QT 6.8 for Ubuntu 20.04 ERROR
Qt 6.11 is out! See what's new in the release blog

Build QT 6.8 for Ubuntu 20.04 ERROR

Scheduled Pinned Locked Moved Unsolved General and Desktop
10 Posts 4 Posters 2.7k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MHermann
    wrote on last edited by MHermann
    #1

    Hi all,
    I try to build Qt6.8 for Ubuntu 20.04.
    I already got several errors and fixed them by installing different things.
    But now the build again stops with an error.
    But I don't know how to fix it.
    Can someone help me?

    This is the output:

    cmake --build . --parallel 8
    [1/1707] Check QtWebEngine support
    QtWebEngine will not be built: Build requires nss >= 3.26.
    [6/1707] Building CXX object qtopcua/src/opcua/CMakeFiles/OpcUa.dir/x509/qopcuax509certificatesigningrequest_openssl.cpp.o
    FAILED: qtopcua/src/opcua/CMakeFiles/OpcUa.dir/x509/qopcuax509certificatesigningrequest_openssl.cpp.o 
    /usr/bin/c++ -DOpcUa_EXPORTS -DQT_ASCII_CAST_WARNINGS -DQT_BUILDING_QT -DQT_BUILD_OPCUA_LIB -DQT_CORE_LIB -DQT_DEPRECATED_WARNINGS -DQT_EXPLICIT_QFILE_CONSTRUCTION_FROM_PATH -DQT_LEAN_HEADERS=1 -DQT_MOC_COMPAT -DQT_NETWORK_LIB -DQT_NO_AS_CONST=1 -DQT_NO_CAST_TO_ASCII -DQT_NO_CONTEXTLESS_CONNECT=1 -DQT_NO_DEBUG -DQT_NO_EXCEPTIONS -DQT_NO_FOREACH -DQT_NO_FOREACH=1 -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_QASCONST -DQT_NO_QEXCHANGE -DQT_USE_QSTRINGBUILDER -D_GLIBCXX_ASSERTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I/home/user/qt-hostbuild/qtopcua/src/opcua/OpcUa_autogen/include -I/home/user/qt-hostbuild/qtbase/include -I/home/user/qt-hostbuild/qtbase/include/QtOpcUa -I/home/user/qt5/qtopcua/src/opcua -I/home/user/qt-hostbuild/qtopcua/src/opcua -I/home/user/qt-hostbuild/qtbase/include/QtOpcUa/6.8.0 -I/home/user/qt-hostbuild/qtbase/include/QtOpcUa/6.8.0/QtOpcUa -I/home/user/qt-hostbuild/qtbase/include/QtCore -I/home/user/qt5/qtbase/mkspecs/linux-g++ -I/home/user/qt-hostbuild/qtbase/include/QtNetwork -I/home/user/qt-hostbuild/qtbase/src/corelib -I/home/user/qt-hostbuild/qtbase/include/QtCore/6.8.0 -I/home/user/qt-hostbuild/qtbase/include/QtCore/6.8.0/QtCore -I/home/user/qt-hostbuild/qtbase/src/network -I/home/user/qt-hostbuild/qtbase/include/QtNetwork/6.8.0 -I/home/user/qt-hostbuild/qtbase/include/QtNetwork/6.8.0/QtNetwork -DNDEBUG -O2 -std=c++17 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -fno-exceptions -fconstexpr-ops-limit=40000000 -fPIC -U_FORTIFY_SOURCE -Wsuggest-override -fcf-protection=full -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fstack-clash-protection -Winvalid-pch -include /home/user/qt-hostbuild/qtopcua/src/opcua/CMakeFiles/OpcUa.dir/cmake_pch.hxx -MD -MT qtopcua/src/opcua/CMakeFiles/OpcUa.dir/x509/qopcuax509certificatesigningrequest_openssl.cpp.o -MF qtopcua/src/opcua/CMakeFiles/OpcUa.dir/x509/qopcuax509certificatesigningrequest_openssl.cpp.o.d -o qtopcua/src/opcua/CMakeFiles/OpcUa.dir/x509/qopcuax509certificatesigningrequest_openssl.cpp.o -c /home/user/qt5/qtopcua/src/opcua/x509/qopcuax509certificatesigningrequest_openssl.cpp
    In file included from /home/user/qt5/qtopcua/src/opcua/x509/qopcuax509certificatesigningrequest_openssl.cpp:5:
    /home/user/qt5/qtopcua/src/opcua/x509/qopcuax509certificatesigningrequest_openssl.cpp: In member function ‘QByteArray QOpcUaX509CertificateSigningRequestPrivate::createSelfSignedCertificate(const QOpcUaKeyPair&, int)’:
    /home/user/qt5/qtopcua/src/opcua/x509/qopcuax509certificatesigningrequest_openssl.cpp:426:34: error: cannot convert ‘GENERAL_NAMES*’ {aka ‘stack_st_GENERAL_NAME*’} to ‘OPENSSL_STACK*’ {aka ‘stack_st*’}
      426 |     q_sk_GENERAL_NAME_push(akid->issuer, generalName);
    /home/user/qt5/qtopcua/src/opcua/x509/openssl_symbols_p.h:433:60: note: in definition of macro ‘q_sk_GENERAL_NAME_push’
      433 | #define q_sk_GENERAL_NAME_push(st, val) q_OPENSSL_sk_push((st), (val))
          |                                                            ^~
    In file included from /home/user/qt5/qtopcua/src/opcua/x509/openssl_symbols_p.h:211,
                     from /home/user/qt5/qtopcua/src/opcua/x509/qopcuax509certificatesigningrequest_openssl.cpp:5:
    /home/user/qt5/qtopcua/src/opcua/x509/qsslsocket_openssl11_symbols_p.h:60:57: note:   initializing argument 1 of ‘void q_OPENSSL_sk_push(OPENSSL_STACK*, void*)’
       60 | Q_AUTOTEST_EXPORT void q_OPENSSL_sk_push(OPENSSL_STACK *st, void *data);
          |                                          ~~~~~~~~~~~~~~~^~
    In file included from /usr/local/include/openssl/crypto.h:34,
                     from /usr/local/include/openssl/bio.h:30,
                     from /usr/local/include/openssl/asn1.h:30,
                     from /home/user/qt5/qtopcua/src/opcua/x509/openssl_symbols_p.h:23,
                     from /home/user/qt5/qtopcua/src/opcua/x509/qopcuax509certificatesigningrequest_openssl.cpp:5:
    /usr/local/include/openssl/x509v3.h:230:1: note: class type ‘GENERAL_NAMES’ {aka ‘stack_st_GENERAL_NAME’} is incomplete
      230 | SKM_DEFINE_STACK_OF_INTERNAL(GENERAL_NAME, GENERAL_NAME, GENERAL_NAME)
          | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
    [13/1707] Run gn for target Pdf in /home/user/qt-hostbuild/qtwebengine/src/pdf/Release/x86_64
    -- Found Gn: /home/user/qt-hostbuild/qtwebengine/install/bin/gn (found suitable exact version "6.8.0.qtwebengine.qt.io")
    -- Running gn in /home/user/qt-hostbuild/qtwebengine/src/pdf/Release/x86_64
    -- GN command:
    /home/user/qt-hostbuild/qtwebengine/install/bin/gn gen /home/user/qt-hostbuild/qtwebengine/src/pdf/Release/x86_64 --script-executable=/usr/bin/python3 --root=/home/user/qt5/qtwebengine/src/3rdparty/chromium
    -- GN arg file:
    /home/user/qt-hostbuild/qtwebengine/src/pdf/Release/x86_64/args.gn
    -- GN args: 
    angle_enable_swiftshader=false
    blink_symbol_level=0
    build_dawn_tests=false
    chrome_pgo_phase=0
    custom_toolchain="/home/user/qt-hostbuild/qtwebengine/src/pdf/target_toolchain:target"
    dawn_use_swiftshader=false
    dcheck_always_on=false
    enable_arcore=false
    enable_ipc_fuzzer=false
    enable_precompiled_headers=false
    enable_remoting=false
    enable_resource_allowlist_generation=false
    enable_rust=false
    enable_swiftshader=false
    enable_swiftshader_vulkan=false
    enable_vr=false
    enable_web_speech=false
    forbid_non_component_debug_builds=false
    host_cpu="x64"
    host_pkg_config="/usr/bin/pkg-config"
    host_toolchain="/home/user/qt-hostbuild/qtwebengine/src/pdf/host_toolchain:host"
    init_stack_vars=false
    is_cfi=false
    is_clang=false
    is_component_build=false
    is_debug=false
    is_gcc=true
    is_mingw=false
    is_msvc=false
    is_official_build=true
    is_qtwebengine=true
    is_shared=true
    is_unsafe_developer_build=false
    jumbo_build_excluded=["browser"]
    jumbo_file_merge_limit=8
    ozone_auto_platforms=false
    pdf_enable_v8=false
    pdf_enable_xfa=false
    pdf_enable_xfa_bmp=false
    pdf_enable_xfa_gif=false
    pdf_enable_xfa_png=false
    pdf_enable_xfa_tiff=false
    pdfium_use_qt_libpng=false
    pdfium_use_system_libpng=true
    pdfium_use_system_libtiff=false
    pdfium_use_system_zlib=true
    pkg_config="/usr/bin/pkg-config"
    qt_freetype_config="/home/user/qt-hostbuild/qtwebengine/src/pdf/Release/x86_64:qt_freetype_config"
    qt_harfbuzz_config="/home/user/qt-hostbuild/qtwebengine/src/pdf/Release/x86_64:qt_harfbuzz_config"
    qt_libjpeg_config="/home/user/qt-hostbuild/qtwebengine/src/pdf/Release/x86_64:qt_libjpeg_config"
    qt_libpng_config="/home/user/qt-hostbuild/qtwebengine/src/pdf/Release/x86_64:qt_libpng_config"
    qtwebengine_target="/home/user/qt-hostbuild/qtwebengine/src/pdf/Release/x86_64:QtPdf"
    strip_absolute_paths_from_debug_symbols=false
    symbol_level=0
    treat_warnings_as_errors=false
    use_allocator_shim=false
    use_custom_libcxx=false
    use_dawn=false
    use_gold=false
    use_jumbo_build=true
    use_lld=false
    use_ml_inliner=false
    use_partition_alloc=true
    use_partition_alloc_as_malloc=false
    use_perfetto_client_library=false
    use_qt_freetype=false
    use_qt_harfbuzz=false
    use_qt_libjpeg=false
    use_sysroot=false
    use_system_icu=false
    use_system_libopenjpeg2=false
    use_system_libpng=true
    use_system_zlib=true
    use_thin_lto=false
    v8_enable_webassembly=false
    v8_symbol_level=0
    -- GN Done. Made 19435 targets from 3157 files in 18328ms
    ninja: build stopped: subcommand failed.
    
    1 Reply Last reply
    0
    • Christian EhrlicherC Online
      Christian EhrlicherC Online
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      There is no Qt8. 6 - you seem to be compiling some Qt5 version but did not install openssl 1.1 but 3.x development package. Qt5 needs openssl 1.1.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      2
      • M Offline
        M Offline
        MHermann
        wrote on last edited by MHermann
        #3

        The folder is named "qt5" but I am building Qt6.8.
        It's because in the manual was also the folder name "qt5" used...

        And I just installed openssl 3.3.1, because it was complaining about openssl 1.1.

        1 Reply Last reply
        0
        • M Offline
          M Offline
          MHermann
          wrote on last edited by
          #4

          Any more ideas what could be the problem?

          1 Reply Last reply
          0
          • Christian EhrlicherC Online
            Christian EhrlicherC Online
            Christian Ehrlicher
            Lifetime Qt Champion
            wrote on last edited by
            #5

            see https://bugreports.qt.io/browse/QTBUG-122728
            Which (and why) Qt6.8 version do you try to build - make sure you're using the latest beta.

            Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
            Visit the Qt Academy at https://academy.qt.io/catalog

            1 Reply Last reply
            0
            • M Offline
              M Offline
              MHermann
              wrote on last edited by
              #6

              I did:

              git clone "https://codereview.qt-project.org/qt/qt5"
              

              And then:

              git checkout 6.8
              

              So I hope I am trying to build Qt6.8.0 beta.
              Can I check this?
              And I try to build this, because I wanted to use the newest version.
              Actually I am using Qt5.12.7. And I think it's a little bit outdatet.

              1 Reply Last reply
              0
              • Christian EhrlicherC Online
                Christian EhrlicherC Online
                Christian Ehrlicher
                Lifetime Qt Champion
                wrote on last edited by
                #7

                Why don't you simply install a pre-compiled Qt version with the Qt installer instead?

                Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                Visit the Qt Academy at https://academy.qt.io/catalog

                1 Reply Last reply
                0
                • M Offline
                  M Offline
                  MHermann
                  wrote on last edited by
                  #8

                  Because after compiling the Qt version for my host (Ubunut 20.04) I would like to cross-compile it for Raspberry Pi.

                  artwawA 1 Reply Last reply
                  0
                  • M MHermann

                    Because after compiling the Qt version for my host (Ubunut 20.04) I would like to cross-compile it for Raspberry Pi.

                    artwawA Offline
                    artwawA Offline
                    artwaw
                    wrote on last edited by
                    #9

                    @MHermann You can install soures from the installer and then crosscompile? Still no need for compiling for Ubuntu?

                    For more information please re-read.

                    Kind Regards,
                    Artur

                    1 Reply Last reply
                    0
                    • J Offline
                      J Offline
                      jarle
                      wrote on last edited by
                      #10

                      Why such an old Ubuntu?

                      Just looking briefly at the error my guess is that QT 6.8 code expects a newer openssl library than what's available on your machine. I compiled the latest QT 6.8 branch on Ubuntu 24.04 today without any compilation errors.

                      1 Reply Last reply
                      0

                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved