Well, I can be wrong about MacPorts defaults here, but from the log in the
original report shows that libc++ headers are used:
/opt/local/libexec/gcc15/libc++/include/c++/v1
Perhaps it was locally configured that way then.

In any case, my point was that the cause of the error is libc++’s headers,
not gcc as such.

On Tue, Mar 24, 2026 at 11:13 PM Chris Jones <[email protected]>
wrote:

>
>
> On 24/03/2026 3:02 pm, Sergey Fedorov wrote:
> > To be clear: on powerpc (and by default outside of MacPorts generally)
> > gcc uses libstdc++, and that works fine.
> > MacPorts uses libc++ with gcc on archs other than powerpc, which is what
> > fails. It is not a fault of gcc, it is a fault of libc++ being outdated.
> > This should work fine on 10.5 out of the box.
> Wrong. By default building c++ with gcc will always link against
> libstdc++, not  libc++ . MacPorts GCC version have the option to use
> libc++, but how well this works in practice is pretty flaky.
>
> This is why we don't in general allow gcc as a fallback compiler for C++
> builds, as doing so would result in binaries ABI incompatble with other
> binaries built with clang++. Forcing the use of gcc for this, with
> configure.compiler=macports-gcc-15  is very much in-advised on any
> platform where libc++ is the default runtime (i.e. all but the very
> oldest ancient OSes).
>
> Chris
>

Reply via email to