Brewtarget 4.0.7 Qt6 issue on Ubuntu (libQt6Multimedia.so.6 missing)
Closed this issue · 20 comments
4.0.7 seems to have moved from Qt5 to Qt6.
- On my Ubuntu system I first install Qt6 with
sudo apt install qt6-base-dev
- Install 4.0.7 with
sudo dpkg --install brewtarget-4.0.7_24-1_amd64.deb
- Run 4.0.7
/usr/bin/brewtarget
- Error:
/usr/bin/brewtarget: error while loading shared libraries: libQt6Multimedia.so.6: cannot open shared object file: No such file or directory
It seems that package qt6-base-dev
does not contain the Multimedia component whereas qt5-base-dev
did. I can't find a package containing it or another way to install it.
Also, I suspect the same issue with occur with the SVG and LinguistTools components, which also appear to be absent from the Ubuntu Qt6 base package.
Hello,
Yes, you're right, we did indeed move to Qt6 (see #841).
Qt has several different components you need to install before you can build from source. The simplest way to set everything up is to run the following from the top level directory:
./bt setup all
This will install all the packages you need.
If you'd rather install everything manually, have a look at lines 400-712 of https://github.com/Brewtarget/brewtarget/blob/develop/scripts/buildTool.py, which is the main script that gets invoked by the bt
tool. It's all Python so should be relatively straightforward to follow, and I've tried to comment the reasons for all the different things it does. There will be one or two bits you can skip if you're just building for local install (ie you don't also need to build the distributable packages), but it won't hurt to have them either.
Hope this helps. Give us a shout if you hit any other problems.
TBH I wasn't even trying to build from source on this occasion, just installing from the latest deb
package.
Anyway, I did run ./bt setup all
and following that I was able to both install the deb
and build locally on ubuntu. Thanks.
Ah, if you were installing the deb
package, it could well be that we're missing some dependencies. I'll have a look and include them in the next PR. Likely involves adding some lines to https://github.com/Brewtarget/brewtarget/blob/develop/packaging/linux/control.in and https://github.com/Brewtarget/brewtarget/blob/develop/packaging/linux/rpm.spec.in. Re-opening this ticket so I don't forget!
This is what happens trying to install the latest deb
on a clean ubuntu system that was never used to build from source:
ubuntu ~/Downloads> sudo dpkg --install brewtarget-4.0.7_24-1_amd64.deb
(Reading database ... 60441 files and directories currently installed.)
Preparing to unpack brewtarget-4.0.7_24-1_amd64.deb ...
Unpacking brewtarget (4.0.7-1) over (4.0.6-1) ...
dpkg: dependency problems prevent configuration of brewtarget:
brewtarget depends on libqt6core6t64 (>= 6.2.4); however:
Package libqt6core6t64 is not installed.
brewtarget depends on libqt6gui6t64 (>= 6.2.4) | libqt6multimedia6 (>= 6.2.4); however:
Package libqt6gui6t64 is not installed.
Package libqt6multimedia6 is not installed.
brewtarget depends on libqt6network6t64 (>= 6.2.4); however:
Package libqt6network6t64 is not installed.
brewtarget depends on libqt6printsupport6t64 (>= 6.2.4); however:
Package libqt6printsupport6t64 is not installed.
brewtarget depends on libqt6sql6t64 (>= 6.2.4); however:
Package libqt6sql6t64 is not installed.
brewtarget depends on libqt6widgets6t64 (>= 6.2.4); however:
Package libqt6widgets6t64 is not installed.
dpkg: error processing package brewtarget (--install):
dependency problems - leaving unconfigured
Processing triggers for desktop-file-utils (0.27-2build1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for man-db (2.12.0-4build2) ...
Errors were encountered while processing:
brewtarget
Try sudo apt -f install ./brewtarget-4.0.7_24-1_amd64.deb
. I think that will automatically install the dependencies (whereas dpkg
won't.)
We should now have all the correct dependencies listed in the 4.0.8 release. If you use sudo apt -f install
or gdebi
it should be able to read these dependencies from the package and install any missing ones. Please don't hesitate to reopen this ticket if it doesn't work!
Ooh, how odd. Although they are separate files in the source code, those icons get incorporated into the executable as Qt "resources", so it's a bit surprising they are missing. (Or at least it's more surprising than if we had some issue with building the package.) Are there any errors or warnings in the log file?
I don't see anything in the log...
[20:14:08.163] (1dqthx0tz4) INFO : Starting Brewtarget v 4.0.8 (app name "brewtarget" ) on "Ubuntu 24.04.1 LTS" [main.cpp:231]
[20:14:08.170] (1dqthx0tz4) INFO : Built at Sat Oct 26 02:46:23 UTC 2024 on linux for linux with gcc compiler [main.cpp:234]
[20:14:08.170] (1dqthx0tz4) INFO : Log directory: "/home/ubuntu/.config/brewtarget" [main.cpp:237]
[20:14:08.170] (1dqthx0tz4) INFO : Using Qt runtime v 6.4.2 (compiled against Qt v 6.4.2 ) [main.cpp:238]
[20:14:08.170] (1dqthx0tz4) INFO : Configuration directory: "/home/ubuntu/.config/brewtarget" [main.cpp:239]
[20:14:08.170] (1dqthx0tz4) INFO : Data directory: "/home/ubuntu/.config/brewtarget" [main.cpp:240]
[20:14:08.170] (1dqthx0tz4) INFO : void {anonymous}::initResourceDir(QDir&) Application name "brewtarget" [Application.cpp:361]
[20:14:08.170] (1dqthx0tz4) INFO : void {anonymous}::initResourceDir(QDir&) Determined resource directory is "/usr/share/brewtarget" [Application.cpp:392]
[20:14:08.170] (1dqthx0tz4) INFO : Resource directory: "/usr/share/brewtarget" [main.cpp:241]
[20:14:08.389] (1dqthx0tz4) INFO : bool {anonymous}::ensureDirectoriesExist() Resource directory "/usr/share/brewtarget" exists [Application.cpp:150]
[20:14:08.449] (1dqthx0tz4) WARNING : void Localization::loadTranslations() Error loading translations for "C" [Localization.cpp:228]
[20:14:08.449] (1dqthx0tz4) INFO : Locale: "C" (Decimal point: "." / Thousands separator: "," ) [Application.cpp:435]
[20:14:08.449] (1dqthx0tz4) INFO : bool Application::initialize() Loading Database... [Application.cpp:452]
[20:14:08.471] (1dqthx0tz4) INFO : bool Database::load() Known DB drivers: QList("QSQLITE") [database/Database.cpp:716]
[20:14:08.472] (1dqthx0tz4) INFO : bool Database::impl::loadSQLite(Database&) dbFileName = " /home/ubuntu/.config/brewtarget/database.sqlite "
dataDbFileName=" /usr/bin/../share/brewtarget/default_db.sqlite " [database/Database.cpp:254]
[20:14:08.503] (1dqthx0tz4) INFO : bool Database::impl::loadSQLite(Database&) SQLite version QVariant(QString, "3.45.1") [database/Database.cpp:303]
[20:14:08.541] (1dqthx0tz4) INFO : bool Database::impl::updateSchema(Database&, bool*) Schema version in DB: 14 , current schema version in code: 14 [database/Database.cpp:400]
[20:14:08.542] (1dqthx0tz4) INFO : DefaultContentLoader::UpdateResult DefaultContentLoader::updateContentIfNecessary(QSqlDatabase&, QTextStream&) availableContentVersion: 4 , defaultContentAlreadyLoaded: 4 [database/DefaultContentLoader.cpp:97]
[20:14:08.642] (1dqthx0tz4) INFO : void ObjectStore::loadAll(Database*) Read 97 objects from DB table recipe [database/ObjectStore.cpp:1682]
[20:14:08.643] (1dqthx0tz4) INFO : void ObjectStore::loadAll(Database*) Read 1 objects from DB table brewnote [database/ObjectStore.cpp:1682]
[20:14:09.226] (1dqthx0tz4) INFO : void ObjectStore::loadAll(Database*) Read 354 objects from DB table style [database/ObjectStore.cpp:1682]
[20:14:09.319] (1dqthx0tz4) INFO : void ObjectStore::loadAll(Database*) Read 156 objects from DB table equipment [database/ObjectStore.cpp:1682]
[20:14:09.477] (1dqthx0tz4) INFO : void ObjectStore::loadAll(Database*) Read 731 objects from DB table fermentable [database/ObjectStore.cpp:1682]
[20:14:09.559] (1dqthx0tz4) INFO : void ObjectStore::loadAll(Database*) Read 508 objects from DB table hop [database/ObjectStore.cpp:1682]
[20:14:09.575] (1dqthx0tz4) INFO : void ObjectStore::loadAll(Database*) Read 100 objects from DB table misc [database/ObjectStore.cpp:1682]
[20:14:09.749] (1dqthx0tz4) INFO : void ObjectStore::loadAll(Database*) Read 792 objects from DB table yeast [database/ObjectStore.cpp:1682]
[20:14:09.835] (1dqthx0tz4) INFO : void ObjectStore::loadAll(Database*) Read 15 objects from DB table water [database/ObjectStore.cpp:1682]
[20:14:09.963] (1dqthx0tz4) INFO : void ObjectStore::loadAll(Database*) Read 68 objects from DB table boil [database/ObjectStore.cpp:1682]
[20:14:10.003] (1dqthx0tz4) INFO : void ObjectStore::loadAll(Database*) Read 176 objects from DB table boil_step [database/ObjectStore.cpp:1682]
[20:14:10.020] (1dqthx0tz4) INFO : void ObjectStore::loadAll(Database*) Read 68 objects from DB table fermentation [database/ObjectStore.cpp:1682]
[20:14:10.044] (1dqthx0tz4) INFO : void ObjectStore::loadAll(Database*) Read 73 objects from DB table fermentation_step [database/ObjectStore.cpp:1682]
[20:14:10.067] (1dqthx0tz4) INFO : void ObjectStore::loadAll(Database*) Read 32 objects from DB table instruction [database/ObjectStore.cpp:1682]
[20:14:10.093] (1dqthx0tz4) INFO : void ObjectStore::loadAll(Database*) Read 622 objects from DB table fermentable_in_inventory [database/ObjectStore.cpp:1682]
[20:14:10.112] (1dqthx0tz4) INFO : void ObjectStore::loadAll(Database*) Read 413 objects from DB table hop_in_inventory [database/ObjectStore.cpp:1682]
[20:14:10.120] (1dqthx0tz4) INFO : void ObjectStore::loadAll(Database*) Read 98 objects from DB table misc_in_inventory [database/ObjectStore.cpp:1682]
[20:14:10.120] (1dqthx0tz4) INFO : void ObjectStore::loadAll(Database*) Read 0 objects from DB table salt_in_inventory [database/ObjectStore.cpp:1682]
[20:14:10.139] (1dqthx0tz4) INFO : void ObjectStore::loadAll(Database*) Read 757 objects from DB table yeast_in_inventory [database/ObjectStore.cpp:1682]
[20:14:10.164] (1dqthx0tz4) INFO : void ObjectStore::loadAll(Database*) Read 187 objects from DB table mash [database/ObjectStore.cpp:1682]
[20:14:10.219] (1dqthx0tz4) INFO : void ObjectStore::loadAll(Database*) Read 243 objects from DB table mash_step [database/ObjectStore.cpp:1682]
[20:14:10.279] (1dqthx0tz4) INFO : void ObjectStore::loadAll(Database*) Read 386 objects from DB table fermentable_in_recipe [database/ObjectStore.cpp:1682]
[20:14:10.311] (1dqthx0tz4) INFO : void ObjectStore::loadAll(Database*) Read 240 objects from DB table hop_in_recipe [database/ObjectStore.cpp:1682]
[20:14:10.316] (1dqthx0tz4) INFO : void ObjectStore::loadAll(Database*) Read 5 objects from DB table misc_in_recipe [database/ObjectStore.cpp:1682]
[20:14:10.345] (1dqthx0tz4) INFO : void ObjectStore::loadAll(Database*) Read 98 objects from DB table yeast_in_recipe [database/ObjectStore.cpp:1682]
[20:14:10.346] (1dqthx0tz4) INFO : void ObjectStore::loadAll(Database*) Read 0 objects from DB table salt_in_recipe [database/ObjectStore.cpp:1682]
[20:14:10.346] (1dqthx0tz4) INFO : void ObjectStore::loadAll(Database*) Read 0 objects from DB table water_in_recipe [database/ObjectStore.cpp:1682]
[20:14:10.346] (1dqthx0tz4) INFO : void ObjectStore::loadAll(Database*) Read 0 objects from DB table salt [database/ObjectStore.cpp:1682]
[20:14:15.804] (1dqthx0tz4) WARNING : Ignoring unexpected wl_surface.enter received for output with id: 7 screen name: "Screen5" screen model: "unknown" This is most likely a bug in the compositor. [:0]
[20:14:16.249] (1dqthx0tz4) INFO : void {anonymous}::finishCheckForNewVersion() Latest release is "4.0.8" (parsed as QVersionNumber(4.0.8) ) ; currently running 4.0.8 (parsed as QVersionNumber(4.0.8) ) [Application.cpp:255]
This installation was on Linux on a Chromebook. I had previous brewtarget releases installed on this system and they always worked perfectly, including showing the icons.
I have just now tried installing 4.0.8 on a baremetal linux system and the icons are showing so that's a bit odd. Perhaps it's somehow related to linux on the Chromebook.
There are a couple of things I can try. I'm not super hopeful that they will fix things, but it can't hurt to try them:
- We don't currently call
Q_INIT_RESOURCE
at program start-up, so I'll add a call to that - You're the second person that has a warning about
Localization::loadTranslations()
failing, so I'll see if we can make that more robust
Hi Anthony, When you get a chance, could you let me know if you're still seeing the missing icons problem in the 4.0.10 release?
Hi Matt - the icons are still missing in my Ubuntu on Chromebook in 4.0.10. There is still no issue on my Ubuntu baremetal system.
This extra line appears in the log on the Chromebook versus the standard Ubuntu system.
[21:30:30.787] (1dkmhyrow0) WARNING : Ignoring unexpected wl_surface.enter received for output with id: 7 screen name: "Screen5" screen model: "unknown" This is most likely a bug in the compositor. [:0]
BTW both systems have Ubuntu 24.04.1 LTS
Hi Anthony, I'm wondering if the issue you're seeing on Ubuntu/Chromebook is related to the missing icons being .svg files, given that the logo, which does show, is one of the few things that is .png rather than .svg. I'll see if I can find out more.
I made a couple of changes to the bt
script in the 4.0.11 release to ensure it installs the Qt SVG libraries. If that doesn't fix things, it may be that we are missing a dependency in https://github.com/Brewtarget/brewtarget/blob/develop/packaging/linux/control.in.
Thanks for letting me know. I'll keep digging.
I will try the fix in https://stackoverflow.com/questions/76047551/icons-shown-in-qt5-not-showing-in-qt6 for the 4.0.12 release.
That looks promising.
I could test it by installing libqt6svg6
on the Chromebook but I think it'd be better to wait for 4.0.12. I never installed a build environment on the Chromebook so it's a nice clean test bed.
Hopefully this is fixed in 4.0.12. If not, please don't hesitate to reopen this issue!