[MacPorts] #67773: mosh at 1.4.0: numerous C++ compilation errors on 10.5.8 PPC (when building with nonstandard gcc12 compiler)

MacPorts noreply at macports.org
Fri Jul 21 10:43:20 UTC 2023


#67773: mosh at 1.4.0: numerous C++ compilation errors on 10.5.8 PPC (when building
with nonstandard gcc12 compiler)
-----------------------+--------------------
  Reporter:  acjones8  |      Owner:  (none)
      Type:  defect    |     Status:  new
  Priority:  Normal    |  Milestone:
 Component:  ports     |    Version:
Resolution:            |   Keywords:  ppc
      Port:  mosh      |
-----------------------+--------------------

Comment (by acjones8):

 Wait, nevermind, I see the problem now. GCC 12's header disables the
 redefinition if it's running in a C++ environment, since vector is often
 short for std::vector. GCC 7's header never checked if it was running in
 C++ mode, it just unconditionally redefined vector to `__vector` on non-
 Apple systems, and seems to have expected the programmer to undefine it if
 need be.

 {{{
 #if !defined(__APPLE_ALTIVEC__)
 /* You are allowed to undef these for C++ compatibility.  */
 #define vector __vector
 #define pixel __pixel
 #define bool __bool
 #endif
 }}}

 So then, maybe an upstream patch is more appropriate? Maybe I can ask them
 to stick the vector to `__vector` definition in there, since it seems like
 this is what it's doing most of the time anyway.

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


More information about the macports-tickets mailing list