[MacPorts] #67773: mosh at 1.4.0: numerous C++ compilation errors on 10.5.8 PPC

MacPorts noreply at macports.org
Fri Jul 21 04:09:45 UTC 2023


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

Comment (by acjones8):

 Thanks for the tips! I didn't know about the disable silent rules option.
 I added the `--disable-silent-rules` flag and did `configure.args-append
 -faltivec` for cflags, cxxflags, and cppflags, but unfortunately none of
 them fixed the issue. Because of the disable-silent-rules flag, I can see
 that -faltivec is in the list of options passed to the compiler, so it
 doesn't seem like the build system is causing the issue.

 {{{
 /opt/local/bin/g++-mp-12 -std=gnu++11 -DHAVE_CONFIG_H -I.
 -I../../src/include  -I./../util -I/opt/local/libexec/openssl3/include
 -I/opt/local/include -faltivec -DGOOGLE_PROTOBUF_NO_THREADLOCAL -Wall
 -fno-strict-overflow -D_FORTIFY_SOURCE=2 -fstack-protector-all -Wstack-
 protector --param ssp-buffer-size=1 -fPIE -fno-default-inline -pipe  -pipe
 -Os -std=c++11 -faltivec -D_GLIBCXX_USE_CXX11_ABI=0 -arch ppc -MT
 ocb_internal.o -MD -MP -MF .deps/ocb_internal.Tpo -c -o ocb_internal.o
 ocb_internal.cc
 ocb_internal.cc:223:13: error: 'vector' does not name a type; did you mean
 'vec_or'?
   223 |     typedef vector unsigned block;
       |             ^~~~~~
       |             vec_or
 }}}

 I looked up other options in the GCC manual related to altivec support,
 and I found a `-maltivec` option. I gave it a try just in case, but it
 didn't work either. I wondered if maybe something's wrong in how GCC
 handles altivec support, so I wrote a very short test program that uses
 `vec_add()` to add two vector ints together and prints the result. I've
 never worked with SIMD before, but it gives the correct results even after
 I tweak the input numbers, and it recognized `#include <altivec.h>`
 without me needing to manually pass in `-faltivec`. Plus, if OpenSSL uses
 altivec to accelerate encryption as well, I've been able to compile that
 without issues.

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


More information about the macports-tickets mailing list