Bug 473507 - broken build (with qt6.6)
Summary: broken build (with qt6.6)
Status: RESOLVED FIXED
Alias: None
Product: kirigami-addons
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-18 11:47 UTC by Harald Sitter
Modified: 2023-08-21 10:35 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Harald Sitter 2023-08-18 11:47:45 UTC
When building Qt with timezone features the kirigami-addons build is broken because startsWithLocalTimeZone is never defined.

/usr/bin/ld: /usr/bin/ld: DWARF error: invalid or unhandled FORM value: 0x23
src/dateandtime/CMakeFiles/dateandtimeplugin.dir/lib/qdatetimeparser.cpp.o: in function `QDateTimeParser::findTimeZone(QStringView, QDateTime const&, int, int) const':
qdatetimeparser.cpp:(.text+0x48cc): undefined reference to `QDateTimeParser::startsWithLocalTimeZone(QStringView)'
/usr/bin/ld: src/dateandtime/CMakeFiles/dateandtimeplugin.dir/lib/qdatetimeparser.cpp.o: in function `QDateTimeParser::scanString(QDateTime const&, bool, QString*) const':
qdatetimeparser.cpp:(.text+0x5f22): undefined reference to `QDateTimeParser::startsWithLocalTimeZone(QStringView)'

100% reproducible on neon for instance. Making it impossible to build k-a
Comment 1 Bug Janitor Service 2023-08-21 01:04:55 UTC
A possibly relevant merge request was started @ https://invent.kde.org/libraries/kirigami-addons/-/merge_requests/143
Comment 2 Nicolas Fella 2023-08-21 10:35:03 UTC
Git commit 4b9965d4cf92bde8210845b43a9ed33e040663a8 by Nicolas Fella.
Committed on 21/08/2023 at 12:32.
Pushed by nicolasfella into branch 'master'.

Fix build against Qt > 6.5.3

Our time validator uses a copy of QDateTimeParser

That relies on startsWithLocalTimeZone() being exported by something else in Qt, but with Qt > 6.5.3 that's no longer the case

Instead QTimezoneParser has its own version with slightly changed API

Copy a bit more Qt code to make ours build

M  +52   -7    src/dateandtime/lib/qdatetimeparser.cpp
M  +1    -2    src/dateandtime/lib/qdatetimeparser_p.h

https://invent.kde.org/libraries/kirigami-addons/-/commit/4b9965d4cf92bde8210845b43a9ed33e040663a8