Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-140203

[qtbase] Build failure with -no-ssl

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Not Evaluated Not Evaluated
    • None
    • 6.10.0 Beta4
    • Network: SSL
    • None
    • Linux/Wayland

      configure.opt:

      -prefix
      /opt/qt-nossl
      -developer-build
      -ccache
      -linker
      lld
      -make
      tests
      -make
      examples
      -no-ssl
      -make
      manual-tests
      -prefix
      /opt/qt-nossl
      -skip-tests
      qtbase,qtdeclarative,qthttpserver,qtimageformats,qtlanguageserver,qttools,qtsvg,qtpositioning,qtserialport,qtshadertools,qtwebsockets,qtwebchannel
      -skip-examples
      qthttpserver,qtimageformats,qtlanguageserver,qttools,qtsvg,qtpositioning,qtserialport,qtshadertools,qtwebsockets,qtwebchannel
      -submodules
      qtdeclarative,qtpositioning,qtwebchannel,qthttpserver,qtsvg,qttools
      

      Multiple failures seen, I tried to patch them to at least complete the build.

      [6/6109] Building CXX object qtbase/src/network/CMakeFiles/Network.dir/ssl/qsslcertificate.cpp.o
      FAILED: qtbase/src/network/CMakeFiles/Network.dir/ssl/qsslcertificate.cpp.o
      /usr/bin/ccache /usr/bin/clang++ -DNetwork_EXPORTS -DQT_ASCII_CAST_WARNINGS -DQT_BUILDING_QT -DQT_BUILD_NETWORK_LIB-DQT_CORE_LIB -DQT_DEPRECATED_WARNINGS -DQT_EXPLICIT_QFILE_CONSTRUCTION_FROM_PATH -DQT_LEAN_HEADERS=1 -DQT_MOC_COMPAT -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_FROM_BYTEARRAY -DQT_NO_CAST_TO_ASCII -DQT_NO_CONTEXTLESS_CONNECT -DQT_NO_EXCEPTIONS -DQT_NO_FOREACH -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_QASCONST -DQT_NO_QEXCHANGE -DQT_NO_QSNPRINTF -DQT_NO_SCOPED_POINTER -DQT_NO_STD_FORMAT_SUPPORT -DQT_NO_URL_CAST_FROM_STRING -DQT_NO_USING_NAMESPACE -DQT_STRICT_QLIST_ITERATORS -DQT_USE_NODISCARD_FILE_OPEN -DQT_USE_QSTRINGBUILDER -DQT_USE_SYSTEM_PROXIES -D_GLIBCXX_ASSERTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I/home/moss/qt/build-nossl-base/qtbase/src/network/Network_autogen/include -I/home/moss/qt/build-nossl-base/qtbase/include -I/home/moss/qt/build-nossl-base/qtbase/include/QtNetwork -I/home/moss/qt/qt6/qtbase/src/network -I/home/moss/qt/build-nossl-base/qtbase/src/network -I/home/moss/qt/qt6/qtbase/src/network/kernel -I/home/moss/qt/build-nossl-base/qtbase/include/QtNetwork/6.11.0 -I/home/moss/qt/build-nossl-base/qtbase/include/QtNetwork/6.11.0/QtNetwork -I/home/moss/qt/qt6/qtbase/src/network/../3rdparty/libpsl -I/home/moss/qt/build-nossl-base/qtbase/include/QtCore -I/home/moss/qt/qt6/qtbase/mkspecs/linux-clang -I/home/moss/qt/build-nossl-base/qtbase/src/corelib -I/home/moss/qt/build-nossl-base/qtbase/include/QtCore/6.11.0 -I/home/moss/qt/build-nossl-base/qtbase/include/QtCore/6.11.0/QtCore -g -std=gnu++17 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -fPIC -Werror "-Wno-error=#warnings" -Wno-error=deprecated-declarations -Wno-error=deprecated-enum-enum-conversion -Wno-error=deprecated-copy-with-user-provided-copy -Wno-error=unused-but-set-variable -Xclang -fno-pch-timestamp -fcf-protection=full -ftrivial-auto-var-init=pattern -fstack-protector-strong -fno-exceptions -Winvalid-pch -Xclang -include-pch -Xclang /home/moss/qt/build-nossl-base/qtbase/src/network/CMakeFiles/Network.dir/cmake_pch.hxx.pch -Xclang -include -Xclang /home/moss/qt/build-nossl-base/qtbase/src/network/CMakeFiles/Network.dir/cmake_pch.hxx -MD -MT qtbase/src/network/CMakeFiles/Network.dir/ssl/qsslcertificate.cpp.o -MF qtbase/src/network/CMakeFiles/Network.dir/ssl/qsslcertificate.cpp.o.d -o qtbase/src/network/CMakeFiles/Network.dir/ssl/qsslcertificate.cpp.o -c /home/moss/qt/qt6/qtbase/src/network/ssl/qsslcertificate.cpp
      In file included from /home/moss/qt/qt6/qtbase/src/network/ssl/qsslcertificate.cpp:104:
      In file included from /home/moss/qt/qt6/qtbase/src/network/ssl/qsslcertificate_p.h:24:
      In file included from /home/moss/qt/qt6/qtbase/src/network/ssl/qtlsbackend_p.h:26:
      /home/moss/qt/qt6/qtbase/src/network/ssl/qdtls.h:97:20: error: use of undeclared identifier 'QSslSocket'; did you mean 'QUdpSocket'?
         97 |     explicit QDtls(QSslSocket::SslMode mode, QObject *parent = nullptr);
            |                    ^~~~~~~~~~
            |                    QUdpSocket
      /home/moss/qt/qt6/qtbase/src/network/ssl/qdtls.h:39:7: note: 'QUdpSocket' declared here
         39 | class QUdpSocket;
            |       ^
      /home/moss/qt/qt6/qtbase/src/network/ssl/qdtls.h:97:20: error: incomplete type 'QUdpSocket' named in nested name specifier
         97 |     explicit QDtls(QSslSocket::SslMode mode, QObject *parent = nullptr);
            |                    ^~~~~~~~~~~~
      /home/moss/qt/qt6/qtbase/src/network/ssl/qdtls.h:39:7: note: forward declaration of 'QUdpSocket'
         39 | class QUdpSocket;
            |       ^
      /home/moss/qt/qt6/qtbase/src/network/ssl/qdtls.h:106:5: error: use of undeclared identifier 'QSslSocket'; did you mean 'QUdpSocket'?
        106 |     QSslSocket::SslMode sslMode() const;
            |     ^~~~~~~~~~
            |     QUdpSocket
      /home/moss/qt/qt6/qtbase/src/network/ssl/qdtls.h:39:7: note: 'QUdpSocket' declared here
         39 | class QUdpSocket;
            |       ^
      /home/moss/qt/qt6/qtbase/src/network/ssl/qdtls.h:106:5: error: incomplete type 'QUdpSocket' named in nested name specifier
        106 |     QSslSocket::SslMode sslMode() const;
            |     ^~~~~~~~~~~~
      /home/moss/qt/qt6/qtbase/src/network/ssl/qdtls.h:39:7: note: forward declaration of 'QUdpSocket'
         39 | class QUdpSocket;
            |       ^
      In file included from /home/moss/qt/qt6/qtbase/src/network/ssl/qsslcertificate.cpp:104:
      In file included from /home/moss/qt/qt6/qtbase/src/network/ssl/qsslcertificate_p.h:24:
      /home/moss/qt/qt6/qtbase/src/network/ssl/qtlsbackend_p.h:227:13: error: incomplete type 'QSslSocket' named in nested name specifier
        227 |     virtual QSslSocket::SslMode cryptographMode() const = 0;
            |             ^~~~~~~~~~~~
      /home/moss/qt/qt6/qtbase/src/network/ssl/qtlsbackend_p.h:50:7: note: forward declaration of 'QSslSocket'
         50 | class QSslSocket;
            |       ^
      5 errors generated.
      ninja: build stopped: subcommand failed.
      

      After patching with:

      diff --git a/src/network/ssl/qtlsbackend_p.h b/src/network/ssl/qtlsbackend_p.h
      index f973fde402d..084b71b71d5 100644
      --- a/src/network/ssl/qtlsbackend_p.h
      +++ b/src/network/ssl/qtlsbackend_p.h
      @@ -22,7 +22,7 @@
       #include "qsslerror.h"
       #include "qssl_p.h"
      
      -#if QT_CONFIG(dtls)
      +#if QT_CONFIG(dtls) && QT_CONFIG(ssl)
       #include "qdtls.h"
       #endif
      
      @@ -188,7 +188,7 @@ public:
       class TlsCryptograph;
       #endif // QT_CONFIG(ssl)
      
      -#if QT_CONFIG(dtls)
      +#if QT_CONFIG(dtls) && QT_CONFIG(ssl)
      
       class Q_NETWORK_EXPORT DtlsBase
       {
      @@ -259,7 +259,7 @@ public:
       class DtlsCookieVerifier;
       class DtlsCryptograph;
      
      -#endif // QT_CONFIG(dtls)
      +#endif // QT_CONFIG(dtls) && QT_CONFIG(ssl)
      
       } // namespace QTlsPrivate
      

      I got the build output in build_part_2.txt attached.

      After patching that with

      diff --git a/src/plugins/tls/CMakeLists.txt b/src/plugins/tls/CMakeLists.txt
      index 91b9267123f..650e5e1e949 100644
      --- a/src/plugins/tls/CMakeLists.txt
      +++ b/src/plugins/tls/CMakeLists.txt
      @@ -5,7 +5,7 @@ if(QT_FEATURE_securetransport)
           add_subdirectory(securetransport)
       endif()
      
      -if (QT_FEATURE_openssl OR QT_FEATURE_openssl_linked)
      +if ((QT_FEATURE_openssl OR QT_FEATURE_openssl_linked) AND QT_FEATURE_ssl)
           add_subdirectory(openssl)
       endif()
      

      I started to get failures in qtbase examples and gave up.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            tpochep Timur Pocheptsov
            moheim Moss Heim
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes