Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Qt 6 cmake lupdate update_translations hangs forever
QtWS25 Last Chance

Qt 6 cmake lupdate update_translations hangs forever

Scheduled Pinned Locked Moved Solved Installation and Deployment
8 Posts 3 Posters 644 Views
  • 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.
  • P Offline
    P Offline
    pip010
    wrote on 17 Jun 2024, 14:13 last edited by pip010
    #1

    I am with latest cmake 3.29.2 and latest Qt 6.7.1 (built from source).

    When running the update_translations project in MSVC it never ends.

    I tried many different ways of calling qt_add_trasnlations where my goal was to limit the scope of which files to parse in order to generate the ts files. So far nothing helps, and I ended up with Qt Translations Update hanging in the tasks manager while always producing empty TS files :(

    When I try in Qt 6.5.0, sometimes it behaves the same, but sometimes it just completes in less than a few seconds. The trick seems to be specifying an explicit list of ts files as well as providing the INCLUDE_DIRECTORIES. Same tricks fail in Qt 6.7.1. No sure if it is a regression or what? How can I diagnose it? It is very obscure functionality in qt6 :(

    Additional note: when running the update_trasnlation project within Visual Studio the whole VS hangs so bad that even when I click MainMenu->Build->Cancel nothing happens and VS hangs forever. I only see one liner in the output window: "D:/X/ext_nena38_build/boost/src/boost_1_85_0/boost/container_hash/hash.hpp:296: Ignoring definition of undeclared qualified class" Why the F does it try to translate the boost library?

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 17 Jun 2024, 18:41 last edited by
      #2

      Hi,

      Are you using multiple complex libraries like boost in your project ?
      I think (but it is really only suppositions) that the parser might be getting off track while scanning your project.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      P 1 Reply Last reply 18 Jun 2024, 09:14
      0
      • S SGaist
        17 Jun 2024, 18:41

        Hi,

        Are you using multiple complex libraries like boost in your project ?
        I think (but it is really only suppositions) that the parser might be getting off track while scanning your project.

        P Offline
        P Offline
        pip010
        wrote on 18 Jun 2024, 09:14 last edited by
        #3

        @SGaist Indeed, I have a very complex, multiple multimillion files external libraries. This is what I found so far: https://bugreports.qt.io/browse/QTBUG-27936. No solution, rather than some elaborate workaround. Any way I can explicitly exclude folders like the qmake TR_EXCLUDE but for CMake ?

        1 Reply Last reply
        0
        • P Offline
          P Offline
          pip010
          wrote on 19 Jun 2024, 13:52 last edited by
          #4

          I have found this: https://doc.qt.io/qt-6/linguist-lupdate.html#lupdate-options
          But I don't see any options of excluding folders, only including additonal :(

          1 Reply Last reply
          0
          • P Offline
            P Offline
            pip010
            wrote on 19 Jun 2024, 14:48 last edited by pip010
            #5

            OK, I found this: https://doc.qt.io/qt-6/cmake-directory-property-qt-exclude-from-translation.html
            but because I try to use full path on my externals dir:
            " set_property DIRECTORY scope provided but requested directory was not
            found. This could be because the directory argument was invalid or, it is
            valid but has not been processed yet."

            1 Reply Last reply
            0
            • R Offline
              R Offline
              rey1996
              wrote on 11 Sept 2024, 01:40 last edited by
              #6

              I have the same problem. I have a project that used to run lupdate with Qt 5.15 real quick, with no problems. After the migration to CMAKE to use Qt 6.7.0, lupdate never ends. The project is a big with a few 3rdParty libraries.
              I tried to specify just main.qml in the SOURCES for qt_add_translations, hoping to get rid of all the rest of the files. Only for test purposes. But I had no luck with that.
              Has anyone been able to solve this?

              1 Reply Last reply
              0
              • P Offline
                P Offline
                pip010
                wrote 27 days ago last edited by
                #7

                @rey1996 Unfortunately, I am still struggling with the same issue. I've tried using QT_EXCLUDE_FROM_TRANSLATION to no avail. However, I stumbled on the following bug report: https://bugreports.qt.io/browse/QTBUG-126040

                It seems we are not the only one :)

                1 Reply Last reply
                1
                • P Offline
                  P Offline
                  pip010
                  wrote 14 days ago last edited by
                  #8

                  It seems the issue is resolved in :
                  Fix Version/s:
                  6.5.7, 6.7.3, 6.8.0 Beta3, 6.9.0 FF

                  1 Reply Last reply
                  0
                  • P pip010 has marked this topic as solved 14 days ago

                  • Login

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