clang++ 16 defaults to C++17 causing errors with the codebase. Switching back to C++14 makes it build. Patch to be attached after bug creation. Please apply with 'git am'. Thanks.
Created attachment 244723 [details] Please apply with 'git am'
(In reply to Olivier Certner from comment #0) > clang++ 16 defaults to C++17 causing errors with the codebase. Could you please cite the exact built errors you're seeing? I couldn't find the log in the pkg-fallout@ reports nor reproduce it locally with patched Makefile (CXX=/usr/local/bin/clang++16). > Switching back to C++14 makes it build. Fixing the actual bug(s) in the code is preferred to lowering the C++ standard, but in any case we must understand what's going on here first.
(In reply to Alexey Dokuchaev from comment #2) The only errors this build produces are these: > error: ISO C++17 does not allow 'register' storage class specifier and there are dozens of them. They are harmless, and in fact were fixed upstream long ago (in 2017). For there reasons, I don't think it's worth it to patch them out. I'll also note that upstream explicitly requires C++11 in the newer 1.6.1 version (from 2017) of the 1.x series. So I tend to think that this should go in as is (perhaps using "USE_CXXSTD=c++11" instead). An alternative would be to upgrade to 1.6.1, but this can be done afterwards with no harm (it is likely to take more time, and right now I can't). As to why there are no fallouts, for 13, that's normal since apparently the last builds were with clang 14.0.5, whereas I have clang 16.0.6 (I'm on 13-STABLE from end of August). The latter clang version is also the one used for the latest pkg builds for 14-STABLE, where no fallouts can be seen, and I'm not sure why. FWIW, I'm using the ports tree at 38c671e45e4bae21a0199079d08273c1f171e1d4. What do you think?
(In reply to Olivier Certner from comment #3) > The only errors this build produces are these: > error: ISO C++17 does not allow 'register' storage class specifier > and there are dozens of them. I only see those when building the port with non-default ISPELL option, which also agrees with grepping the source code for `register'. You didn't mention this detail. :-) > As to why there are no fallouts, for 13 [...] I meant pkg-fallout@ runs against -CURRENT, of course. > where no fallouts can be seen, and I'm not sure why. I guess that's because the port defaults to HUNSPELL, could you confirm?
(In reply to Alexey Dokuchaev from comment #4) > You didn't mention this detail. :-) Indeed. :-) > I meant pkg-fallout@ runs against -CURRENT, of course. I'm reporting a build failure on 13-STABLE, so naturally I wanted to know if this problem was visible in the ports build for 13, in addition to -CURRENT. > I guess that's because the port defaults to HUNSPELL, could you confirm? I confirm that the ISPELL option is the culprit. I've also tested building with the C++11 standard (instead of C++14) and it works. So going to upload an amended patch to use that standard (as said above, matches what upstream did for 1.6.1). I don't know anything more about this port. Would upgrading it to 1.6.1 be a pain? On my machines, I only see it appearing as a dependency of gtkspell, but in the ports tree it seems to be a dependency for a bunch of other ones, including some PHP ports.
Created attachment 245120 [details] Please apply with 'git am' Force C++11 standard instead of C++14. Revise the commit message to indicate that the build fails only with ISPELL option activated.
Created attachment 245696 [details] Please apply with 'git am' New patch, because I managed to mess up the previous version. Ping?
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=ed633bad445cb49e524aab1cb11a2cbf17364a5c commit ed633bad445cb49e524aab1cb11a2cbf17364a5c Author: Olivier Certner <olce.freebsd@certner.fr> AuthorDate: 2023-08-25 11:06:31 +0000 Commit: Joseph Mingrone <jrm@FreeBSD.org> CommitDate: 2024-01-18 23:44:50 +0000 textproc/enchant: Fix build with ISPELL option clang++ 16 defaults to C++17 causing errors with the codebase when the ISPELL option is turned on. Switching back to C++11 (what upstream did for 1.6.1) makes it build correctly. PR: 273649 textproc/enchant/Makefile | 1 + 1 file changed, 1 insertion(+)
A commit in branch 2024Q1 references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=236c97ad7faea13d55f4f2a611ee250fcf55c10c commit 236c97ad7faea13d55f4f2a611ee250fcf55c10c Author: Olivier Certner <olce.freebsd@certner.fr> AuthorDate: 2023-08-25 11:06:31 +0000 Commit: Joseph Mingrone <jrm@FreeBSD.org> CommitDate: 2024-01-18 23:48:34 +0000 textproc/enchant: Fix build with ISPELL option clang++ 16 defaults to C++17 causing errors with the codebase when the ISPELL option is turned on. Switching back to C++11 (what upstream did for 1.6.1) makes it build correctly. PR: 273649 (cherry picked from commit ed633bad445cb49e524aab1cb11a2cbf17364a5c) textproc/enchant/Makefile | 1 + 1 file changed, 1 insertion(+)