Summary: | Compiling issue for v3.2.0 Qt6 | ||
---|---|---|---|
Product: | [Applications] amarok | Reporter: | Fabio <fabio.loli> |
Component: | general | Assignee: | Amarok Developers <amarok-bugs-dist> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | tuomas |
Priority: | NOR | ||
Version First Reported In: | 3.2.0 | ||
Target Milestone: | kf5 | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/multimedia/amarok/-/commit/d696408d3e6b719cdb657ed23c446d4f72617027 | Version Fixed In: | |
Sentry Crash Report: |
Description
Fabio
2024-12-30 13:40:25 UTC
Thank you for the report! I guess I'll try setting up an Arch system and seeing if I can reproduce & fix later this week Installed Arch & tested around a bit. Seems to be related to this one: https://bugreports.qt.io/browse/QTBUG-112332 something similar here https://github.com/calamares/calamares/issues/2309 fixed apparently in packaging with https://gitlab.manjaro.org/manjaro-arm/packages/extra/calamares/-/commit/36071c2540e9eefaee50e1e79e5326843b57e7af#9b9baac1eb9b72790eef5540a1685306fc43fd6c_27_28 and worked around in source with https://github.com/calamares/calamares/commit/4eba859236777c5764ebd3db883a303ed810ee7b Based on comments at https://github.com/pedrolcl/drumstick/issues/12 I tried editing PopupDropper_Export.h:32 from # define POPUPDROPPER_EXPORT Q_DECL_EXPORT to # define POPUPDROPPER_EXPORT Q_DECL_EXPORT_OVERRIDABLE which seemed to fix the build, too. But reading Qt headers, the Calamares' solution would probably be sensible here, as the section in question is inside ifdef for non-windows builds, anyhow. Git commit d696408d3e6b719cdb657ed23c446d4f72617027 by Tuomas Nurmi. Committed on 02/01/2025 at 22:47. Pushed by nurmi into branch 'master'. Edit libpud exports to fix build on some Qt6 setups Related issue seems to be described at https://bugreports.qt.io/browse/QTBUG-112332 The fix done at https://github.com/calamares/calamares/commit/4eba859236777c5764ebd3db883a303ed810ee7b seems sensible here, too, and doesn't seem to break anything, so let's try that. M +1 -1 src/context/popupdropper/libpud/PopupDropper_Export.h https://invent.kde.org/multimedia/amarok/-/commit/d696408d3e6b719cdb657ed23c446d4f72617027 Nice, it is compiling fine and running with GCC but fail with Clang: [ 91%] Building CXX object tests/importers/CMakeFiles/testbansheeimporter.dir/__/__/src/importers/banshee/BansheeConfigWidget.cpp.o /home/fabio/Dev/Github/PKGBUILD-AUR_fix/a/amarok-qt6-git/src/amarok/tests/importers/TestImporterBase.cpp:404:51: error: parameter declarator cannot be qualified 404 | const QString testName( QLatin1String( QTest::currentDataTag() ) ); | ~~~~~~~^ /home/fabio/Dev/Github/PKGBUILD-AUR_fix/a/amarok-qt6-git/src/amarok/tests/importers/TestImporterBase.cpp:404:27: warning: parentheses were disambiguated as a function declaration [-Wvexing-parse] 404 | const QString testName( QLatin1String( QTest::currentDataTag() ) ); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/fabio/Dev/Github/PKGBUILD-AUR_fix/a/amarok-qt6-git/src/amarok/tests/importers/TestImporterBase.cpp:404:29: note: add a pair of parentheses to declare a variable 404 | const QString testName( QLatin1String( QTest::currentDataTag() ) ); | ^ | ( ) /home/fabio/Dev/Github/PKGBUILD-AUR_fix/a/amarok-qt6-git/src/amarok/tests/importers/TestImporterBase.cpp:406:37: error: reference to type 'const QString' could not bind to an lvalue of type 'const QString (QLatin1String ((*)()))' 406 | QVERIFY( trackForName.contains( testName ) ); | ^~~~~~~~ /usr/include/qt6/QtTest/qtestcase.h:60:43: note: expanded from macro 'QVERIFY' 60 | if (!QTest::qVerify(static_cast<bool>(statement), #statement, "", __FILE__, __LINE__))\ | ^~~~~~~~~ /usr/include/qt6/QtCore/qmap.h:342:30: note: passing argument to parameter 'key' here 342 | bool contains(const Key &key) const | ^ /home/fabio/Dev/Github/PKGBUILD-AUR_fix/a/amarok-qt6-git/src/amarok/tests/importers/TestImporterBase.cpp:408:49: error: reference to type 'const QString' could not bind to an lvalue of type 'const QString (QLatin1String ((*)()))' 408 | const TrackPtr &track = trackForName.value( testName ); | ^~~~~~~~ /usr/include/qt6/QtCore/qmap.h:358:24: note: passing argument to parameter 'key' here 358 | T value(const Key &key, const T &defaultValue = T()) const | ^ 1 warning generated. [ 91%] Linking CXX executable ../../../../../bin/testsqlartist Ah, true. I've never tried compiling Amarok with clang before (no idea if anyone has) but the fix seemed to be trivial enough and is now in git master: https://invent.kde.org/multimedia/amarok/-/commit/4fdd5d39b0d585330956ad0b67d1807306e8dde2 At least builds now, but didn't test if the program starts / works |