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

Can not build Qt 6 with cmake on macOS when ssl is disabled

    XMLWordPrintable

    Details

    • Type: Suggestion
    • Status: Reported
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 6.0.0
    • Fix Version/s: None
    • Component/s: Network
    • Labels:
      None
    • Platform/s:
      macOS

      Description

      I'm building Qt 6.0 with (plain) cmake 3.19.2, without using the Qt configure script. I've set options to disable ssl because I don't want to link any ssl code into the binary. The cmake options are:

          "-DFEATURE_ssl=OFF"
          "-DFEATURE_openssl=OFF"
          "-DFEATURE_openssl_linked=OFF"
          "-DFEATURE_openssl_runtime=OFF"
          "-DFEATURE_opensslv11=OFF"
      

      When I compile with latest XCode, I get a number of errors:

      FAILED: qtbase/src/network/CMakeFiles/Network.dir/ssl/qsslcertificate.cpp.o 
      /data/Tools/lib/ccache/c++ -DGL_SILENCE_DEPRECATION -DNetwork_EXPORTS -DQT_ASCII_CAST_WARNINGS -DQT_BUILDING_QT -DQT_BUILD_NETWORK_LIB -DQT_CORE_LIB -DQT_DEPRECATED_WARNINGS -DQT_DEPRECATED_WARNINGS_SINCE=0x060000 -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_MOC_COMPAT -DQT_NO_CAST_TO_ASCII -DQT_NO_EXCEPTIONS -DQT_NO_FOREACH -DQT_NO_USING_NAMESPACE -DQT_USE_QSTRINGBUILDER -DQT_USE_SYSTEM_PROXIES -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -Iqtbase/src/network/Network_autogen/include -Iqtbase/include -Iqtbase/include/QtNetwork -I../qtbase/src/network -Iqtbase/src/network -I../qtbase/src/network/kernel -Iqtbase/include/QtNetwork/6.0.0 -Iqtbase/include/QtNetwork/6.0.0/QtNetwork -Iqtbase/include/QtCore -I../qtbase/mkspecs/macx-clang -Iqtbase/src/corelib -Iqtbase/include/QtCore/6.0.0 -Iqtbase/include/QtCore/6.0.0/QtCore -isystem /data/Debug/include -glldb -fno-omit-frame-pointer -O1 -march=ivybridge -mtune=skylake -mmacosx-version-min=10.15 -g -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -mmacosx-version-min=10.14 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -fno-exceptions -fPIC -fapplication-extension -std=c++17 -Winvalid-pch -Xclang -include-pch -Xclang /data/tmp/qt/x86_64/qtbase/src/network/CMakeFiles/Network.dir/cmake_pch.hxx.pch -Xclang -include -Xclang /data/tmp/qt/x86_64/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 ../qtbase/src/network/ssl/qsslcertificate.cpp
      In file included from ../qtbase/src/network/ssl/qsslcertificate.cpp:138:
      In file included from ../qtbase/src/network/ssl/qsslsocket_mac_p.h:60:
      In file included from ../qtbase/src/network/ssl/qsslsocket_p.h:60:
      ../qtbase/src/network/ssl/qsslconfiguration_p.h:105:13: error: field has incomplete type 'QSslKey'
          QSslKey privateKey;
                  ^
      ../qtbase/src/network/ssl/qsslcertificate.h:62:7: note: forward declaration of 'QSslKey'
      class QSslKey;
            ^
      In file included from ../qtbase/src/network/ssl/qsslcertificate.cpp:138:
      In file included from ../qtbase/src/network/ssl/qsslsocket_mac_p.h:60:
      In file included from ../qtbase/src/network/ssl/qsslsocket_p.h:60:
      ../qtbase/src/network/ssl/qsslconfiguration_p.h:106:5: error: unknown type name 'QSslCipher'
          QSslCipher sessionCipher;
          ^
      ../qtbase/src/network/ssl/qsslconfiguration_p.h:108:11: error: use of undeclared identifier 'QSslCipher'
          QList<QSslCipher> ciphers;
                ^
      ../qtbase/src/network/ssl/qsslconfiguration_p.h:112:5: error: use of undeclared identifier 'QSslSocket'; did you mean 'QTcpSocket'?
          QSslSocket::PeerVerifyMode peerVerifyMode;
          ^~~~~~~~~~
          QTcpSocket
      /data/Debug/include/../../../../../../../../../System/Volumes/Data/data/tmp/qt/qtbase/src/network/socket/qtcpsocket.h:52:24: note: 'QTcpSocket' declared here
      class Q_NETWORK_EXPORT QTcpSocket : public QAbstractSocket
                             ^
      In file included from ../qtbase/src/network/ssl/qsslcertificate.cpp:138:
      In file included from ../qtbase/src/network/ssl/qsslsocket_mac_p.h:60:
      In file included from ../qtbase/src/network/ssl/qsslsocket_p.h:60:
      ../qtbase/src/network/ssl/qsslconfiguration_p.h:112:17: error: no type named 'PeerVerifyMode' in 'QTcpSocket'
          QSslSocket::PeerVerifyMode peerVerifyMode;
          ~~~~~~~~~~~~^
      ../qtbase/src/network/ssl/qsslconfiguration_p.h:125:5: error: unknown type name 'QSslDiffieHellmanParameters'
          QSslDiffieHellmanParameters dhParams;
          ^
      ../qtbase/src/network/ssl/qsslconfiguration_p.h:132:13: error: field has incomplete type 'QSslKey'
          QSslKey ephemeralServerKey;
                  ^
      ../qtbase/src/network/ssl/qsslcertificate.h:62:7: note: forward declaration of 'QSslKey'
      class QSslKey;
            ^
      In file included from ../qtbase/src/network/ssl/qsslcertificate.cpp:138:
      In file included from ../qtbase/src/network/ssl/qsslsocket_mac_p.h:60:
      In file included from ../qtbase/src/network/ssl/qsslsocket_p.h:60:
      ../qtbase/src/network/ssl/qsslconfiguration_p.h:138:5: error: incomplete type 'QSslConfiguration' named in nested name specifier
          QSslConfiguration::NextProtocolNegotiationStatus nextProtocolNegotiationStatus;
          ^~~~~~~~~~~~~~~~~~~
      /data/Debug/include/../../../../../../../../../System/Volumes/Data/data/tmp/qt/qtbase/src/network/access/qnetworkrequest.h:51:7: note: forward declaration of 'QSslConfiguration'
      class QSslConfiguration;
            ^
      In file included from ../qtbase/src/network/ssl/qsslcertificate.cpp:138:
      In file included from ../qtbase/src/network/ssl/qsslsocket_mac_p.h:60:
      In file included from ../qtbase/src/network/ssl/qsslsocket_p.h:60:
      ../qtbase/src/network/ssl/qsslconfiguration_p.h:88:26: error: use of undeclared identifier 'QSslSocket'; did you mean 'QTcpSocket'?
                peerVerifyMode(QSslSocket::AutoVerifyPeer),
                               ^~~~~~~~~~
                               QTcpSocket
      /data/Debug/include/../../../../../../../../../System/Volumes/Data/data/tmp/qt/qtbase/src/network/socket/qtcpsocket.h:52:24: note: 'QTcpSocket' declared here
      class Q_NETWORK_EXPORT QTcpSocket : public QAbstractSocket
                             ^
      In file included from ../qtbase/src/network/ssl/qsslcertificate.cpp:138:
      In file included from ../qtbase/src/network/ssl/qsslsocket_mac_p.h:60:
      In file included from ../qtbase/src/network/ssl/qsslsocket_p.h:60:
      ../qtbase/src/network/ssl/qsslconfiguration_p.h:88:38: error: no member named 'AutoVerifyPeer' in 'QTcpSocket'
                peerVerifyMode(QSslSocket::AutoVerifyPeer),
                               ~~~~~~~~~~~~^
      ../qtbase/src/network/ssl/qsslconfiguration_p.h:93:20: error: use of undeclared identifier 'QSslDiffieHellmanParameters'
                dhParams(QSslDiffieHellmanParameters::defaultParameters()),
                         ^
      ../qtbase/src/network/ssl/qsslconfiguration_p.h:97:41: error: incomplete type 'QSslConfiguration' named in nested name specifier
                nextProtocolNegotiationStatus(QSslConfiguration::NextProtocolNegotiationNone)
                                              ^~~~~~~~~~~~~~~~~~~
      /data/Debug/include/../../../../../../../../../System/Volumes/Data/data/tmp/qt/qtbase/src/network/access/qnetworkrequest.h:51:7: note: forward declaration of 'QSslConfiguration'
      class QSslConfiguration;
            ^
      In file included from ../qtbase/src/network/ssl/qsslcertificate.cpp:138:
      In file included from ../qtbase/src/network/ssl/qsslsocket_mac_p.h:60:
      In file included from ../qtbase/src/network/ssl/qsslsocket_p.h:60:
      ../qtbase/src/network/ssl/qsslconfiguration_p.h:170:8: error: incomplete type 'QSslConfiguration' named in nested name specifier
      inline QSslConfiguration::QSslConfiguration(QSslConfigurationPrivate *dd)
             ^~~~~~~~~~~~~~~~~~~
      /data/Debug/include/../../../../../../../../../System/Volumes/Data/data/tmp/qt/qtbase/src/network/access/qnetworkrequest.h:51:7: note: forward declaration of 'QSslConfiguration'
      class QSslConfiguration;
            ^
      In file included from ../qtbase/src/network/ssl/qsslcertificate.cpp:138:
      In file included from ../qtbase/src/network/ssl/qsslsocket_mac_p.h:60:
      In file included from ../qtbase/src/network/ssl/qsslsocket_p.h:60:
      ../qtbase/src/network/ssl/qsslconfiguration_p.h:170:8: error: incomplete type 'QSslConfiguration' named in nested name specifier
      inline QSslConfiguration::QSslConfiguration(QSslConfigurationPrivate *dd)
             ^~~~~~~~~~~~~~~~~~~
      /data/Debug/include/../../../../../../../../../System/Volumes/Data/data/tmp/qt/qtbase/src/network/access/qnetworkrequest.h:51:7: note: forward declaration of 'QSslConfiguration'
      class QSslConfiguration;
            ^
      In file included from ../qtbase/src/network/ssl/qsslcertificate.cpp:138:
      In file included from ../qtbase/src/network/ssl/qsslsocket_mac_p.h:60:
      In file included from ../qtbase/src/network/ssl/qsslsocket_p.h:61:
      ../qtbase/src/network/ssl/qocspresponse.h:50:1: error: static_assert failed due to requirement 'bool(-1 == 1)' "Required feature ssl for file ../qtbase/src/network/ssl/qocspresponse.h not available."
      QT_REQUIRE_CONFIG(ssl);
      ^~~~~~~~~~~~~~~~~~~~~~
      /data/Debug/include/../../../../../../../../../System/Volumes/Data/data/tmp/qt/qtbase/src/corelib/global/qglobal.h:78:36: note: expanded from macro 'QT_REQUIRE_CONFIG'
      #define QT_REQUIRE_CONFIG(feature) Q_STATIC_ASSERT_X(QT_FEATURE_##feature == 1, "Required feature " #feature " for file " __FILE__ " not available.")
                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      /data/Debug/include/../../../../../../../../../System/Volumes/Data/data/tmp/qt/qtbase/src/corelib/global/qglobal.h:105:49: note: expanded from macro 'Q_STATIC_ASSERT_X'
      #  define Q_STATIC_ASSERT_X(Condition, Message) static_assert(bool(Condition), Message)
                                                      ^             ~~~~~~~~~~~~~~~
      In file included from ../qtbase/src/network/ssl/qsslcertificate.cpp:138:
      In file included from ../qtbase/src/network/ssl/qsslsocket_mac_p.h:60:
      ../qtbase/src/network/ssl/qsslsocket_p.h:108:22: error: unknown type name 'QSslSocket'; did you mean 'QTcpSocket'?
          Q_DECLARE_PUBLIC(QSslSocket)
                           ^~~~~~~~~~
                           QTcpSocket
      /data/Debug/include/../../../../../../../../../System/Volumes/Data/data/tmp/qt/qtbase/src/corelib/global/qglobal.h:1173:12: note: expanded from macro 'Q_DECLARE_PUBLIC'
          inline Class* q_func() noexcept { return static_cast<Class *>(q_ptr); } \
                 ^
      /data/Debug/include/../../../../../../../../../System/Volumes/Data/data/tmp/qt/qtbase/src/network/socket/qtcpsocket.h:52:24: note: 'QTcpSocket' declared here
      class Q_NETWORK_EXPORT QTcpSocket : public QAbstractSocket
                             ^
      In file included from ../qtbase/src/network/ssl/qsslcertificate.cpp:138:
      In file included from ../qtbase/src/network/ssl/qsslsocket_mac_p.h:60:
      ../qtbase/src/network/ssl/qsslsocket_p.h:108:22: error: unknown type name 'QSslSocket'; did you mean 'QTcpSocket'?
          Q_DECLARE_PUBLIC(QSslSocket)
                           ^~~~~~~~~~
                           QTcpSocket
      /data/Debug/include/../../../../../../../../../System/Volumes/Data/data/tmp/qt/qtbase/src/corelib/global/qglobal.h:1174:18: note: expanded from macro 'Q_DECLARE_PUBLIC'
          inline const Class* q_func() const noexcept { return static_cast<const Class *>(q_ptr); } \
                       ^
      /data/Debug/include/../../../../../../../../../System/Volumes/Data/data/tmp/qt/qtbase/src/network/socket/qtcpsocket.h:52:24: note: 'QTcpSocket' declared here
      class Q_NETWORK_EXPORT QTcpSocket : public QAbstractSocket
                             ^
      In file included from ../qtbase/src/network/ssl/qsslcertificate.cpp:138:
      In file included from ../qtbase/src/network/ssl/qsslsocket_mac_p.h:60:
      ../qtbase/src/network/ssl/qsslsocket_p.h:117:5: error: use of undeclared identifier 'QSslSocket'; did you mean 'QTcpSocket'?
          QSslSocket::SslMode mode;
          ^~~~~~~~~~
          QTcpSocket
      /data/Debug/include/../../../../../../../../../System/Volumes/Data/data/tmp/qt/qtbase/src/network/socket/qtcpsocket.h:52:24: note: 'QTcpSocket' declared here
      class Q_NETWORK_EXPORT QTcpSocket : public QAbstractSocket
                             ^
      In file included from ../qtbase/src/network/ssl/qsslcertificate.cpp:138:
      In file included from ../qtbase/src/network/ssl/qsslsocket_mac_p.h:60:
      ../qtbase/src/network/ssl/qsslsocket_p.h:117:17: error: no type named 'SslMode' in 'QTcpSocket'
          QSslSocket::SslMode mode;
          ~~~~~~~~~~~~^
      fatal error: too many errors emitted, stopping now [-ferror-limit=]
      

        Attachments

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

          Activity

            People

            Assignee:
            qtbuildsystem Qt Build System Team
            Reporter:
            emmenlau Mario Emmenlauer
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes