[MacPorts] #70341: g++ fails to compile when -libstd=libc++ is set

MacPorts noreply at macports.org
Wed Jul 10 13:49:17 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):

 > hacking the headers like that was not the direction I was thinking of

 I understand. However, these two problems seem to be header-induced (or by
 the mechanism that mucks with the headers).

 The first one that I "knew" how to fix: the correct fix is the following -
 it was present in GCC12 originally, and then somehow got lost:
 {{{
 diff -uw /opt/local/libexec/gcc14/libc++/include/c++/v1/cstdlib.orig
 /opt/local/libexec/gcc14/libc++/include/c++/v1/cstdlib
 --- /opt/local/libexec/gcc14/libc++/include/c++/v1/cstdlib.orig 2024-07-09
 13:43:11
 +++ /opt/local/libexec/gcc14/libc++/include/c++/v1/cstdlib      2024-07-10
 09:41:58
 @@ -142,7 +142,7 @@
  using ::mbstowcs _LIBCPP_USING_IF_EXISTS;
  using ::wcstombs _LIBCPP_USING_IF_EXISTS;
  #endif
 -#if !defined(_LIBCPP_CXX03_LANG)
 +#if !defined(_LIBCPP_CXX03_LANG) && defined(_LIBCPP_HAS_QUICK_EXIT)
  using ::at_quick_exit _LIBCPP_USING_IF_EXISTS;
  using ::quick_exit _LIBCPP_USING_IF_EXISTS;
  #endif
 }}}

 The second problem, which I don't know how to fix, is about using a
 "built-in trait". Since I don't understand how that piece works, I don't
 think merely removing the {{{__remove_pointer<>}}} wrapper of the argument
 would be correct.

 Could you please get the above fix incorporated in the ports
 (gcc12-gcc13-gcc14)? And perhaps you could report the "error: use of
 built-in trait" to the upstream?

 Thanks!

-- 
Ticket URL: <https://trac.macports.org/ticket/70341#comment:10>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list