The port fails to build with GCC 15 and blocks GCC_DEFAULT update to 15. Full log in URL field. This link might be useful: https://gcc.gnu.org/gcc-15/porting_to.html . checking for nlopt_set_ftol_abs... yes checking for nlopt_optimize... yes checking for octave/oct.h... no configure: error: octave header files not found ===> Script "configure" failed unexpectedly. Please report the problem to stephen@FreeBSD.org [maintainer] and attach the "/wrkdirs/usr/ports/math/octave-forge-mboct-fem-pkg/work/mboct-fem-pkg-0.2.2/src/config.log" including the output of the failure of your make command. Also, it might be a good idea to provide an overview of all packages installed on your system (e.g. a /usr/local/sbin/pkg-static info -g -Ea). *** Error code 1
Can you provide me a guide on the best way to test the port with GCC-15?
Created attachment 268288 [details] Patch to get GCC 15 to work. OK, I figured out how to test GCC_DEFAULT=15. This turned out to be a rather difficult job, since the port uses constexpr in a non-compliant manner. So I had to be rather creative. Tell me if the attached patch works?
Created attachment 268289 [details] Patch to get GCC 15 to work. Use this patch instead. The last one has an error.
Created attachment 268291 [details] Patch to get GCC 15 to work version 3 No, use this one.
Thanks Stephen, I will test yout patch as soon as possible. Just a note about style: I have noticed that you are adding a pre-build target before you finish declaring variables. This is very unusual and the recommendation in the porter's handbook is to declare targets after variables (https://docs.freebsd.org/en/books/porters-handbook/order/#porting-order-targets). I strongly suggest you follow it unless you have a specific reason to do things differently.
(In reply to Lorenzo Salvadore from comment #5) OK, I'll do that.
Created attachment 268362 [details] Patch to get GCC 15 to work.
I contacted the writers of the code. The just informed me that their solution is to use clang instead of gcc. I am somewhat conflicted about this advice, since technically their code is non-compliant, and they are relying on the notion that clang doesn't strictly follow the standard.
(In reply to Stephen Montgomery-Smith from comment #8) Oh, they also require c++23.
Created attachment 268488 [details] Patch to get GCC 15 to work. This patch is much simpler. I won't even bump portrevision with this one. After more testing, I will commit it, probably today.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=99139ce3bdd80f7fbbd1aa13590fcc92d04e0769 commit 99139ce3bdd80f7fbbd1aa13590fcc92d04e0769 Author: Stephen Montgomery-Smith <stephen@FreeBSD.org> AuthorDate: 2026-03-03 01:43:02 +0000 Commit: Stephen Montgomery-Smith <stephen@FreeBSD.org> CommitDate: 2026-03-03 01:43:02 +0000 math/octave-forge-mboct-fem-pkg: Premptive fix for GCC-15. - Changes so that when GCC defaults to version 15, the port will still build. PR: 293334 Reported by: salvadore@freebsd.org math/octave-forge-mboct-fem-pkg/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
This is why the most recent patch is the correct approach. The initial error you cited was caused by the item compiler:gcc-c++11-lib in USES. The result was that c++ was used as the compiler, which I didn't realize. clang, being more strictly compliant with the C++ standard than gcc, created these constexpr errors. It took me a while to realize that c++ was being used instead of g++15. This mistake on my part was compounded when the software writers told me that they were using clang++. When I realized that this port was using c++, I added USE_GCC, and that fixed the problem. It seems that g++15 makes the same mistake as g++14, and that mistake is what is required to make this port work.
Thanks a lot for your hard work Stephen. I am sorry that I could not help you test patches, but unfortunately lang/rust was in the dependency chain, and apparently I do not have enough ram to build rust under poudriere, unless this is the only thing the machine is doing... Even using prebuilt packages was not an option as gcc_default=15 implied forced rebuild for lang/rust... (I think poudriere might have been a bit too aggressive.) I assume we can close this bug report as fixed. Just a few observations: - in general, we prefer ports to be built with the default FreeBSD compiler (clang). If they also build with GCC this is even better, but it is a secondary goal (and I guess very small amount of users actually want to change the default compiler with a GCC version). GCC should be enforced only for ports that have very good reasons to do so (main reason: they don't built with clang). - it is weird that this port did not use GCC but failed in the exp-run that tested GCC_DEFAULT=15. It is possible that the cause was within one of its dependencies, or that it was a mistake: maybe the port did not build for a reason that had nothing to do with the compiler in use, but the error was found for the first time in this context and was misinterpreted. - the original error was "configure: error: octave header files not found". Not finding files is not exactly a compilation error, it should not depend on the compiler in use. It might depends on the options passed to the compiler (maybe default options that change from a compiler to another), but not on the compilation process. Anyway, thanks a lot for your fix. As long as it builds with GCC 15, as maintainer of the GCC ports, I am fine.
It was compiler:gcc-c++11-lib in USES that previously caused it to build with GCC. And it was removing this that fixed the original problem you posted. I don't understand why.