Translations not installing building QLC+ 4.12.4 GIT

Post Reply
User avatar
sbenejam
Posts: 550
Joined: Sun Apr 12, 2015 6:28 pm
Real Name: Santiago Benejam Torres
Contact:

Compiling QLC+ 4.12.4 GIT in Ubuntu 20.04 against Qt5.15.2 after executing sudo make install the translations are not installing in /usr/share/qlcplus/translations.
After doing some searches and testing different solutions I found this commit in QLC+ Git : https://github.com/mcallegari/qlcplus/c ... dd710b9e89
In this commit I found this explanation: "qmake will ignore the generated .qm files if they don't already exist at build system configuration time."
I got translations finally installed running ./translate.sh before running qmake. I don't know what has changed in the QLC+ source code or if this issue is a qmake problem. I've seen that in Makefile no commands are generated to install translations if ./translate.sh is not run before qmake.
User avatar
mcallegari
Posts: 4482
Joined: Sun Apr 12, 2015 9:09 am
Location: Italy
Real Name: Massimo Callegari
Contact:

I just checked and it works for me on Ubuntu 20.04 too.
Translation files are created and installed during 'make install', not during 'make' (see INSTALLS += translations)
The commit you specified is irrelevant for Ubuntu, as .spec file is used to create the RPM package for Fedora.
User avatar
sbenejam
Posts: 550
Joined: Sun Apr 12, 2015 6:28 pm
Real Name: Santiago Benejam Torres
Contact:

In my computers sometimes it works and sometimes doesn't work. When I execute /home/user/Qt/5.15.2/gcc_64/bin/qmake in the Makefile the following lines are not created.

Code: Select all

$(QINSTALL) /home/sbenejam/qlctest/qlcplus_de_DE.qm $(INSTALL_ROOT)/usr/share/qlcplus/translations/qlcplus_de_DE.qm
        $(QINSTALL) /home/sbenejam/qlctest/qlcplus_es_ES.qm $(INSTALL_ROOT)/usr/share/qlcplus/translations/qlcplus_es_ES.qm
        $(QINSTALL) /home/sbenejam/qlctest/qlcplus_fr_FR.qm $(INSTALL_ROOT)/usr/share/qlcplus/translations/qlcplus_fr_FR.qm
        $(QINSTALL) /home/sbenejam/qlctest/qlcplus_it_IT.qm $(INSTALL_ROOT)/usr/share/qlcplus/translations/qlcplus_it_IT.qm
        $(QINSTALL) /home/sbenejam/qlctest/qlcplus_nl_NL.qm $(INSTALL_ROOT)/usr/share/qlcplus/translations/qlcplus_nl_NL.qm
        $(QINSTALL) /home/sbenejam/qlctest/qlcplus_ca_ES.qm $(INSTALL_ROOT)/usr/share/qlcplus/translations/qlcplus_ca_ES.qm
        $(QINSTALL) /home/sbenejam/qlctest/qlcplus_ja_JP.qm $(INSTALL_ROOT)/usr/share/qlcplus/translations/qlcplus_ja_JP.qm
        $(QINSTALL) /home/sbenejam/qlctest/qlcplus_cz_CZ.qm $(INSTALL_ROOT)/usr/share/qlcplus/translations/qlcplus_cz_CZ.qm
        $(QINSTALL) /home/sbenejam/qlctest/qlcplus_pt_BR.qm $(INSTALL_ROOT)/usr/share/qlcplus/translations/qlcplus_pt_BR.qm

uninstall_translations: FORCE
        -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/share/qlcplus/translations/qlcplus_pt_BR.qm
        -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/share/qlcplus/translations/qlcplus_cz_CZ.qm
        -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/share/qlcplus/translations/qlcplus_ja_JP.qm
        -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/share/qlcplus/translations/qlcplus_ca_ES.qm
        -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/share/qlcplus/translations/qlcplus_nl_NL.qm
        -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/share/qlcplus/translations/qlcplus_it_IT.qm
        -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/share/qlcplus/translations/qlcplus_fr_FR.qm
        -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/share/qlcplus/translations/qlcplus_es_ES.qm
        -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/share/qlcplus/translations/qlcplus_de_DE.qm
        -$(DEL_DIR) $(INSTALL_ROOT)/usr/share/qlcplus/translations/ 
If I execute ./translate.sh before /home/user/Qt/5.15.2/gcc_64/bin/qmake this lines are present in the Makefile. If this lines are not present in Makefile the translations are not installing. It's very strange.
To compile QLC+ I usually run make distclean, qmake, make -j8, sudo make install. I'm missing something?.
User avatar
mcallegari
Posts: 4482
Joined: Sun Apr 12, 2015 9:09 am
Location: Italy
Real Name: Massimo Callegari
Contact:

To compile QLC+ I usually run make distclean, qmake, make -j8, sudo make install. I'm missing something?
It's the correct sequence of commands.
Perhaps make sure after distclean that no qm files are present in the folder. (even though the distclean target now includes qm removal)
User avatar
sbenejam
Posts: 550
Joined: Sun Apr 12, 2015 6:28 pm
Real Name: Santiago Benejam Torres
Contact:

Hi Massimo,
Attached you can find the Makefile generated after executing /home/user/Qt/5.15.2/gcc_64/bin/qmake on a freshly downloaded QLC+ source from github. Compiling with make and installing with sudo make install the translations are not installing in /usr/share/qlcplus/translations.
I repeated executing ./translate.sh before /home/user/Qt/5.15.2/gcc_64/bin/qmake, see the attached Makefile-translate.txt this file now includes some lines referencing to translation qm files. After make and sudo make install translation file are newly generated and copied to /usr/share/qlcplus/translations as expected.
One more thing make distclean deletes the qm files early generated.
On my Ubuntu gcc version is 9.3.0.
Attachments
Makefile-translate.txt
(78.87 KiB) Downloaded 91 times
Makefile.txt
(77.02 KiB) Downloaded 82 times
User avatar
mcallegari
Posts: 4482
Joined: Sun Apr 12, 2015 9:09 am
Location: Italy
Real Name: Massimo Callegari
Contact:

Can you please try with Qt version 5.14.2?
Thanks
User avatar
sbenejam
Posts: 550
Joined: Sun Apr 12, 2015 6:28 pm
Real Name: Santiago Benejam Torres
Contact:

mcallegari wrote: Fri Mar 26, 2021 5:38 pm Can you please try with Qt version 5.14.2?
Thanks
I'm installing Qt version 5.14.2. I'll try later and report the results.
User avatar
sbenejam
Posts: 550
Joined: Sun Apr 12, 2015 6:28 pm
Real Name: Santiago Benejam Torres
Contact:

I built QLC+ with Qt version 5.14.2 and the translations are not installed, although if they are created at the end of sudo make install. I tried with a freshly cloned sources from Github.
What more tests can I do?.
User avatar
sbenejam
Posts: 550
Joined: Sun Apr 12, 2015 6:28 pm
Real Name: Santiago Benejam Torres
Contact:

I tested too with the default Qt on Ubuntu that is Qt version 5.12.8, same results, translations are not installing. For me is not a problem to run ./translate.sh before executing qmake to get translations installed. But I think that some users can run into problems compiling QLC+ from sources.
User avatar
sbenejam
Posts: 550
Joined: Sun Apr 12, 2015 6:28 pm
Real Name: Santiago Benejam Torres
Contact:

It seems that this issue is solved by this commit https://github.com/mcallegari/qlcplus/c ... affdc36be8
Post Reply