Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#72775 - [qt6-tools] Failed to update QML files translations after clang 13 rebuild

Attached to Project: Arch Linux
Opened by Ariel AxionL (axionl) - Wednesday, 17 November 2021, 15:25 GMT
Last edited by Antonio Rojas (arojas) - Saturday, 20 November 2021, 19:53 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
After upgrading to the qt6-tools which rebuild by clang13, all the QML strings with qsTr() method on the translation file become vanished, after removing the old *.ts file, it will only generate the items for C++ codes.

Additional info:
* package version(s)
6.2.1-2
* config and/or log files etc.
* link to upstream bug report, if any

Steps to reproduce:
1. Upgrade to the latest qt6-tools on the mirrors.
2. Add the following configuration on CMakeLists.txt (replace my project name with <project_name>)

qt_add_translations(<project_name>
RESOURCE_PREFIX "/i18n"
TS_FILES
${CMAKE_SOURCE_DIR}/i18n/<project_name>_zh_CN.ts
)

add_dependencies(<project_name> <project_name>_lupdate)
This task depends upon

Closed by  Antonio Rojas (arojas)
Saturday, 20 November 2021, 19:53 GMT
Reason for closing:  Fixed
Additional comments about closing:  qt6-tools 6.2.1-3
Comment by Antonio Rojas (arojas) - Wednesday, 17 November 2021, 15:53 GMT
Works fine for qt6ct. Please attach a full affected project.
Comment by Ariel AxionL (axionl) - Thursday, 18 November 2021, 00:51 GMT Comment by Antonio Rojas (arojas) - Thursday, 18 November 2021, 07:34 GMT
Works for me. The generated qm are identical with either qt6-tools version. Please make sure that your system is fully updated and you don't have come other clang version locally installed that is interfering.
Comment by Ariel AxionL (axionl) - Thursday, 18 November 2021, 08:16 GMT
I prepared an ASCII animation to reproduce this process:
https://asciinema.org/a/s3VHUAwdx1g5xDR3CyfoAznXp

My distribution is Arch Linux, I notice that issue when the package was on testing, and more version information is as follows:
clang version 13.0.0
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Comment by Ariel AxionL (axionl) - Thursday, 18 November 2021, 10:30 GMT
I notice that the qt upstream has fixed this bug, But the source code tarball used by Arch Linux does not include this change. The QmlDevToolsPrivate component could not be found, and then it was defined QT_NO_QML.

https://codereview.qt-project.org/c/qt/qttools/+/358621
https://codereview.qt-project.org/c/qt/qttools/+/358621/4/src/linguist/lupdate/CMakeLists.txt#b64
Comment by Antonio Rojas (arojas) - Thursday, 18 November 2021, 10:45 GMT
I don't see how that can be related. QmlDevToolsPrivate *does* exist in 6.2, it was only removed in master, and it is found when building qt6-tools:

-- The following packages have been found:
[...]
* Qt6QmlDevToolsPrivate (required version >= 6.2.1)
Comment by Antonio Rojas (arojas) - Saturday, 20 November 2021, 19:52 GMT
Found the issue - it's a packaging bug

Loading...