Qt 6 cmake lupdate update_translations hangs forever
-
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?
-
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. -
@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 ?
-
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 :( -
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." -
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?