Bug 280469

Summary: devel/qtcreator: Update to 14.0.0 release, fix SQLite alloca build.
Product: Ports & Packages Reporter: Florian Walpen <dev>
Component: Individual Port(s)Assignee: freebsd-kde (group) <kde>
Status: Closed FIXED    
Severity: Affects Only Me CC: jhale, kde
Priority: --- Flags: jhale: maintainer-feedback+
Version: Latest   
Hardware: Any   
OS: Any   
URL: https://www.qt.io/blog/qt-creator-14-released
Attachments:
Description Flags
Update QtCreator to 14.0.0 release, fix SQLite alloca option.
none
Update QtCreator to 14.0.0 release, fix SQLite alloca option, pkg-plist corrected.
none
Update QtCreator to 14.0.0, fix SQLite alloca, AppStatisticsMonitor plugin off. jhale: maintainer-approval+

Description Florian Walpen 2024-07-27 16:26:08 UTC
Patch coming in a minute - update QtCreator to 14.0.0 release.

There's a bundled SQLite for which I previously fixed the build by disabling the  SQLITE_USE_ALLOCA option. After discussing some related problem in bug #279397, I hereby change the fix to use different build defines and enable SQLITE_USE_ALLOCA again.

I had this update in use on 14.1-RELEASE amd64 since 14.0.0-beta2, no regressions so far.
Comment 1 Florian Walpen 2024-07-27 16:36:39 UTC
Created attachment 252323 [details]
Update QtCreator to 14.0.0 release, fix SQLite alloca option.

Here's the patch, apply with "git am".
Comment 2 Jason E. Hale freebsd_committer freebsd_triage 2024-07-30 07:43:43 UTC
Thanks, Florian! We're on it.

I'm personally really curious as to how you generated the pkg-plist, though, because "%%DATADIR%%/changelog/changes-14.0.0.md" coming before "%%DATADIR%%/changelog/changes-1.1" is clearly in the wrong order. Just curious since your patches for this port are usually stellar. It seems there is a bug to be worked out somewhere.
Comment 3 Florian Walpen 2024-07-30 10:01:36 UTC
(In reply to Jason E. Hale from comment #2)

> I'm personally really curious as to how you generated the pkg-plist, though, ...

Usually I just look at what the poudriere test build reports as missing / not in plist, copy / delete those lines and sort them in (neovim). Unfortunately I cannot sort the whole file, as that would put the lines starting with Makefile variable (%%DATADIR%%) in front, so I only do a sort on the subsections.
I may have forgot to sort the changelog subsection, or more likely, did an undo too much and didn't notice.

Can't remember now why I don't use makeplist, it may have had problems with variable substitutions - could have been a different port though.

Should I correct the patch do you have to edit anyway?
Comment 4 Florian Walpen 2024-08-01 18:19:16 UTC
Created attachment 252435 [details]
Update QtCreator to 14.0.0 release, fix SQLite alloca option, pkg-plist corrected.

Here's the updated patch with the pkg-plist order corrected, if needed.
Comment 5 Jason E. Hale freebsd_committer freebsd_triage 2024-08-04 07:42:21 UTC
Thanks for the updated patch! I'm double-checking it now.

There aren't many OPTIONS_SUBs to deal with in this port, so I'm not sure why `make makeplist` wouldn't work as a pretty decent baseline. Maybe "%%DATADIR%%/externaltools/lrelease.xml" will erroneously be replaced with "%%DATADIR%%/externaltools/l%%CMAKE_BUILD_TYPE%%.xml", but that's an easy counter-sed. This CMAKE_BUILD_TYPE sub from Uses/cmake.mk should probably be limited to *.cmake and *.json files, but that's another battle.

Thankfully, there only a handful of ports with questionable subs stemming from this, where defining WITH_DEBUG might break them. Png/svg files, for example, seem really suspect for needing debug/release branding. Even some of our own on kde@ (x11-themes/kf[56]-breeze-icons, for example) need fixing on that account. Adding those to my TODO list.

Anyways, I'll just take this opportunity to plug tcberner's poudlist tool [1] since it isn't a port yet and is probably not widely known. Basically, it takes a poudriere log with plist issues and automatically adjusts the pkg-plist. Just another option to potentially make things easier in the future instead of manually editing the pkg-plist. It still has a few bugs, but overall has saved me a lot of time updating the Qt and CMake ports.

[1] https://codeberg.org/tcberner/poudlist
Comment 6 Jason E. Hale freebsd_committer freebsd_triage 2024-08-04 08:14:59 UTC
Just doing a quick live test build on amd64-CURRENT, I'm getting the following error:

FAILED: src/plugins/appstatisticsmonitor/CMakeFiles/AppStatisticsMonitor.dir/idataprovider.cpp.o 
/usr/local/libexec/ccache/c++ -DAPPSTATISTICSMONITOR_LIBRARY -DAppStatisticsMonitor_EXPORTS -DEXTENSIONSYSTEM_WITH_TESTOPTION -DNANOTRACE_ENABLED -DQT_CHARTS_LIB -DQT_CONCURRENT_LIB -DQT_CORE5COMPAT_LIB -DQT_CORE_LIB -DQT_CREATOR -DQT_DISABLE_DEPRECATED_BEFORE=0x050900 -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_NO_CAST_TO_ASCII -DQT_NO_DEBUG -DQT_NO_FOREACH -DQT_NO_JAVA_STYLE_ITERATORS -DQT_OPENGLWIDGETS_LIB -DQT_OPENGL_LIB -DQT_RESTRICTED_CAST_FROM_ASCII -DQT_USE_QSTRINGBUILDER -DQT_WARN_DEPRECATED_BEFORE=0x060400 -DQT_WIDGETS_LIB -DRELATIVE_DATA_PATH=\"../share/qtcreator\" -DRELATIVE_DOC_PATH=\"../share/doc/qtcreator\" -DRELATIVE_LIBEXEC_PATH=\"../libexec/qtcreator\" -DRELATIVE_PLUGIN_PATH=\"../lib/qtcreator/plugins\" -I/usr/home/jhale/src/freebsd/ports/devel/qtcreator/work/.build/src/plugins/appstatisticsmonitor -I/usr/home/jhale/src/freebsd/ports/devel/qtcreator/work/qt-creator-opensource-src-14.0.0/src/plugins/appstatisticsmonitor -I/usr/home/jhale/src/freebsd/ports/devel/qtcreator/work/.build/src/plugins/appstatisticsmonitor/AppStatisticsMonitor_autogen/include -I/usr/home/jhale/src/freebsd/ports/devel/qtcreator/work/.build/src -I/usr/home/jhale/src/freebsd/ports/devel/qtcreator/work/qt-creator-opensource-src-14.0.0/src/plugins -I/usr/home/jhale/src/freebsd/ports/devel/qtcreator/work/qt-creator-opensource-src-14.0.0/src/libs -I/usr/home/jhale/src/freebsd/ports/devel/qtcreator/work/qt-creator-opensource-src-14.0.0/src/libs/utils/mimetypes2 -I/usr/home/jhale/src/freebsd/ports/devel/qtcreator/work/qt-creator-opensource-src-14.0.0/src/libs/3rdparty/syntax-highlighting/src/lib -I/usr/home/jhale/src/freebsd/ports/devel/qtcreator/work/qt-creator-opensource-src-14.0.0/src/libs/3rdparty/syntax-highlighting/autogenerated/include -I/usr/home/jhale/src/freebsd/ports/devel/qtcreator/work/qt-creator-opensource-src-14.0.0/src/libs/3rdparty/syntax-highlighting/autogenerated/src/lib -I/usr/home/jhale/src/freebsd/ports/devel/qtcreator/work/qt-creator-opensource-src-14.0.0/src/libs/3rdparty -isystem /usr/local/include/qt6/QtCharts -isystem /usr/local/include/qt6 -isystem /usr/local/include/qt6/QtCore -isystem /usr/local/lib/qt6/mkspecs/freebsd-clang -isystem /usr/local/include/qt6/QtGui -isystem /usr/local/include/qt6/QtWidgets -isystem /usr/local/include/qt6/QtOpenGL -isystem /usr/local/include/qt6/QtOpenGLWidgets -isystem /usr/local/include/qt6/QtConcurrent -isystem /usr/local/include/qt6/QtNetwork -isystem /usr/local/include/qt6/QtCore5Compat -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -isystem /usr/local/include -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -isystem /usr/local/include  -DNDEBUG -std=c++20 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -fPIC -pthread -MD -MT src/plugins/appstatisticsmonitor/CMakeFiles/AppStatisticsMonitor.dir/idataprovider.cpp.o -MF src/plugins/appstatisticsmonitor/CMakeFiles/AppStatisticsMonitor.dir/idataprovider.cpp.o.d -o src/plugins/appstatisticsmonitor/CMakeFiles/AppStatisticsMonitor.dir/idataprovider.cpp.o -c /usr/home/jhale/src/freebsd/ports/devel/qtcreator/work/qt-creator-opensource-src-14.0.0/src/plugins/appstatisticsmonitor/idataprovider.cpp
/usr/home/jhale/src/freebsd/ports/devel/qtcreator/work/qt-creator-opensource-src-14.0.0/src/plugins/appstatisticsmonitor/idataprovider.cpp:339:16: error: unknown type name 'LinuxDataProvider'; did you mean 'IDataProvider'?
  339 |     return new LinuxDataProvider(pid);
      |                ^~~~~~~~~~~~~~~~~
      |                IDataProvider
/usr/home/jhale/src/freebsd/ports/devel/qtcreator/work/qt-creator-opensource-src-14.0.0/src/plugins/appstatisticsmonitor/idataprovider.h:11:7: note: 'IDataProvider' declared here
   11 | class IDataProvider : public QObject
      |       ^
/usr/home/jhale/src/freebsd/ports/devel/qtcreator/work/qt-creator-opensource-src-14.0.0/src/plugins/appstatisticsmonitor/idataprovider.cpp:339:16: error: allocating an object of abstract class type 'IDataProvider'
  339 |     return new LinuxDataProvider(pid);
      |                ^
/usr/home/jhale/src/freebsd/ports/devel/qtcreator/work/qt-creator-opensource-src-14.0.0/src/plugins/appstatisticsmonitor/idataprovider.h:24:20: note: unimplemented pure virtual method 'getMemoryConsumption' in 'IDataProvider'
   24 |     virtual double getMemoryConsumption() = 0;
      |                    ^
/usr/home/jhale/src/freebsd/ports/devel/qtcreator/work/qt-creator-opensource-src-14.0.0/src/plugins/appstatisticsmonitor/idataprovider.h:25:20: note: unimplemented pure virtual method 'getCpuConsumption' in 'IDataProvider'
   25 |     virtual double getCpuConsumption() = 0;
      |                    ^
2 errors generated.

I'm short on time ATM and didn't investigate too much, just initially reporting. It seems this new appstatisticsmonitor plugin needs ported or just removed FTTB.
Comment 7 Florian Walpen 2024-08-04 12:39:53 UTC
> Anyways, I'll just take this opportunity to plug tcberner's poudlist tool [1]...

Thanks, that looks promising, I think I'll try both makeplist and poudlist next time and see how it works out.

> Just doing a quick live test build on amd64-CURRENT, I'm getting the following error:
>
> FAILED: src/plugins/appstatisticsmonitor/CMakeFiles/AppStatisticsMonitor.dir/idataprovider.cpp.o

You didn't build in poudriere, right? Seems like I got around this plugin because Qt6::Charts is not installed in poudriere:


-- The following features have been disabled:

 * Build online documentation
 * Build documentation by default
...
 * Plugin AppStatisticsMonitor, with CONDITION TARGET Qt6::Charts
...


I'll see to disable this plugin explicitly first, porting it may take some more work.
Comment 8 Jason E. Hale freebsd_committer freebsd_triage 2024-08-04 15:39:20 UTC
(In reply to Florian Walpen from comment #7)
> You didn't build in poudriere, right? Seems like I got around this plugin because Qt6::Charts is not installed in poudriere

Right. I built it from ports and got that error because I have qt6-charts installed. It builds fine in poudriere, though.

> I'll see to disable this plugin explicitly first, porting it may take some more work.

That's probably the best move for now.
Comment 9 Florian Walpen 2024-08-04 16:10:43 UTC
Created attachment 252501 [details]
Update QtCreator to 14.0.0, fix SQLite alloca, AppStatisticsMonitor plugin off.

This should explicitly disable the AppStatisticsMonitor plugin. It builds in poudriere with Qt6::Charts temporarily added to the dependencies.
Comment 10 Jason E. Hale freebsd_committer freebsd_triage 2024-08-05 15:30:36 UTC
Comment on attachment 252501 [details]
Update QtCreator to 14.0.0, fix SQLite alloca, AppStatisticsMonitor plugin off.

LGTM!
Comment 11 commit-hook freebsd_committer freebsd_triage 2024-08-05 15:32:53 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=7955b24cf472fbf94c1e8959139acfbfddfd4afa

commit 7955b24cf472fbf94c1e8959139acfbfddfd4afa
Author:     Florian Walpen <dev@submerge.ch>
AuthorDate: 2024-05-31 13:47:11 +0000
Commit:     Jason E. Hale <jhale@FreeBSD.org>
CommitDate: 2024-08-05 15:31:24 +0000

    devel/qtcreator: Update to 14.0.0

    Fix SQLite alloca option. The build of the bundled SQLite was previously
    fixed by disabling the SQLITE_USE_ALLOCA option. Improve the fix by
    setting better build defines and change the faulty line in SQLite, thus
    enabling the alloca option as recommended upstream.

    Changes:        https://www.qt.io/blog/qt-creator-14-released

    PR:             280469

 devel/qtcreator/Makefile                           |   4 +-
 devel/qtcreator/distinfo                           |   6 +-
 .../patch-src_libs_3rdparty_sqlite_config.h (gone) |  10 -
 .../patch-src_libs_3rdparty_sqlite_sqlite3.c (new) |  11 +
 .../files/patch-src_libs_sqlite_CMakeLists.txt     |   6 +-
 ...h-src_plugins_qmldesigner_CMakeLists.txt (gone) |  10 -
 devel/qtcreator/pkg-plist                          | 333 +++++++++++++++++++--
 7 files changed, 320 insertions(+), 60 deletions(-)
Comment 12 Jason E. Hale freebsd_committer freebsd_triage 2024-08-05 15:43:02 UTC
Committed, thanks! I think my favorite part of this release is the menus are finally readable with the Breeze Dark theme! \o/