Created attachment 244410 [details] Patch 1 Time to update GCC_DEFAULT to 13. Indeed 13.2 is already out (and so I am late on my plan: I wanted to make that step with 13.1). This is a massive GCC ports update. It includes: - switching back from LTO bootstrap to standard bootstrap on i386, amd64 and aarch64, as LTO bootstrap gives too many issues, on the official package builders too; - updating GCC 11 to 11.4.0; - updating GCC 12 to 12.3.0; - updating GCC 13 to 13.2.0; - set GCC_DEFAULT=13. Making all those changes together should save ports testing and user packages build time, hopefully without adding any complexity. All 5 patches need to be applied together.
Created attachment 244411 [details] Patch 2
Created attachment 244412 [details] Patch 3
Created attachment 244413 [details] Patch 4
Created attachment 244414 [details] Patch 5
Some new failure logs: https://pkg-status.freebsd.org/package18/data/124amd64-default-foo/2023-09-06_17h55m19s/logs/errors/pamixer-1.4.15_7.log https://pkg-status.freebsd.org/package18/data/124amd64-default-foo/2023-09-06_17h55m19s/logs/errors/seqan3-3.2.0_2.log https://pkg-status.freebsd.org/package18/data/124amd64-default-foo/2023-09-06_17h55m19s/logs/errors/sdr-wspr-0.1.0_12.log https://pkg-status.freebsd.org/package18/data/124amd64-default-foo/2023-09-06_17h55m19s/logs/errors/wsjtx-2.5.4_7.log https://pkg-status.freebsd.org/package18/data/124amd64-default-foo/2023-09-06_17h55m19s/logs/errors/cockroach-19.1.11_14.log https://pkg-status.freebsd.org/package18/data/124amd64-default-foo/2023-09-06_17h55m19s/logs/errors/omniORB-4.3.1.log https://pkg-status.freebsd.org/package18/data/124amd64-default-foo/2023-09-06_17h55m19s/logs/errors/pcsc-cyberjack-3.99.5.f.s15_1.log https://pkg-status.freebsd.org/package18/data/124amd64-default-foo/2023-09-06_17h55m19s/logs/errors/emulationstation-2.9.4_5.log https://pkg-status.freebsd.org/package18/data/124amd64-default-foo/2023-09-06_17h55m19s/logs/errors/higan-106_12.log https://pkg-status.freebsd.org/package18/data/124amd64-default-foo/2023-09-06_17h55m19s/logs/errors/libretro-bsnes-20211218_1.log https://pkg-status.freebsd.org/package18/data/124amd64-default-foo/2023-09-06_17h55m19s/logs/errors/openmsx-18.0_1.log https://pkg-status.freebsd.org/package18/data/124amd64-default-foo/2023-09-06_17h55m19s/logs/errors/libretro-px68k-0.20220311_1.log https://pkg-status.freebsd.org/package18/data/124amd64-default-foo/2023-09-06_17h55m19s/logs/errors/darktable-4.4.2_2.log https://pkg-status.freebsd.org/package18/data/124amd64-default-foo/2023-09-06_17h55m19s/logs/errors/rawtherapee-5.9_3.log https://pkg-status.freebsd.org/package18/data/124amd64-default-foo/2023-09-06_17h55m19s/logs/errors/gambit-c-4.9.4_1,1.log https://pkg-status.freebsd.org/package18/data/124amd64-default-foo/2023-09-06_17h55m19s/logs/errors/librsb-1.3.0.2_1.log https://pkg-status.freebsd.org/package18/data/124amd64-default-foo/2023-09-06_17h55m19s/logs/errors/g810-led-0.4.2_1.log https://pkg-status.freebsd.org/package18/data/124amd64-default-foo/2023-09-06_17h55m19s/logs/errors/opentoonz-1.5.0_6.log https://pkg-status.freebsd.org/package18/data/124amd64-default-foo/2023-09-06_17h55m19s/logs/errors/cgicc-3.2.19_2.log
The ports failing to build with an error about "__is_convertible" like graphics/darktable seem to hit an incompatibility between GCC 13 and the version of libcxx we have in FreeBSD 12.x: https://github.com/llvm/llvm-project/commit/484e64f7e7b2c0494d7b2dbfdd528bcd707ee652 https://github.com/llvm/llvm-project/issues/63133 What is the usual course of actions for this situation? I don't know if this can be worked around at the port level.
(In reply to Jean-Sébastien Pédron from comment #6) In general, we have two solutions: - the easy solution: define USE_GCC=12 so that GCC_DEFAULT is ignored. It has many downsides. It enforces ports users to build lang/gcc12 even if they already have lang/gcc13 (GCC_DEFAULT) installed. Moreover, once GCC 12 gets EOL, if the port still does not compile with any supported compiler it should be deprecated; - the optimal solution: patch the port so that it can build with the compiler in base (clang) or with some other compiler (probably still clang, but not necessarly the version in base), then upstream the changes. The only downside is that it is usually harder. One might also argue that it would still be nice to allow ports users to use their compiler of choice.
(In reply to Lorenzo Salvadore from comment #7) Thank you for describing the options! The graphics/darktable port was switched from LLVM to GCC because it broke on a regular basis with LLVM. The last time was because LLVM couldn't handle `static inline __attribute__((target-clones))` and the resulting duplicated ifunc resolvers. I think I will go with the `USE_GCC=12` option. Is it ok to set it for FreeBSD 12.x only? The incompatibility seems to come from FreeBSD 12's libcxx and its headers to me, not from darktable.
(In reply to Jean-Sébastien Pédron from comment #8) > I think I will go with the `USE_GCC=12` option. Is it ok to set it for FreeBSD 12.x only? > > The incompatibility seems to come from FreeBSD 12's libcxx and its headers to me, not from darktable. Sure it is ok to set it for FreeBSD 12 only. Actually, I think it is even better, as long as it is an issue affecting FreeBSD 12 only. Please test it carefully.
Here is the patch I plan to commit to graphics/darktable: ``` diff --git a/graphics/darktable/Makefile b/graphics/darktable/Makefile index 02d5953cad65..c37a1d85a428 100644 --- a/graphics/darktable/Makefile +++ b/graphics/darktable/Makefile @@ -53,7 +53,11 @@ USE_XORG= ice sm x11 xext xrandr SHEBANG_FILES= tools/*.sh +.if ${OSREL:R} < 13 +USE_GCC= 12 +.else USE_GCC= yes +.endif CMAKE_ARGS+= -DBINARY_PACKAGE_BUILD=1 -DUSE_PORTMIDI:BOOL=OFF ``` Could you please confirm that the use of `USE_GCC` is correct and that it won't break any future work on GCC ports?
I committed an updated patch to graphics/darktable. Hopefully it will build successfully during the next exp-run. Thank you for your help!
(In reply to Jean-Sébastien Pédron from comment #10) > Could you please confirm that the use of `USE_GCC` is correct and > that it won't break any future work on GCC ports? This looks good to me, thank you! (It's preferable not to refer to specific versions of GCC, yet given circumstances I don't have a better suggestion.)
Comment on attachment 244413 [details] Patch 4 The whole updating process will probably take longer than initially planned, so I have already committed this patch separately.
I need to request another exp-run with all the non-obsolete patches attached, but on FreeBSD 13. It looks that most bugs found in the precedent exp-run are FreeBSD 12-specific, which will go eol at the end of the year. So please run the exp-run against FreeBSD 13: I plan to ignore all FreeBSD 12-specific issues and commit the updates once FreeBSD 12 is eol. Thanks.
It seems that some patches are outdated Applying: lang/gcc*: Switch back to standard bootstrap error: patch failed: lang/gcc13/Makefile:1 error: lang/gcc13/Makefile: patch does not apply Patch failed at 0001 lang/gcc*: Switch back to standard bootstrap
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=3e0fc5e7607d30400bfb3d5a7b3d1b77e1a6699a commit 3e0fc5e7607d30400bfb3d5a7b3d1b77e1a6699a Author: Lorenzo Salvadore <salvadore@FreeBSD.org> AuthorDate: 2023-10-31 15:25:50 +0000 Commit: Lorenzo Salvadore <salvadore@FreeBSD.org> CommitDate: 2023-11-01 11:55:09 +0000 lang/gcc11: Switch back to standard bootstrap Switch back to STANDARD_BOOTSTRAP on i386, amd64 and aarch64 as default option instead of LTO_BOOTSTRAP, forwarding the changes already commited in the devel ports (commits daf12c76bd531335f58e7602afd3bc8da8fc5c33, 872d61f8ead10a6d935117876cf60057a46770ff, and da4cb11216a7ed594d5dc453deb4693b48c3c7e9). Users wanting to use LTO_BOOTSTRAP can still enable the option manually. PR: 273397 Tested by: exp-run (antoine) lang/gcc11/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=1e5d7617279e607c9d1626271ae2b8e3314ed90c commit 1e5d7617279e607c9d1626271ae2b8e3314ed90c Author: Lorenzo Salvadore <salvadore@FreeBSD.org> AuthorDate: 2023-08-14 12:13:56 +0000 Commit: Lorenzo Salvadore <salvadore@FreeBSD.org> CommitDate: 2023-11-01 11:55:09 +0000 lang/gcc11: Update to 11.4.0 Changes: https://gcc.gnu.org/gcc-11/changes.html#11.4 PR: 273397 Tested by: exp-run (antoine) lang/gcc11/Makefile | 3 +-- lang/gcc11/distinfo | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-)
Comment on attachment 244411 [details] Patch 2 I have committed this patch: the first exp-run should have been a sufficient test. I will soon update the other patches.
Created attachment 246175 [details] Patch 2.1 patch
Created attachment 246177 [details] Patch 2.2 patch
Created attachment 246178 [details] Patch 2.3 Set GCC_DEFAULT=13
I have updated the patches. Please run an exp-run with all non obsolete patches on FreeBSD 13. Thanks.
Some new failure logs: https://pkg-status.freebsd.org/package23/data/132i386-default-foo/2023-11-10_07h46m19s/logs/errors/pamixer-1.4.15_8.log https://pkg-status.freebsd.org/package23/data/132i386-default-foo/2023-11-10_07h46m19s/logs/errors/sdr-wspr-0.1.0_12.log https://pkg-status.freebsd.org/package23/data/132i386-default-foo/2023-11-10_07h46m19s/logs/errors/omniORB-4.3.1.log https://pkg-status.freebsd.org/package23/data/132i386-default-foo/2023-11-10_07h46m19s/logs/errors/pcsc-cyberjack-3.99.5.f.s15_1.log https://pkg-status.freebsd.org/package23/data/132i386-default-foo/2023-11-10_07h46m19s/logs/errors/emulationstation-2.9.4_5.log https://pkg-status.freebsd.org/package23/data/132i386-default-foo/2023-11-10_07h46m19s/logs/errors/higan-106_12.log https://pkg-status.freebsd.org/package23/data/132i386-default-foo/2023-11-10_07h46m19s/logs/errors/libretro-bsnes-20211218_1.log https://pkg-status.freebsd.org/package23/data/132i386-default-foo/2023-11-10_07h46m19s/logs/errors/libretro-px68k-0.20230114.log https://pkg-status.freebsd.org/package23/data/132i386-default-foo/2023-11-10_07h46m19s/logs/errors/gambit-c-4.9.4_1,1.log https://pkg-status.freebsd.org/package23/data/132i386-default-foo/2023-11-10_07h46m19s/logs/errors/cgicc-3.2.20.log https://pkg-status.freebsd.org/package22/data/132amd64-default-foo/2023-11-10_07h48m13s/logs/errors/pamixer-1.4.15_8.log https://pkg-status.freebsd.org/package22/data/132amd64-default-foo/2023-11-10_07h48m13s/logs/errors/sdr-wspr-0.1.0_12.log https://pkg-status.freebsd.org/package22/data/132amd64-default-foo/2023-11-10_07h48m13s/logs/errors/cockroach-19.1.11_15.log https://pkg-status.freebsd.org/package22/data/132amd64-default-foo/2023-11-10_07h48m13s/logs/errors/omniORB-4.3.1.log https://pkg-status.freebsd.org/package22/data/132amd64-default-foo/2023-11-10_07h48m13s/logs/errors/pcsc-cyberjack-3.99.5.f.s15_1.log https://pkg-status.freebsd.org/package22/data/132amd64-default-foo/2023-11-10_07h48m13s/logs/errors/emulationstation-2.9.4_5.log https://pkg-status.freebsd.org/package22/data/132amd64-default-foo/2023-11-10_07h48m13s/logs/errors/higan-106_12.log https://pkg-status.freebsd.org/package22/data/132amd64-default-foo/2023-11-10_07h48m13s/logs/errors/libretro-bsnes-20211218_1.log https://pkg-status.freebsd.org/package22/data/132amd64-default-foo/2023-11-10_07h48m13s/logs/errors/libretro-px68k-0.20230114.log https://pkg-status.freebsd.org/package22/data/132amd64-default-foo/2023-11-10_07h48m13s/logs/errors/darktable-4.4.2_4.log https://pkg-status.freebsd.org/package22/data/132amd64-default-foo/2023-11-10_07h48m13s/logs/errors/gambit-c-4.9.4_1,1.log https://pkg-status.freebsd.org/package22/data/132amd64-default-foo/2023-11-10_07h48m13s/logs/errors/blaspp-2022.05.00_1.log https://pkg-status.freebsd.org/package22/data/132amd64-default-foo/2023-11-10_07h48m13s/logs/errors/dgl-1.1.1.log https://pkg-status.freebsd.org/package22/data/132amd64-default-foo/2023-11-10_07h48m13s/logs/errors/octave-forge-parallel-4.0.2.log https://pkg-status.freebsd.org/package22/data/132amd64-default-foo/2023-11-10_07h48m13s/logs/errors/dirac-quantum-chemistry-software-22.0_1.log https://pkg-status.freebsd.org/package22/data/132amd64-default-foo/2023-11-10_07h48m13s/logs/errors/spheral-2023.06.0.log https://pkg-status.freebsd.org/package22/data/132amd64-default-foo/2023-11-10_07h48m13s/logs/errors/cgicc-3.2.20.log
I have updated all dependent bug reports with the new information from the latest exp-run. Unfortunately, switching to FreeBSD 13 does not seem to have improved the situation.
Add a bug about address sanitizer to the dependency list. I would now want to postpone GCC_DEFAULT update for such a bug, but since it seems that some progress are being done on it, let us try to fix it before the GCC default version update.
All bugs have been addressed. Can we have another exp-run please? Thanks.
(In reply to Lorenzo Salvadore from comment #26) This will need an updated patch.
Created attachment 247882 [details] Patch 3.1
Created attachment 247883 [details] Patch 3.2
Created attachment 247884 [details] Patch 3.3
I have updated the patches. All non obsolete patches need to be applied. Thanks.
FWIW, I'd go ahead and apply patch 3.1 right away. And similarly patch 3.2; maybe, if you want to separate, a week or 10 days apart (though not strictly necessary). And leave the -exp run to the GCC_DEFAULT change.
And FWIW#2: great job!
Some new failure logs: https://pkg-status.freebsd.org/pb2/data/140i386-default-foo/2024-01-29_17h34m17s/logs/errors/dxx-rebirth-20231232.log https://pkg-status.freebsd.org/pb2/data/140i386-default-foo/2024-01-29_17h34m17s/logs/errors/libRmath-4.3.1.log https://pkg-status.freebsd.org/pb2/data/140i386-default-foo/2024-01-29_17h34m17s/logs/errors/py39-tweedledum-1.1.1.log https://pkg-status.freebsd.org/package18/data/140amd64-default-foo/2024-01-29_17h34m15s/logs/errors/darktable-4.6.0.log https://pkg-status.freebsd.org/package18/data/140amd64-default-foo/2024-01-29_17h34m15s/logs/errors/rawtherapee-5.9_6.log https://pkg-status.freebsd.org/package18/data/140amd64-default-foo/2024-01-29_17h34m15s/logs/errors/octave-forge-rtree-0.8.0.log https://pkg-status.freebsd.org/package18/data/140amd64-default-foo/2024-01-29_17h34m15s/logs/errors/py39-tweedledum-1.1.1.log
(In reply to Gerald Pfeifer from comment #32) I agree, the 1st too patches could have been applied several months ago
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=41870b7b7d042523cff7d8fe3abde24f5a394804 commit 41870b7b7d042523cff7d8fe3abde24f5a394804 Author: Lorenzo Salvadore <salvadore@FreeBSD.org> AuthorDate: 2023-11-07 10:59:49 +0000 Commit: Lorenzo Salvadore <salvadore@FreeBSD.org> CommitDate: 2024-02-03 09:57:04 +0000 lang/gcc{12,13}: Switch back to standard bootstrap Switch back to STANDARD_BOOTSTRAP on i386, amd64 and aarch64 as default option instead of LTO_BOOTSTRAP, forwarding the changes already commited in the devel ports (commits daf12c76bd531335f58e7602afd3bc8da8fc5c33, 872d61f8ead10a6d935117876cf60057a46770ff, and da4cb11216a7ed594d5dc453deb4693b48c3c7e9) and in lang/gcc11 (commit 3e0fc5e7607d30400bfb3d5a7b3d1b77e1a6699a) Users wanting to use LTO_BOOTSTRAP can still enable the option manually. PR: 273397 Tested by: exp-run (antoine) lang/gcc12/Makefile | 8 ++++---- lang/gcc13/Makefile | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-)
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=a51e69c269575d3c8d9e4e6592efc1bf0605473c commit a51e69c269575d3c8d9e4e6592efc1bf0605473c Author: Lorenzo Salvadore <salvadore@FreeBSD.org> AuthorDate: 2023-11-07 11:08:57 +0000 Commit: Lorenzo Salvadore <salvadore@FreeBSD.org> CommitDate: 2024-02-03 09:57:04 +0000 lang/gcc12: Update to 12.3.0 Changes: https://gcc.gnu.org/gcc-12/changes.html#12.3 PR: 273397 Tested by: exp-run (antoine) lang/gcc12/Makefile | 3 +-- lang/gcc12/distinfo | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-)
Thanks Antoine, I will soon check into those new failures. I have followed Gerarld's suggestion and applied those two patches: indeed, issues are coming from lang/gcc13 only. Hopefully, we will be able to close this PR within this quarter... I think I will fix most of the new failures with USE_GCC=12, so that the GCC_DEFAULT update does not wait any more: it has already taken a lot of time.
(In reply to Antoine Brodin from comment #34) Bugs for this failures have been created or re-opened.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=38cea82a5d2f6d6f5848491bc00c164db3e0db1f commit 38cea82a5d2f6d6f5848491bc00c164db3e0db1f Author: Lorenzo Salvadore <salvadore@FreeBSD.org> AuthorDate: 2023-11-07 11:14:51 +0000 Commit: Lorenzo Salvadore <salvadore@FreeBSD.org> CommitDate: 2024-02-24 10:27:20 +0000 Mk/bsd.default-versions.mk: Set GCC_DEFAULT=13 Also updates the list of available GCC versions. PR: 273397 Tested by: exp-run (antoine) Mk/bsd.default-versions.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
We can finally close this PR. All known issues have been fixed (some by setting USE_GCC=12). I did not consider a final exp-run necessary: we already had many and only minor ports ever had problems. Time to finally get to GCC 13.
Thanks Antoine!