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

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

 Replying to [comment:10 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?

 For the headers, please note the files under
 `/opt/local/libexec/gcc14/libc++/include` have nothing to do with GCC.
 They are the copy of the headers from a particular clang version, as
 determined by the clang variant you used to install `gccN-libcxx`. So in
 that reqgard there is nothing there for me to fix (and no, I am not going
 to submit a bug report to LLVM/clang for this).

 Can you isolate which clang version the issue started with ?

 On the second point, no, I will not be the one chasing the built-in trait
 issue. I don't have the time (or interest) to do this. Please follow up
 yourself.

 >
 > Thanks!

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


More information about the macports-tickets mailing list