-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.14.1
-
None
-
openSUSE Tumbleweed 20200201
Symptoms are very similar to QTBUG-77398 but the settings are slightly different.
With the project file like:
CONFIG += lrelease QM_FILES_INSTALL_PATH = /XXXtrans TRANSLATIONS = test.locale_A.ts \ test.locale_B.ts \ target.path = /target INSTALLS += target SOURCES = test.cpp
qmake fails to generate the installation target for the translation files. The most interesting parts of the debug output seem to be:
lpechacek@fmn:/dev/shm/installs-test> qmake-qt5 -r -d 2>&1 | less ... DEBUG 1: /usr/lib64/qt5/mkspecs/features/lrelease.prf:35: evaluating test function "isEmpty" DEBUG 1: /usr/lib64/qt5/mkspecs/features/lrelease.prf:35: calling built-in isEmpty(QM_FILES_INSTALL_PATH) DEBUG 1: /usr/lib64/qt5/mkspecs/features/lrelease.prf:35: test function returned false DEBUG 1: /usr/lib64/qt5/mkspecs/features/lrelease.prf:35: taking 'then' branch DEBUG 1: /usr/lib64/qt5/mkspecs/features/lrelease.prf:35: entering block DEBUG 1: /usr/lib64/qt5/mkspecs/features/lrelease.prf:36: qm_files.files := /dev/shm/installs-test/.qm/test.qm /dev/shm/installs-test/.qm/test.qm DEBUG 1: /usr/lib64/qt5/mkspecs/features/lrelease.prf:37: qm_files.path := /XXXtrans DEBUG 1: /usr/lib64/qt5/mkspecs/features/lrelease.prf:38: INSTALLS := target qm_files DEBUG 1: /usr/lib64/qt5/mkspecs/features/lrelease.prf:38: leaving block, okey=true ... DEBUG 1: done visiting file /usr/lib64/libQt5Core.prl DEBUG 1: /home/abuild/rpmbuild/BUILD/qtbase-everywhere-src-5.14.1/qmake/generators/makefile.cpp:307 Failure to find /dev/shm/installs-test/.qm/test.qm in vpath () DEBUG 1: /home/abuild/rpmbuild/BUILD/qtbase-everywhere-src-5.14.1/qmake/generators/makefile.cpp:307 Failure to find /dev/shm/installs-test/.qm/test.qm in vpath () DEBUG 1: no definition for install qm_files: install target not created
Please note the repeating test.qm in qm_files.files and the final Makefile generator's remark about non-existent files.
The root cause of the failure seems to lie at line 27 of lrelease.prf (https://code.qt.io/cgit/qt/qtbase.git/tree/mkspecs/features/lrelease.prf#n27). There the script tries to derive QMAKE_FILE_IN_BASE from the input file name by replacing everything after the first dot character with the new extension. However, if dots are also part of the file name, the said $$replace() cuts off too much of the name.