[MacPorts] #70341: g++ fails to compile when -libstd=libc++ is set
MacPorts
noreply at macports.org
Mon Jul 8 20:35:00 UTC 2024
#70341: g++ fails to compile when -libstd=libc++ is set
--------------------------------+--------------------
Reporter: mouse07410 | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords:
Port: gcc12 gcc13 gcc14 |
--------------------------------+--------------------
Comment (by mouse07410):
> libc++ support with GCC is, and always has been, somewhat experimental.
Its a nice idea, and when I first added support it worked OK, for some
cases, but even then you could not compile every you could with
GCC+stdlibc++ or clang+libc++, there where plenty of things which just did
not work
I see. I was not aware of that. In fact, for a long time, I used G++ to
compile Crypto++ package with {{{-stdlib=libc++}}}, and it worked fine
(!!!).
Starting with GCC12, it stopped working. :-(
Yes, I confirm that "quick_exit" is the issue that keeps rearing its ugly
head now.
> by all means play with this. Try out different clang versions to use as
the header source
Here's what I get ({{{gcc13-libcxx +clang18}}} and {{{gcc12-libcxx
+clang17}}}):
{{{
$ g++-mp-13 -stdlib=libc++ -o t3 t3.cpp
In file included from
/opt/local/libexec/gcc13/libc++/include/c++/v1/new:364,
from
/opt/local/libexec/gcc13/libc++/include/c++/v1/__memory/construct_at.h:23,
from
/opt/local/libexec/gcc13/libc++/include/c++/v1/__memory/allocator_traits.h:14,
from
/opt/local/libexec/gcc13/libc++/include/c++/v1/__memory/allocation_guard.h:15,
from
/opt/local/libexec/gcc13/libc++/include/c++/v1/__memory/shared_ptr.h:24,
from
/opt/local/libexec/gcc13/libc++/include/c++/v1/__locale:15,
from
/opt/local/libexec/gcc13/libc++/include/c++/v1/ios:223,
from
/opt/local/libexec/gcc13/libc++/include/c++/v1/iostream:43,
from t3.cpp:1:
/opt/local/libexec/gcc13/libc++/include/c++/v1/cstdlib:146:9: error:
'at_quick_exit' has not been declared in '::'
146 | using ::at_quick_exit _LIBCPP_USING_IF_EXISTS;
| ^~~~~~~~~~~~~
/opt/local/libexec/gcc13/libc++/include/c++/v1/cstdlib:147:9: error:
'quick_exit' has not been declared in '::'
147 | using ::quick_exit _LIBCPP_USING_IF_EXISTS;
| ^~~~~~~~~~
$ g++-mp-12 -stdlib=libc++ -o t3 t3.cpp
In file included from
/opt/local/libexec/gcc12/libc++/include/c++/v1/new:99,
from
/opt/local/libexec/gcc12/libc++/include/c++/v1/__memory/construct_at.h:23,
from
/opt/local/libexec/gcc12/libc++/include/c++/v1/__memory/allocator_traits.h:14,
from
/opt/local/libexec/gcc12/libc++/include/c++/v1/__memory/allocation_guard.h:15,
from
/opt/local/libexec/gcc12/libc++/include/c++/v1/__memory/shared_ptr.h:22,
from
/opt/local/libexec/gcc12/libc++/include/c++/v1/__locale:15,
from
/opt/local/libexec/gcc12/libc++/include/c++/v1/ios:222,
from
/opt/local/libexec/gcc12/libc++/include/c++/v1/iostream:43,
from t3.cpp:1:
/opt/local/libexec/gcc12/libc++/include/c++/v1/cstdlib:144:9: error:
'at_quick_exit' has not been declared in '::'
144 | using ::at_quick_exit _LIBCPP_USING_IF_EXISTS;
| ^~~~~~~~~~~~~
/opt/local/libexec/gcc12/libc++/include/c++/v1/cstdlib:145:9: error:
'quick_exit' has not been declared in '::'
145 | using ::quick_exit _LIBCPP_USING_IF_EXISTS;
| ^~~~~~~~~~
$
}}}
Same problem you're observing. Any luck approaching it, BTW?
--
Ticket URL: <https://trac.macports.org/ticket/70341#comment:4>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list