https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119105
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> --- N.B. your macports build of GCC is configured with: --with-gxx-libcxx-include-dir=/opt/local/libexec/gcc14/libc++/include/c++/v1 So you should be able to use g++ -stdlib=libc++ to use libc++ as the C++ standard library, which should mean you get working std::locale support.