Bug 275636 - devel/qtcreator: Bump revision, use llvm17 as recommended.
Summary: devel/qtcreator: Bump revision, use llvm17 as recommended.
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-kde (group)
URL: https://www.qt.io/blog/qt-creator-12-...
Keywords:
Depends on:
Blocks:
 
Reported: 2023-12-08 14:02 UTC by Florian Walpen
Modified: 2023-12-12 19:46 UTC (History)
2 users (show)

See Also:
jhale: maintainer-feedback+


Attachments
Bump revision for Qt 6.6.1, use llvm17 as recommended. (2.72 KB, patch)
2023-12-08 14:02 UTC, Florian Walpen
no flags Details | Diff
Bump revision for Qt 6.6.1, use llvm17 as recommended. (2.19 KB, patch)
2023-12-11 17:20 UTC, Florian Walpen
jhale: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Walpen 2023-12-08 14:02:46 UTC
Created attachment 246908 [details]
Bump revision for Qt 6.6.1, use llvm17 as recommended.

After an update of Qt packages to 6.6.1, QtCreator would reproducibly crash in some parts of the settings dialog. Rebuild fixes that, thus bump port revision.

Builds fine now without disabling precompiled headers, so remove that flag.

Build and run depend on llvm17 as recommended upstream, for better clangd compatibility:

https://www.qt.io/blog/qt-creator-12-c-code-model-update

Previously llvm15 was chosen because it's usually already installed as a dependency of mesa. But I suppose having less trouble with clangd is worth using llvm17 instead.

Since llvm17 seems to be more strict about non-standard alloca stack allocation, patch that out of the internal SQLite build config. This matches the config of databases/sqlite3 in ports.
Comment 1 Jason E. Hale freebsd_committer freebsd_triage 2023-12-10 17:29:26 UTC
Looks good, although I'd be a bit hesitant to enable PCH without thorough testing, especially for non-amd64/i386 platforms as they have a tendency to cause build errors and can significantly slow down the build even on amd64 as they do with www/qt6-webengine. I haven't done any benchmarking with qtcreator, though. For the time being, I'd rather just leave it as is or make it a non-default option for advanced users.
Comment 2 Florian Walpen 2023-12-11 17:20:39 UTC
Created attachment 246985 [details]
Bump revision for Qt 6.6.1, use llvm17 as recommended.

Thanks for the warning, I wasn't aware that there are other reasons to disable PCH apart from the original build failure. Omitted from the patch, let's keep PCH disabled.
Comment 3 Florian Walpen 2023-12-11 17:36:46 UTC
Regarding build times BTW, devel/qtcreator build used to pick up ccache previously, but doesn't anymore. Maybe for some weeks now, can't pinpoint exactly. Any ideas?

I added clang16 and clang17 to the ccache symlink list, to no avail. But the issue was already present with clang15.
Comment 4 Jason E. Hale freebsd_committer freebsd_triage 2023-12-11 19:38:55 UTC
(In reply to Florian Walpen from comment #3)
We probably need to add USES=llvm:noexport to fix the ccache issue because after [1], CC/CXX/CPP are exported by default.

[1] https://cgit.freebsd.org/ports/commit/Mk/Uses/llvm.mk?id=4df0e66a3662ac9d427c2dcd79eb8555236083dd
Comment 5 Florian Walpen 2023-12-12 13:30:01 UTC
(In reply to Jason E. Hale from comment #4)

Thanks for the hint, llvm:noexport does find the ccache symlink, but uses compiler from base instead of llvm17. That may not matter anymore, since QtCreator now uses external clangd language servers. But I'd still prefer to test drive such a change for some time.

I'd suggest to commit this patch as is, ASAP for the crash fix. QtCreator 12.0.1 just came out, and we could include the switch to base compiler / ccache with that update.
Comment 6 Jason E. Hale freebsd_committer freebsd_triage 2023-12-12 19:25:38 UTC
(In reply to Florian Walpen from comment #5)
I'm fine with that, although I don't think using the base compiler will be an issue as that was the behavior before the aforementioned change to Mk/Uses/llvm.mk. For expediency, I'll just commit your patch as-is, because I have a few other pots on the boil and don't have time to test further changes today.
Comment 7 commit-hook freebsd_committer freebsd_triage 2023-12-12 19:44:59 UTC
A commit in branch main references this bug:

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

commit a75fb0906770e806bcb69c2796bff9dbe0a1181a
Author:     Florian Walpen <dev@submerge.ch>
AuthorDate: 2023-11-25 22:13:54 +0000
Commit:     Jason E. Hale <jhale@FreeBSD.org>
CommitDate: 2023-12-12 19:44:16 +0000

    devel/qtcreator: Use llvm17 as recommended

    QtCreator would crash in the settings dialog if not rebuilt after
    an update of Qt packages to 6.6.1 release. Make build and run depend
    on llvm17 as recommended upstream, for better clangd compatibility:

    https://www.qt.io/blog/qt-creator-12-c-code-model-update

    Since llvm17 seems to be more strict about non-standard alloca stack
    allocation, patch that out of the internal SQLite build config. This
    matches the config of databases/sqlite3 in ports.

    PR:             275636

 devel/qtcreator/Makefile                                       |  3 ++-
 .../files/patch-src_libs_3rdparty_sqlite_config.h (new)        | 10 ++++++++++
 2 files changed, 12 insertions(+), 1 deletion(-)
Comment 8 Jason E. Hale freebsd_committer freebsd_triage 2023-12-12 19:46:45 UTC
Committed, thanks!