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

CMake: linker error with Linux Static Libraries while using QtQuick.Controls

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 6.1.1, 6.2.0 Alpha
    • 6.0.3
    • Build System: CMake
    • None
    • Ubuntu 20.04
    • Linux/Wayland, Linux/X11
    • ddaa7150d85624ab545ccfe098fe8b2d18241940 (qt/qtbase/dev) f5047e785bf85319458f4a5d4c6046c82aa137f3 (qt/qtbase/6.1)

    Description

      Hi!

       

      I’ve built static libraries of Qt6(6.0.3) from Source on Ubuntu 20.04 with the following command:

       

      ../qt5/configure -release -static  -prefix ../staticlibs -nomake examples -nomake tests -nomake tools -platform linux-clang

       

      Normal builds work fine and * I'm able to deploy an application. But when I use any version of *QtQuick.Controls in the qml file, I get a linker error like:

       

       

      /usr/bin/ld: /home/twadmin/qt6/staticlibs/./qml/QtQuick/Controls/Basic/objects-Release/qtquickcontrols2basicstyleplugin_resources_3/.rcc/qmlcache/qtquickcontrols2basicstyleplugin_qml_files_2/qmlcache_loader.cpp.o: in function `_GLOBAL__sub_I_qmlcache_loader.cpp':
      qmlcache_loader.cpp:(.text.startup+0x7): undefined reference to `qInitResources_qtquickcontrols2basicstyleplugin_qml_files_2_qmlcache()'

      To re-iterate, non-controls builds work fine! I've attached a verbose of the cmake build here.

       

      Attachments

        1. cachelog.txt
          576 kB
          SIDHARTH NAIR
        2. CMakeLists.txt
          2 kB
          SIDHARTH NAIR
        3. CMakeLists-1.txt
          2 kB
          SIDHARTH NAIR
        4. fix_transitional_propagation.patch
          1 kB
          Alexey Edelev
        5. log.txt
          285 kB
          SIDHARTH NAIR
        6. qt_6_1_static.txt
          395 kB
          SIDHARTH NAIR
        7. verbose.txt
          547 kB
          SIDHARTH NAIR

        Issue Links

          Activity

            People

              semlanik Alexey Edelev
              sidmn SIDHARTH NAIR
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: