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

[REG 6.1.3->6.2.0] macOS: Can not configure qml / network example with statically compiled Qt

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • 6.4.0 RC1, 6.5.0 Beta1
    • 6.2.0 Beta4
    • Build System: CMake
    • macOS10.14 x64
      macOS10.15 x64
      macOS11.0 x64
    • macOS
    • d754e43721 (qt/qtbase/dev) d754e43721 (qt/tqtc-qtbase/dev) a7dc4ce808 (qt/qtbase/6.4) a7dc4ce808 (qt/tqtc-qtbase/6.4)

      Have Qt sources available (in /Users/qt/RTA/src-6.2.0), configure:

       cmake 
      -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ 
      -DQT_BUILD_EXAMPLES=OFF -DCMAKE_BUILD_TYPE=Release 
      -DFEATURE_separate_debug_info=OFF -DFEATURE_headersclean=ON 
      -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl 
      -DODBC_ROOT=/usr/local/opt/libiodbc 
      -DPostgreSQL_ROOT=/Applications/Postgres.app/Contents/Versions/9.6/bin/..
       -DQT_BUILD_TESTS=OFF -DBUILD_SHARED_LIBS=OFF /Users/qt/RTA/src-6.2.0 
      -DCMAKE_INSTALL_PREFIX:PATH=/Users/qt/RTA/src-6.2.0/qtbase 
      -DBUILD_qtwebengine=FALSE
      

      And build: cmake --build . --parallel

      -> build finishes without errors.

      Copy (randomly picked) example /qtdeclarative/examples/quick/quickwidgets/quickwidget out of the source dir, in this case to /Users/qt/RTA/tmp/quickwidget.

      Set CMAKE_PREFIX_PATH=/Users/qt/RTA/src-6.2.0/qtbase/lib/cmake and add /Users/qt/RTA/src-6.2.0/qtbase/bin to PATH.

      Configure example: cmake CMakeLists.txt

      -> fails:

      qmldir file not found at "/Users/qt/RTA/tmp/quickwidget/QuickWidgetExample"
      qmldir file not found at "/Users/qt/RTA/tmp/quickwidget/QuickWidgetExample"
      -- Configuring done
      CMake Error at /Users/qt/RTA/src-6.2.0/qtbase/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:519 (add_executable):
        Target "quickwidget" links to target
        "WrapOpenSSLHeaders::WrapOpenSSLHeaders" but the target was not found.
        Perhaps a find_package() call is missing for an IMPORTED target, or an
        ALIAS target is missing?
      Call Stack (most recent call first):
        /Users/qt/RTA/src-6.2.0/qtbase/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:484 (_qt_internal_create_executable)
        /Users/qt/RTA/src-6.2.0/qtbase/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:777 (qt6_add_executable)
        CMakeLists.txt:24 (qt_add_executable)
      CMake Error at /Users/qt/RTA/src-6.2.0/qtbase/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:519 (add_executable):
        Target "quickwidget" links to target
        "WrapOpenSSLHeaders::WrapOpenSSLHeaders" but the target was not found.
        Perhaps a find_package() call is missing for an IMPORTED target, or an
        ALIAS target is missing?
      Call Stack (most recent call first):
        /Users/qt/RTA/src-6.2.0/qtbase/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:484 (_qt_internal_create_executable)
        /Users/qt/RTA/src-6.2.0/qtbase/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:777 (qt6_add_executable)
        CMakeLists.txt:24 (qt_add_executable)
      -- Generating done
      CMake Generate step failed.  Build files cannot be regenerated correctly
      

      Same test is run with gcc, MSVC2019 x64 and MinGW x64, and it works there, quickwidgets example is compiled and launched.

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

            jbornema Joerg Bornemann
            joaijala Johanna Äijälä
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: