nimble-dev / nimble

The base NIMBLE package for R
http://R-nimble.org
BSD 3-Clause "New" or "Revised" License
156 stars 23 forks source link

Please update Eigen headers or at least disable Altivec for macOS until Eigen updated #1411

Open barracuda156 opened 8 months ago

barracuda156 commented 8 months ago

nimble uses an outdated version of Eigen headers, it seems, which misdetects VSX support in Altivec code, which breaks the build on macOS on PowerPC:

Building libnimble.a
/opt/local/bin/g++-mp-13 -std=gnu++17 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DR_NO_REMAP -I"../include"  -isystem/opt/local/include/LegacySupport -I/opt/local/include    -fPIC  -pipe -Os -arch ppc  -c nimDerivs_atomic_dyn_ind.cpp -o nimDerivs_atomic_dyn_ind.o
In file included from ../include/Eigen/src/Core/util/ConfigureVectorization.h:381,
                 from ../include/Eigen/Core:22,
                 from ../include/Eigen/Dense:1,
                 from ../include/nimble/EigenTypedefs.h:24,
                 from ../include/nimble/nimbleCppAD.h:38,
                 from ../include/nimble/nimDerivs_atomic_dyn_ind.h:6,
                 from nimDerivs_atomic_dyn_ind.cpp:1:
../include/Eigen/src/Core/arch/AltiVec/PacketMath.h: In function 'Packet Eigen::internal::pcmp_le(const Packet&, const Packet&) [with Packet = __vector(4) int]':
../include/Eigen/src/Core/arch/AltiVec/PacketMath.h:875:123: error: '__builtin_vsx_cmpge_4si' requires the '-mvsx' option
  875 | template<> EIGEN_STRONG_INLINE Packet4i pcmp_le(const Packet4i& a, const Packet4i& b) { return reinterpret_cast<Packet4i>(vec_cmple(a,b)); }
      |                                                                                                                           ^~~~~~~~~
../include/Eigen/src/Core/arch/AltiVec/PacketMath.h:875:123: note: overloaded builtin '__builtin_vec_cmpge' is implemented by builtin '__builtin_vsx_cmpge_4si'
../include/Eigen/src/Core/arch/AltiVec/PacketMath.h: In function 'Packet Eigen::internal::pcmp_le(const Packet&, const Packet&) [with Packet = __vector(8) short int]':
../include/Eigen/src/Core/arch/AltiVec/PacketMath.h:878:123: error: '__builtin_vsx_cmpge_8hi' requires the '-mvsx' option
  878 | template<> EIGEN_STRONG_INLINE Packet8s pcmp_le(const Packet8s& a, const Packet8s& b) { return reinterpret_cast<Packet8s>(vec_cmple(a,b)); }
      |                                                                                                                           ^~~~~~~~~
../include/Eigen/src/Core/arch/AltiVec/PacketMath.h:878:123: note: overloaded builtin '__builtin_vec_cmpge' is implemented by builtin '__builtin_vsx_cmpge_8hi'
../include/Eigen/src/Core/arch/AltiVec/PacketMath.h: In function 'Packet Eigen::internal::pcmp_le(const Packet&, const Packet&) [with Packet = __vector(8) short unsigned int]':
../include/Eigen/src/Core/arch/AltiVec/PacketMath.h:881:127: error: '__builtin_vsx_cmpge_u8hi' requires the '-mvsx' option
  881 | template<> EIGEN_STRONG_INLINE Packet8us pcmp_le(const Packet8us& a, const Packet8us& b) { return reinterpret_cast<Packet8us>(vec_cmple(a,b)); }
      |                                                                                                                               ^~~~~~~~~
../include/Eigen/src/Core/arch/AltiVec/PacketMath.h:881:127: note: overloaded builtin '__builtin_vec_cmpge' is implemented by builtin '__builtin_vsx_cmpge_u8hi'
../include/Eigen/src/Core/arch/AltiVec/PacketMath.h: In function 'Packet Eigen::internal::pcmp_le(const Packet&, const Packet&) [with Packet = __vector(16) signed char]':
../include/Eigen/src/Core/arch/AltiVec/PacketMath.h:884:127: error: '__builtin_vsx_cmpge_16qi' requires the '-mvsx' option
  884 | template<> EIGEN_STRONG_INLINE Packet16c pcmp_le(const Packet16c& a, const Packet16c& b) { return reinterpret_cast<Packet16c>(vec_cmple(a,b)); }
      |                                                                                                                               ^~~~~~~~~
../include/Eigen/src/Core/arch/AltiVec/PacketMath.h:884:127: note: overloaded builtin '__builtin_vec_cmpge' is implemented by builtin '__builtin_vsx_cmpge_16qi'
../include/Eigen/src/Core/arch/AltiVec/PacketMath.h: In function 'Packet Eigen::internal::pcmp_le(const Packet&, const Packet&) [with Packet = __vector(16) unsigned char]':
../include/Eigen/src/Core/arch/AltiVec/PacketMath.h:887:131: error: '__builtin_vsx_cmpge_u16qi' requires the '-mvsx' option
  887 | template<> EIGEN_STRONG_INLINE Packet16uc pcmp_le(const Packet16uc& a, const Packet16uc& b) { return reinterpret_cast<Packet16uc>(vec_cmple(a,b)); }
      |                                                                                                                                   ^~~~~~~~~
../include/Eigen/src/Core/arch/AltiVec/PacketMath.h:887:131: note: overloaded builtin '__builtin_vec_cmpge' is implemented by builtin '__builtin_vsx_cmpge_u16qi'
In file included from ../include/Eigen/Core:210:
../include/Eigen/src/Core/arch/AltiVec/PacketMath.h: In function 'Packet Eigen::internal::psqrt(const Packet&) [with Packet = eigen_packet_wrapper<__vector(8) short unsigned int, 0>]':
../include/Eigen/src/Core/arch/AltiVec/PacketMath.h:1302:24: error: '__builtin_vsx_xvsqrtsp' requires the '-mvsx' option
 1302 |   Packet4f op_even = OP(a_even);\
      |                        ^
../include/Eigen/src/Core/arch/AltiVec/PacketMath.h:1345:3: note: in expansion of macro 'BF16_TO_F32_UNARY_OP_WRAPPER'
 1345 |   BF16_TO_F32_UNARY_OP_WRAPPER(vec_sqrt, a);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/Eigen/src/Core/arch/AltiVec/PacketMath.h:1302:24: note: overloaded builtin '__builtin_vec_sqrt' is implemented by builtin '__builtin_vsx_xvsqrtsp'
 1302 |   Packet4f op_even = OP(a_even);\
      |                        ^
../include/Eigen/src/Core/arch/AltiVec/PacketMath.h:1345:3: note: in expansion of macro 'BF16_TO_F32_UNARY_OP_WRAPPER'
 1345 |   BF16_TO_F32_UNARY_OP_WRAPPER(vec_sqrt, a);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/Eigen/src/Core/arch/AltiVec/PacketMath.h:1303:23: error: '__builtin_vsx_xvsqrtsp' requires the '-mvsx' option
 1303 |   Packet4f op_odd = OP(a_odd);\
      |                       ^
../include/Eigen/src/Core/arch/AltiVec/PacketMath.h:1345:3: note: in expansion of macro 'BF16_TO_F32_UNARY_OP_WRAPPER'
 1345 |   BF16_TO_F32_UNARY_OP_WRAPPER(vec_sqrt, a);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/Eigen/src/Core/arch/AltiVec/PacketMath.h:1303:23: note: overloaded builtin '__builtin_vec_sqrt' is implemented by builtin '__builtin_vsx_xvsqrtsp'
 1303 |   Packet4f op_odd = OP(a_odd);\
      |                       ^
../include/Eigen/src/Core/arch/AltiVec/PacketMath.h:1345:3: note: in expansion of macro 'BF16_TO_F32_UNARY_OP_WRAPPER'
 1345 |   BF16_TO_F32_UNARY_OP_WRAPPER(vec_sqrt, a);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h:18,
                 from ../include/Eigen/Core:350:
../include/Eigen/src/Core/arch/AltiVec/MatrixProductCommon.h: At global scope:
../include/Eigen/src/Core/arch/AltiVec/MatrixProductCommon.h:192:41: error: 'Packet2d' was not declared in this scope; did you mean 'Packet8s'?
  192 | EIGEN_ALWAYS_INLINE void bcouple_common<Packet2d, Packet1cd>(PacketBlock<Packet2d,4>& taccReal, PacketBlock<Packet2d,4>& taccImag, PacketBlock<Packet1cd, 4>& acc1, PacketBlock<Packet1cd, 4>& acc2)
      |                                         ^~~~~~~~
      |                                         Packet8s
../include/Eigen/src/Core/arch/AltiVec/MatrixProductCommon.h:192:51: error: 'Packet1cd' was not declared in this scope; did you mean 'Packet2cf'?
  192 | EIGEN_ALWAYS_INLINE void bcouple_common<Packet2d, Packet1cd>(PacketBlock<Packet2d,4>& taccReal, PacketBlock<Packet2d,4>& taccImag, PacketBlock<Packet1cd, 4>& acc1, PacketBlock<Packet1cd, 4>& acc2)
      |                                                   ^~~~~~~~~
      |                                                   Packet2cf
../include/Eigen/src/Core/arch/AltiVec/MatrixProductCommon.h:192:74: error: 'Packet2d' was not declared in this scope; did you mean 'Packet8s'?
  192 | EIGEN_ALWAYS_INLINE void bcouple_common<Packet2d, Packet1cd>(PacketBlock<Packet2d,4>& taccReal, PacketBlock<Packet2d,4>& taccImag, PacketBlock<Packet1cd, 4>& acc1, PacketBlock<Packet1cd, 4>& acc2)
      |                                                                          ^~~~~~~~
      |                                                                          Packet8s
../include/Eigen/src/Core/arch/AltiVec/MatrixProductCommon.h:192:84: error: template argument 1 is invalid
  192 | EIGEN_ALWAYS_INLINE void bcouple_common<Packet2d, Packet1cd>(PacketBlock<Packet2d,4>& taccReal, PacketBlock<Packet2d,4>& taccImag, PacketBlock<Packet1cd, 4>& acc1, PacketBlock<Packet1cd, 4>& acc2)
      |                                                                                    ^
../include/Eigen/src/Core/arch/AltiVec/MatrixProductCommon.h:192:109: error: 'Packet2d' was not declared in this scope; did you mean 'Packet8s'?
  192 | EIGEN_ALWAYS_INLINE void bcouple_common<Packet2d, Packet1cd>(PacketBlock<Packet2d,4>& taccReal, PacketBlock<Packet2d,4>& taccImag, PacketBlock<Packet1cd, 4>& acc1, PacketBlock<Packet1cd, 4>& acc2)
      |                                                                                                             ^~~~~~~~
      |                                                                                                             Packet8s
../include/Eigen/src/Core/arch/AltiVec/MatrixProductCommon.h:192:119: error: template argument 1 is invalid
  192 | EIGEN_ALWAYS_INLINE void bcouple_common<Packet2d, Packet1cd>(PacketBlock<Packet2d,4>& taccReal, PacketBlock<Packet2d,4>& taccImag, PacketBlock<Packet1cd, 4>& acc1, PacketBlock<Packet1cd, 4>& acc2)
      |                                                                                                                       ^
../include/Eigen/src/Core/arch/AltiVec/MatrixProductCommon.h:192:144: error: 'Packet1cd' was not declared in this scope; did you mean 'Packet2cf'?
  192 | EIGEN_ALWAYS_INLINE void bcouple_common<Packet2d, Packet1cd>(PacketBlock<Packet2d,4>& taccReal, PacketBlock<Packet2d,4>& taccImag, PacketBlock<Packet1cd, 4>& acc1, PacketBlock<Packet1cd, 4>& acc2)
      |                                                                                                                                                ^~~~~~~~~
      |                                                                                                                                                Packet2cf
../include/Eigen/src/Core/arch/AltiVec/MatrixProductCommon.h:192:156: error: template argument 1 is invalid
  192 | EIGEN_ALWAYS_INLINE void bcouple_common<Packet2d, Packet1cd>(PacketBlock<Packet2d,4>& taccReal, PacketBlock<Packet2d,4>& taccImag, PacketBlock<Packet1cd, 4>& acc1, PacketBlock<Packet1cd, 4>& acc2)
      |                                                                                                                                                            ^
../include/Eigen/src/Core/arch/AltiVec/MatrixProductCommon.h:192:177: error: 'Packet1cd' was not declared in this scope; did you mean 'Packet2cf'?
  192 | EIGEN_ALWAYS_INLINE void bcouple_common<Packet2d, Packet1cd>(PacketBlock<Packet2d,4>& taccReal, PacketBlock<Packet2d,4>& taccImag, PacketBlock<Packet1cd, 4>& acc1, PacketBlock<Packet1cd, 4>& acc2)
      |                                                                                                                                                                                 ^~~~~~~~~
      |                                                                                                                                                                                 Packet2cf
../include/Eigen/src/Core/arch/AltiVec/MatrixProductCommon.h:192:189: error: template argument 1 is invalid
  192 | EIGEN_ALWAYS_INLINE void bcouple_common<Packet2d, Packet1cd>(PacketBlock<Packet2d,4>& taccReal, PacketBlock<Packet2d,4>& taccImag, PacketBlock<Packet1cd, 4>& acc1, PacketBlock<Packet1cd, 4>& acc2)
      |                                                                                                                                                                                             ^
../include/Eigen/src/Core/arch/AltiVec/MatrixProductCommon.h:192:26: error: template-id 'bcouple_common<<expression error>, <expression error> >' for 'void Eigen::internal::bcouple_common(int&, int&, int&, int&)' does not match any template declaration
  192 | EIGEN_ALWAYS_INLINE void bcouple_common<Packet2d, Packet1cd>(PacketBlock<Packet2d,4>& taccReal, PacketBlock<Packet2d,4>& taccImag, PacketBlock<Packet1cd, 4>& acc1, PacketBlock<Packet1cd, 4>& acc2)
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/Eigen/src/Core/arch/AltiVec/MatrixProductCommon.h:174:26: note: candidates are: 'template<class Packet, class Packetc> void Eigen::internal::bcouple_common(PacketBlock<Packet, 1>&, PacketBlock<Packet, 1>&, PacketBlock<Packetc, 1>&, PacketBlock<Packetc, 1>&)'
  174 | EIGEN_ALWAYS_INLINE void bcouple_common(PacketBlock<Packet,1>& taccReal, PacketBlock<Packet,1>& taccImag, PacketBlock<Packetc, 1>& acc1, PacketBlock<Packetc, 1>& acc2)
      |                          ^~~~~~~~~~~~~~
../include/Eigen/src/Core/arch/AltiVec/MatrixProductCommon.h:144:26: note:                 'template<class Packet, class Packetc> void Eigen::internal::bcouple_common(PacketBlock<T, 4>&, PacketBlock<T, 4>&, PacketBlock<Packet, 4>&, PacketBlock<Packet, 4>&)'
  144 | EIGEN_ALWAYS_INLINE void bcouple_common(PacketBlock<Packet,4>& taccReal, PacketBlock<Packet,4>& taccImag, PacketBlock<Packetc, 4>& acc1, PacketBlock<Packetc, 4>& acc2)
      |                          ^~~~~~~~~~~~~~
../include/Eigen/src/Core/arch/AltiVec/MatrixProductCommon.h:206:41: error: 'Packet2d' was not declared in this scope; did you mean 'Packet8s'?
  206 | EIGEN_ALWAYS_INLINE void bcouple_common<Packet2d, Packet1cd>(PacketBlock<Packet2d,1>& taccReal, PacketBlock<Packet2d,1>& taccImag, PacketBlock<Packet1cd, 1>& acc1, PacketBlock<Packet1cd, 1>& acc2)
      |                                         ^~~~~~~~
      |                                         Packet8s
../include/Eigen/src/Core/arch/AltiVec/MatrixProductCommon.h:206:51: error: 'Packet1cd' was not declared in this scope; did you mean 'Packet2cf'?
  206 | EIGEN_ALWAYS_INLINE void bcouple_common<Packet2d, Packet1cd>(PacketBlock<Packet2d,1>& taccReal, PacketBlock<Packet2d,1>& taccImag, PacketBlock<Packet1cd, 1>& acc1, PacketBlock<Packet1cd, 1>& acc2)
      |                                                   ^~~~~~~~~
      |                                                   Packet2cf
../include/Eigen/src/Core/arch/AltiVec/MatrixProductCommon.h:206:74: error: 'Packet2d' was not declared in this scope; did you mean 'Packet8s'?
  206 | EIGEN_ALWAYS_INLINE void bcouple_common<Packet2d, Packet1cd>(PacketBlock<Packet2d,1>& taccReal, PacketBlock<Packet2d,1>& taccImag, PacketBlock<Packet1cd, 1>& acc1, PacketBlock<Packet1cd, 1>& acc2)
      |                                                                          ^~~~~~~~
      |                                                                          Packet8s
../include/Eigen/src/Core/arch/AltiVec/MatrixProductCommon.h:206:84: error: template argument 1 is invalid
  206 | EIGEN_ALWAYS_INLINE void bcouple_common<Packet2d, Packet1cd>(PacketBlock<Packet2d,1>& taccReal, PacketBlock<Packet2d,1>& taccImag, PacketBlock<Packet1cd, 1>& acc1, PacketBlock<Packet1cd, 1>& acc2)
      |                                                                                    ^
../include/Eigen/src/Core/arch/AltiVec/MatrixProductCommon.h:206:109: error: 'Packet2d' was not declared in this scope; did you mean 'Packet8s'?
  206 | EIGEN_ALWAYS_INLINE void bcouple_common<Packet2d, Packet1cd>(PacketBlock<Packet2d,1>& taccReal, PacketBlock<Packet2d,1>& taccImag, PacketBlock<Packet1cd, 1>& acc1, PacketBlock<Packet1cd, 1>& acc2)
      |                                                                                                             ^~~~~~~~
      |                                                                                                             Packet8s
../include/Eigen/src/Core/arch/AltiVec/MatrixProductCommon.h:206:119: error: template argument 1 is invalid
  206 | EIGEN_ALWAYS_INLINE void bcouple_common<Packet2d, Packet1cd>(PacketBlock<Packet2d,1>& taccReal, PacketBlock<Packet2d,1>& taccImag, PacketBlock<Packet1cd, 1>& acc1, PacketBlock<Packet1cd, 1>& acc2)
      |                                                                                                                       ^
../include/Eigen/src/Core/arch/AltiVec/MatrixProductCommon.h:206:144: error: 'Packet1cd' was not declared in this scope; did you mean 'Packet2cf'?
  206 | EIGEN_ALWAYS_INLINE void bcouple_common<Packet2d, Packet1cd>(PacketBlock<Packet2d,1>& taccReal, PacketBlock<Packet2d,1>& taccImag, PacketBlock<Packet1cd, 1>& acc1, PacketBlock<Packet1cd, 1>& acc2)
      |                                                                                                                                                ^~~~~~~~~
      |                                                                                                                                                Packet2cf
../include/Eigen/src/Core/arch/AltiVec/MatrixProductCommon.h:206:156: error: template argument 1 is invalid
  206 | EIGEN_ALWAYS_INLINE void bcouple_common<Packet2d, Packet1cd>(PacketBlock<Packet2d,1>& taccReal, PacketBlock<Packet2d,1>& taccImag, PacketBlock<Packet1cd, 1>& acc1, PacketBlock<Packet1cd, 1>& acc2)
      |                                                                                                                                                            ^
../include/Eigen/src/Core/arch/AltiVec/MatrixProductCommon.h:206:177: error: 'Packet1cd' was not declared in this scope; did you mean 'Packet2cf'?
  206 | EIGEN_ALWAYS_INLINE void bcouple_common<Packet2d, Packet1cd>(PacketBlock<Packet2d,1>& taccReal, PacketBlock<Packet2d,1>& taccImag, PacketBlock<Packet1cd, 1>& acc1, PacketBlock<Packet1cd, 1>& acc2)
      |                                                                                                                                                                                 ^~~~~~~~~
      |                                                                                                                                                                                 Packet2cf
../include/Eigen/src/Core/arch/AltiVec/MatrixProductCommon.h:206:189: error: template argument 1 is invalid
  206 | EIGEN_ALWAYS_INLINE void bcouple_common<Packet2d, Packet1cd>(PacketBlock<Packet2d,1>& taccReal, PacketBlock<Packet2d,1>& taccImag, PacketBlock<Packet1cd, 1>& acc1, PacketBlock<Packet1cd, 1>& acc2)
      |                                                                                                                                                                                             ^
../include/Eigen/src/Core/arch/AltiVec/MatrixProductCommon.h:206:26: error: template-id 'bcouple_common<<expression error>, <expression error> >' for 'void Eigen::internal::bcouple_common(int&, int&, int&, int&)' does not match any template declaration
  206 | EIGEN_ALWAYS_INLINE void bcouple_common<Packet2d, Packet1cd>(PacketBlock<Packet2d,1>& taccReal, PacketBlock<Packet2d,1>& taccImag, PacketBlock<Packet1cd, 1>& acc1, PacketBlock<Packet1cd, 1>& acc2)
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/Eigen/src/Core/arch/AltiVec/MatrixProductCommon.h:174:26: note: candidates are: 'template<class Packet, class Packetc> void Eigen::internal::bcouple_common(PacketBlock<Packet, 1>&, PacketBlock<Packet, 1>&, PacketBlock<Packetc, 1>&, PacketBlock<Packetc, 1>&)'
  174 | EIGEN_ALWAYS_INLINE void bcouple_common(PacketBlock<Packet,1>& taccReal, PacketBlock<Packet,1>& taccImag, PacketBlock<Packetc, 1>& acc1, PacketBlock<Packetc, 1>& acc2)
      |                          ^~~~~~~~~~~~~~
../include/Eigen/src/Core/arch/AltiVec/MatrixProductCommon.h:144:26: note:                 'template<class Packet, class Packetc> void Eigen::internal::bcouple_common(PacketBlock<T, 4>&, PacketBlock<T, 4>&, PacketBlock<Packet, 4>&, PacketBlock<Packet, 4>&)'
  144 | EIGEN_ALWAYS_INLINE void bcouple_common(PacketBlock<Packet,4>& taccReal, PacketBlock<Packet,4>& taccImag, PacketBlock<Packetc, 4>& acc1, PacketBlock<Packetc, 4>& acc2)
      |                          ^~~~~~~~~~~~~~
In file included from ../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h:38:
../include/Eigen/src/Core/arch/AltiVec/MatrixProductMMA.h:79:72: error: 'Packet2d' was not declared in this scope; did you mean 'Packet8s'?
   79 | EIGEN_ALWAYS_INLINE void pgerMMA(__vector_quad* acc, const PacketBlock<Packet2d,2>& a, const Packet2d& b)
      |                                                                        ^~~~~~~~
      |                                                                        Packet8s
../include/Eigen/src/Core/arch/AltiVec/MatrixProductMMA.h:79:82: error: template argument 1 is invalid
   79 | EIGEN_ALWAYS_INLINE void pgerMMA(__vector_quad* acc, const PacketBlock<Packet2d,2>& a, const Packet2d& b)
      |                                                                                  ^
../include/Eigen/src/Core/arch/AltiVec/MatrixProductMMA.h:79:94: error: 'Packet2d' does not name a type; did you mean 'Packet8s'?
   79 | EIGEN_ALWAYS_INLINE void pgerMMA(__vector_quad* acc, const PacketBlock<Packet2d,2>& a, const Packet2d& b)
      |                                                                                              ^~~~~~~~
      |                                                                                              Packet8s
../include/Eigen/src/Core/arch/AltiVec/MatrixProductMMA.h: In function 'void Eigen::internal::pgerMMA(__vector_quad*, const int&, const int&)':
../include/Eigen/src/Core/arch/AltiVec/MatrixProductMMA.h:81:44: error: request for member 'packet' in 'a', which is of non-class type 'const int'
   81 |   __vector_pair* a0 = (__vector_pair *)(&a.packet[0]);
      |                                            ^~~~~~
../include/Eigen/src/Core/arch/AltiVec/MatrixProductMMA.h: At global scope:
../include/Eigen/src/Core/arch/AltiVec/MatrixProductMMA.h:91:84: error: 'Packet2d' does not name a type; did you mean 'Packet8s'?
   91 | EIGEN_ALWAYS_INLINE void pgerMMA(__vector_quad* acc, const __vector_pair& a, const Packet2d& b)
      |                                                                                    ^~~~~~~~
      |                                                                                    Packet8s
../include/Eigen/src/Core/arch/AltiVec/MatrixProductMMA.h:132:58: error: 'Packet2d' was not declared in this scope; did you mean 'Packet8s'?
  132 | EIGEN_ALWAYS_INLINE void ploadRhsMMA<double, PacketBlock<Packet2d, 2> >(const double* rhs, PacketBlock<Packet2d, 2>& rhsV)
      |                                                          ^~~~~~~~
      |                                                          Packet8s
../include/Eigen/src/Core/arch/AltiVec/MatrixProductMMA.h:132:69: error: template argument 1 is invalid
  132 | EIGEN_ALWAYS_INLINE void ploadRhsMMA<double, PacketBlock<Packet2d, 2> >(const double* rhs, PacketBlock<Packet2d, 2>& rhsV)
      |                                                                     ^
../include/Eigen/src/Core/arch/AltiVec/MatrixProductMMA.h:132:104: error: 'Packet2d' was not declared in this scope; did you mean 'Packet8s'?
  132 | EIGEN_ALWAYS_INLINE void ploadRhsMMA<double, PacketBlock<Packet2d, 2> >(const double* rhs, PacketBlock<Packet2d, 2>& rhsV)
      |                                                                                                        ^~~~~~~~
      |                                                                                                        Packet8s
../include/Eigen/src/Core/arch/AltiVec/MatrixProductMMA.h:132:115: error: template argument 1 is invalid
  132 | EIGEN_ALWAYS_INLINE void ploadRhsMMA<double, PacketBlock<Packet2d, 2> >(const double* rhs, PacketBlock<Packet2d, 2>& rhsV)
      |                                                                                                                   ^
../include/Eigen/src/Core/arch/AltiVec/MatrixProductMMA.h:132:26: error: template-id 'ploadRhsMMA<double, <expression error> >' for 'void Eigen::internal::ploadRhsMMA(const double*, int&)' does not match any template declaration
  132 | EIGEN_ALWAYS_INLINE void ploadRhsMMA<double, PacketBlock<Packet2d, 2> >(const double* rhs, PacketBlock<Packet2d, 2>& rhsV)
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/Eigen/src/Core/arch/AltiVec/MatrixProductMMA.h:126:26: note: candidate is: 'template<class Scalar, class Packet> void Eigen::internal::ploadRhsMMA(const Scalar*, Packet&)'
  126 | EIGEN_ALWAYS_INLINE void ploadRhsMMA(const Scalar* rhs, Packet& rhsV)
      |                          ^~~~~~~~~~~
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h:70:11: error: 'Packet2d' does not name a type; did you mean 'Packet8s'?
   70 |   typedef Packet2d                        vectortype;
      |           ^~~~~~~~
      |           Packet8s
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h:71:23: error: 'vectortype' was not declared in this scope
   71 |   typedef PacketBlock<vectortype,4>             type;
      |                       ^~~~~~~~~~
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h:71:35: error: template argument 1 is invalid
   71 |   typedef PacketBlock<vectortype,4>             type;
      |                                   ^
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h:72:23: error: 'Packet2d' was not declared in this scope; did you mean 'Packet8s'?
   72 |   typedef PacketBlock<Packet2d,2>            rhstype;
      |                       ^~~~~~~~
      |                       Packet8s
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h:72:33: error: template argument 1 is invalid
   72 |   typedef PacketBlock<Packet2d,2>            rhstype;
      |                                 ^
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h:656:44: error: 'Packet2d' was not declared in this scope; did you mean 'Packet8s'?
  656 | struct dhs_pack<double, Index, DataMapper, Packet2d, StorageOrder, PanelMode, true>
      |                                            ^~~~~~~~
      |                                            Packet8s
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h:656:83: error: template argument 4 is invalid
  656 | struct dhs_pack<double, Index, DataMapper, Packet2d, StorageOrder, PanelMode, true>
      |                                                                                   ^
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h:723:44: error: 'Packet2d' was not declared in this scope; did you mean 'Packet8s'?
  723 | struct dhs_pack<double, Index, DataMapper, Packet2d, StorageOrder, PanelMode, false>
      |                                            ^~~~~~~~
      |                                            Packet8s
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h:723:84: error: template argument 4 is invalid
  723 | struct dhs_pack<double, Index, DataMapper, Packet2d, StorageOrder, PanelMode, false>
      |                                                                                    ^
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h:1250:14: error: 'Packet2l' does not name a type; did you mean 'Packet8s'?
 1250 | const static Packet2l mask21 = { -1, 0 };
      |              ^~~~~~~~
      |              Packet8s
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h:1267:21: error: 'Packet2d' does not name a type; did you mean 'Packet8s'?
 1267 | EIGEN_ALWAYS_INLINE Packet2d bmask<Packet2d>(const int remaining_rows)
      |                     ^~~~~~~~
      |                     Packet8s
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h:1291:42: error: 'Packet2d' was not declared in this scope; did you mean 'Packet8s'?
 1291 | EIGEN_ALWAYS_INLINE void pbroadcast4_old<Packet2d>(const double* a, Packet2d& a0, Packet2d& a1, Packet2d& a2, Packet2d& a3)
      |                                          ^~~~~~~~
      |                                          Packet8s
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h:1291:69: error: 'Packet2d' has not been declared
 1291 | EIGEN_ALWAYS_INLINE void pbroadcast4_old<Packet2d>(const double* a, Packet2d& a0, Packet2d& a1, Packet2d& a2, Packet2d& a3)
      |                                                                     ^~~~~~~~
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h:1291:83: error: 'Packet2d' has not been declared
 1291 | EIGEN_ALWAYS_INLINE void pbroadcast4_old<Packet2d>(const double* a, Packet2d& a0, Packet2d& a1, Packet2d& a2, Packet2d& a3)
      |                                                                                   ^~~~~~~~
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h:1291:97: error: 'Packet2d' has not been declared
 1291 | EIGEN_ALWAYS_INLINE void pbroadcast4_old<Packet2d>(const double* a, Packet2d& a0, Packet2d& a1, Packet2d& a2, Packet2d& a3)
      |                                                                                                 ^~~~~~~~
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h:1291:111: error: 'Packet2d' has not been declared
 1291 | EIGEN_ALWAYS_INLINE void pbroadcast4_old<Packet2d>(const double* a, Packet2d& a0, Packet2d& a1, Packet2d& a2, Packet2d& a3)
      |                                                                                                               ^~~~~~~~
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h:1291:26: error: template-id 'pbroadcast4_old<<expression error> >' for 'void Eigen::internal::pbroadcast4_old(const double*, int&, int&, int&, int&)' does not match any template declaration
 1291 | EIGEN_ALWAYS_INLINE void pbroadcast4_old<Packet2d>(const double* a, Packet2d& a0, Packet2d& a1, Packet2d& a2, Packet2d& a3)
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h:1285:26: note: candidate is: 'template<class Packet> void Eigen::internal::pbroadcast4_old(const typename unpacket_traits<T>::type*, Packet&, Packet&, Packet&, Packet&)'
 1285 | EIGEN_ALWAYS_INLINE void pbroadcast4_old(const __UNPACK_TYPE__(Packet)* a, Packet& a0, Packet& a1, Packet& a2, Packet& a3)
      |                          ^~~~~~~~~~~~~~~
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h: In member function 'void Eigen::internal::gemm_pack_lhs<double, Index, DataMapper, Pack1, Pack2, Packet, 0, Conjugate, PanelMode>::operator()(double*, const DataMapper&, Index, Index, Index, Index)':
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h:2412:41: error: 'Packet2d' was not declared in this scope; did you mean 'Packet'?
 2412 |     dhs_pack<double, Index, DataMapper, Packet2d, ColMajor, PanelMode, true> pack;
      |                                         ^~~~~~~~
      |                                         Packet
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h:2412:76: error: template argument 4 is invalid
 2412 |     dhs_pack<double, Index, DataMapper, Packet2d, ColMajor, PanelMode, true> pack;
      |                                                                            ^
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h: In member function 'void Eigen::internal::gemm_pack_lhs<double, Index, DataMapper, Pack1, Pack2, Packet, 1, Conjugate, PanelMode>::operator()(double*, const DataMapper&, Index, Index, Index, Index)':
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h:2426:41: error: 'Packet2d' was not declared in this scope; did you mean 'Packet'?
 2426 |     dhs_pack<double, Index, DataMapper, Packet2d, RowMajor, PanelMode, true> pack;
      |                                         ^~~~~~~~
      |                                         Packet
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h:2426:76: error: template argument 4 is invalid
 2426 |     dhs_pack<double, Index, DataMapper, Packet2d, RowMajor, PanelMode, true> pack;
      |                                                                            ^
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h: In member function 'void Eigen::internal::gemm_pack_rhs<double, Index, DataMapper, nr, 0, Conjugate, PanelMode>::operator()(double*, const DataMapper&, Index, Index, Index, Index)':
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h:2441:39: error: 'Packet2d' was not declared in this scope; did you mean 'Packet8s'?
 2441 |   dhs_pack<double, Index, DataMapper, Packet2d, ColMajor, PanelMode, false> pack;
      |                                       ^~~~~~~~
      |                                       Packet8s
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h:2441:75: error: template argument 4 is invalid
 2441 |   dhs_pack<double, Index, DataMapper, Packet2d, ColMajor, PanelMode, false> pack;
      |                                                                           ^
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h: In member function 'void Eigen::internal::gemm_pack_rhs<double, Index, DataMapper, nr, 1, Conjugate, PanelMode>::operator()(double*, const DataMapper&, Index, Index, Index, Index)':
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h:2455:39: error: 'Packet2d' was not declared in this scope; did you mean 'Packet8s'?
 2455 |   dhs_pack<double, Index, DataMapper, Packet2d, RowMajor, PanelMode, false> pack;
      |                                       ^~~~~~~~
      |                                       Packet8s
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h:2455:75: error: template argument 4 is invalid
 2455 |   dhs_pack<double, Index, DataMapper, Packet2d, RowMajor, PanelMode, false> pack;
      |                                                                           ^
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h: In member function 'void Eigen::internal::gemm_pack_lhs<std::complex<double>, Index, DataMapper, Pack1, Pack2, Packet, 1, Conjugate, PanelMode>::operator()(std::complex<double>*, const DataMapper&, Index, Index, Index, Index)':
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h:2584:40: error: 'Packet2d' was not declared in this scope; did you mean 'Packet'?
 2584 |   dhs_cpack<double, Index, DataMapper, Packet2d, Packet1cd, RowMajor, Conjugate, PanelMode, true> pack;
      |                                        ^~~~~~~~
      |                                        Packet
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h:2584:50: error: 'Packet1cd' was not declared in this scope; did you mean 'Packet2cf'?
 2584 |   dhs_cpack<double, Index, DataMapper, Packet2d, Packet1cd, RowMajor, Conjugate, PanelMode, true> pack;
      |                                                  ^~~~~~~~~
      |                                                  Packet2cf
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h:2584:97: error: template argument 4 is invalid
 2584 |   dhs_cpack<double, Index, DataMapper, Packet2d, Packet1cd, RowMajor, Conjugate, PanelMode, true> pack;
      |                                                                                                 ^
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h:2584:97: error: template argument 5 is invalid
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h: In member function 'void Eigen::internal::gemm_pack_lhs<std::complex<double>, Index, DataMapper, Pack1, Pack2, Packet, 0, Conjugate, PanelMode>::operator()(std::complex<double>*, const DataMapper&, Index, Index, Index, Index)':
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h:2598:40: error: 'Packet2d' was not declared in this scope; did you mean 'Packet'?
 2598 |   dhs_cpack<double, Index, DataMapper, Packet2d, Packet1cd, ColMajor, Conjugate, PanelMode, true> pack;
      |                                        ^~~~~~~~
      |                                        Packet
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h:2598:50: error: 'Packet1cd' was not declared in this scope; did you mean 'Packet2cf'?
 2598 |   dhs_cpack<double, Index, DataMapper, Packet2d, Packet1cd, ColMajor, Conjugate, PanelMode, true> pack;
      |                                                  ^~~~~~~~~
      |                                                  Packet2cf
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h:2598:97: error: template argument 4 is invalid
 2598 |   dhs_cpack<double, Index, DataMapper, Packet2d, Packet1cd, ColMajor, Conjugate, PanelMode, true> pack;
      |                                                                                                 ^
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h:2598:97: error: template argument 5 is invalid
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h: In member function 'void Eigen::internal::gemm_pack_rhs<std::complex<double>, Index, DataMapper, nr, 0, Conjugate, PanelMode>::operator()(std::complex<double>*, const DataMapper&, Index, Index, Index, Index)':
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h:2612:40: error: 'Packet2d' was not declared in this scope; did you mean 'Packet8s'?
 2612 |   dhs_cpack<double, Index, DataMapper, Packet2d, Packet1cd, ColMajor, Conjugate, PanelMode, false> pack;
      |                                        ^~~~~~~~
      |                                        Packet8s
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h:2612:50: error: 'Packet1cd' was not declared in this scope; did you mean 'Packet2cf'?
 2612 |   dhs_cpack<double, Index, DataMapper, Packet2d, Packet1cd, ColMajor, Conjugate, PanelMode, false> pack;
      |                                                  ^~~~~~~~~
      |                                                  Packet2cf
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h:2612:98: error: template argument 4 is invalid
 2612 |   dhs_cpack<double, Index, DataMapper, Packet2d, Packet1cd, ColMajor, Conjugate, PanelMode, false> pack;
      |                                                                                                  ^
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h:2612:98: error: template argument 5 is invalid
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h: In member function 'void Eigen::internal::gemm_pack_rhs<std::complex<double>, Index, DataMapper, nr, 1, Conjugate, PanelMode>::operator()(std::complex<double>*, const DataMapper&, Index, Index, Index, Index)':
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h:2626:40: error: 'Packet2d' was not declared in this scope; did you mean 'Packet8s'?
 2626 |   dhs_cpack<double, Index, DataMapper, Packet2d, Packet1cd, RowMajor, Conjugate, PanelMode, false> pack;
      |                                        ^~~~~~~~
      |                                        Packet8s
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h:2626:50: error: 'Packet1cd' was not declared in this scope; did you mean 'Packet2cf'?
 2626 |   dhs_cpack<double, Index, DataMapper, Packet2d, Packet1cd, RowMajor, Conjugate, PanelMode, false> pack;
      |                                                  ^~~~~~~~~
      |                                                  Packet2cf
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h:2626:98: error: template argument 4 is invalid
 2626 |   dhs_cpack<double, Index, DataMapper, Packet2d, Packet1cd, RowMajor, Conjugate, PanelMode, false> pack;
      |                                                                                                  ^
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h:2626:98: error: template argument 5 is invalid
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h: At global scope:
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h:2786:41: error: 'vectortype' in 'struct Eigen::internal::quad_traits<double>' does not name a type
 2786 |   typedef typename quad_traits<double>::vectortype  Packet;
      |                                         ^~~~~~~~~~
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h:2823:32: error: 'vectortype' in 'struct Eigen::internal::quad_traits<double>' does not name a type
 2823 |   typedef quad_traits<double>::vectortype   Packet;
      |                                ^~~~~~~~~~
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h:2824:11: error: 'Packet1cd' does not name a type; did you mean 'Packet2cf'?
 2824 |   typedef Packet1cd  Packetc;
      |           ^~~~~~~~~
      |           Packet2cf
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h: In member function 'void Eigen::internal::gebp_kernel<std::complex<double>, std::complex<double>, Index, DataMapper, mr, nr, ConjugateLhs, ConjugateRhs>::operator()(const DataMapper&, const std::complex<double>*, const std::complex<double>*, Index, Index, Index, std::complex<double>, Index, Index, Index, Index)':
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h:2847:141: error: 'Packet' was not declared in this scope; did you mean 'Packet8s'?
 2847 |          gemm_function = &Eigen::internal::gemm_complexMMA<std::complex<double>, std::complex<double>, std::complex<double>, double, Index, Packet, Packetc, RhsPacket, DataMapper, accRows, accCols, ConjugateLhs, ConjugateRhs, false, false>;
      |                                                                                                                                             ^~~~~~
      |                                                                                                                                             Packet8s
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h:2847:149: error: 'Packetc' was not declared in this scope; did you mean 'Packet8s'?
 2847 |          gemm_function = &Eigen::internal::gemm_complexMMA<std::complex<double>, std::complex<double>, std::complex<double>, double, Index, Packet, Packetc, RhsPacket, DataMapper, accRows, accCols, ConjugateLhs, ConjugateRhs, false, false>;
      |                                                                                                                                                     ^~~~~~~
      |                                                                                                                                                     Packet8s
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h:2850:138: error: 'Packet' was not declared in this scope; did you mean 'Packet8s'?
 2850 |          gemm_function = &Eigen::internal::gemm_complex<std::complex<double>, std::complex<double>, std::complex<double>, double, Index, Packet, Packetc, RhsPacket, DataMapper, accRows, accCols, ConjugateLhs, ConjugateRhs, false, false>;
      |                                                                                                                                          ^~~~~~
      |                                                                                                                                          Packet8s
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h:2850:146: error: 'Packetc' was not declared in this scope; did you mean 'Packet8s'?
 2850 |          gemm_function = &Eigen::internal::gemm_complex<std::complex<double>, std::complex<double>, std::complex<double>, double, Index, Packet, Packetc, RhsPacket, DataMapper, accRows, accCols, ConjugateLhs, ConjugateRhs, false, false>;
      |                                                                                                                                                  ^~~~~~~
      |                                                                                                                                                  Packet8s
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h: At global scope:
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h:2861:32: error: 'vectortype' in 'struct Eigen::internal::quad_traits<double>' does not name a type
 2861 |   typedef quad_traits<double>::vectortype   Packet;
      |                                ^~~~~~~~~~
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h:2862:11: error: 'Packet1cd' does not name a type; did you mean 'Packet2cf'?
 2862 |   typedef Packet1cd  Packetc;
      |           ^~~~~~~~~
      |           Packet2cf
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h: In member function 'void Eigen::internal::gebp_kernel<std::complex<double>, double, Index, DataMapper, mr, nr, ConjugateLhs, ConjugateRhs>::operator()(const DataMapper&, const std::complex<double>*, const double*, Index, Index, Index, std::complex<double>, Index, Index, Index, Index)':
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h:2885:127: error: 'Packet' was not declared in this scope; did you mean 'Packet8s'?
 2885 |          gemm_function = &Eigen::internal::gemm_complexMMA<std::complex<double>, double, std::complex<double>, double, Index, Packet, Packetc, RhsPacket, DataMapper, accRows, accCols, ConjugateLhs, ConjugateRhs, false, true>;
      |                                                                                                                               ^~~~~~
      |                                                                                                                               Packet8s
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h:2885:135: error: 'Packetc' was not declared in this scope; did you mean 'Packet8s'?
 2885 |          gemm_function = &Eigen::internal::gemm_complexMMA<std::complex<double>, double, std::complex<double>, double, Index, Packet, Packetc, RhsPacket, DataMapper, accRows, accCols, ConjugateLhs, ConjugateRhs, false, true>;
      |                                                                                                                                       ^~~~~~~
      |                                                                                                                                       Packet8s
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h:2888:124: error: 'Packet' was not declared in this scope; did you mean 'Packet8s'?
 2888 |          gemm_function = &Eigen::internal::gemm_complex<std::complex<double>, double, std::complex<double>, double, Index, Packet, Packetc, RhsPacket, DataMapper, accRows, accCols, ConjugateLhs, ConjugateRhs, false, true>;
      |                                                                                                                            ^~~~~~
      |                                                                                                                            Packet8s
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h:2888:132: error: 'Packetc' was not declared in this scope; did you mean 'Packet8s'?
 2888 |          gemm_function = &Eigen::internal::gemm_complex<std::complex<double>, double, std::complex<double>, double, Index, Packet, Packetc, RhsPacket, DataMapper, accRows, accCols, ConjugateLhs, ConjugateRhs, false, true>;
      |                                                                                                                                    ^~~~~~~
      |                                                                                                                                    Packet8s
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h: At global scope:
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h:2899:32: error: 'vectortype' in 'struct Eigen::internal::quad_traits<double>' does not name a type
 2899 |   typedef quad_traits<double>::vectortype   Packet;
      |                                ^~~~~~~~~~
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h:2900:11: error: 'Packet1cd' does not name a type; did you mean 'Packet2cf'?
 2900 |   typedef Packet1cd  Packetc;
      |           ^~~~~~~~~
      |           Packet2cf
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h: In member function 'void Eigen::internal::gebp_kernel<double, std::complex<double>, Index, DataMapper, mr, nr, ConjugateLhs, ConjugateRhs>::operator()(const DataMapper&, const double*, const std::complex<double>*, Index, Index, Index, std::complex<double>, Index, Index, Index, Index)':
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h:2923:127: error: 'Packet' was not declared in this scope; did you mean 'Packet8s'?
 2923 |          gemm_function = &Eigen::internal::gemm_complexMMA<double, std::complex<double>, std::complex<double>, double, Index, Packet, Packetc, RhsPacket, DataMapper, accRows, accCols, ConjugateLhs, ConjugateRhs, true, false>;
      |                                                                                                                               ^~~~~~
      |                                                                                                                               Packet8s
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h:2923:135: error: 'Packetc' was not declared in this scope; did you mean 'Packet8s'?
 2923 |          gemm_function = &Eigen::internal::gemm_complexMMA<double, std::complex<double>, std::complex<double>, double, Index, Packet, Packetc, RhsPacket, DataMapper, accRows, accCols, ConjugateLhs, ConjugateRhs, true, false>;
      |                                                                                                                                       ^~~~~~~
      |                                                                                                                                       Packet8s
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h:2926:124: error: 'Packet' was not declared in this scope; did you mean 'Packet8s'?
 2926 |          gemm_function = &Eigen::internal::gemm_complex<double, std::complex<double>, std::complex<double>, double, Index, Packet, Packetc, RhsPacket, DataMapper, accRows, accCols, ConjugateLhs, ConjugateRhs, true, false>;
      |                                                                                                                            ^~~~~~
      |                                                                                                                            Packet8s
../include/Eigen/src/Core/arch/AltiVec/MatrixProduct.h:2926:132: error: 'Packetc' was not declared in this scope; did you mean 'Packet8s'?
 2926 |          gemm_function = &Eigen::internal::gemm_complex<double, std::complex<double>, std::complex<double>, double, Index, Packet, Packetc, RhsPacket, DataMapper, accRows, accCols, ConjugateLhs, ConjugateRhs, true, false>;
      |                                                                                                                                    ^~~~~~~
      |                                                                                                                                    Packet8s
In file included from ../include/Eigen/Core:171:
../include/Eigen/src/Core/MathFunctions.h: In instantiation of 'static Scalar Eigen::internal::sqrt_impl<Scalar>::run(const Scalar&) [with Scalar = __vector(4) float]':
../include/Eigen/src/Core/MathFunctions.h:1467:48:   required from 'typename Eigen::internal::sqrt_retval<typename Eigen::internal::global_math_functions_filtering_base<Scalar>::type>::type Eigen::numext::sqrt(const Scalar&) [with Scalar = __vector(4) float; typename Eigen::internal::sqrt_retval<typename Eigen::internal::global_math_functions_filtering_base<Scalar>::type>::type = __vector(4) float; typename Eigen::internal::global_math_functions_filtering_base<Scalar>::type = __vector(4) float]'
../include/Eigen/src/Core/GenericPacketMath.h:815:52:   required from 'Packet Eigen::internal::psqrt(const Packet&) [with Packet = __vector(4) float]'
../include/Eigen/src/Core/GenericPacketMath.h:821:46:   required from 'Packet Eigen::internal::prsqrt(const Packet&) [with Packet = __vector(4) float]'
../include/Eigen/src/Core/arch/AltiVec/PacketMath.h:1348:3:   required from here
../include/Eigen/src/Core/MathFunctions.h:327:16: error: no matching function for call to 'sqrt(const __vector(4) float&)'
  327 |     return sqrt(x);
      |            ~~~~^~~
In file included from ../include/cppad/core/base_complex.hpp:16,
                 from ../include/cppad/base_require.hpp:172,
                 from ../include/cppad/cppad.hpp:22,
                 from ../include/nimble/nimDerivs_atomic_dyn_ind.h:4:
/opt/local/include/gcc13/c++/complex:1190:5: note: candidate: 'template<class _Tp> std::complex<_Tp> std::sqrt(const complex<_Tp>&)'
 1190 |     sqrt(const complex<_Tp>& __z) { return __complex_sqrt(__z.__rep()); }
      |     ^~~~
/opt/local/include/gcc13/c++/complex:1190:5: note:   template argument deduction/substitution failed:
../include/Eigen/src/Core/MathFunctions.h:327:16: note:   mismatched types 'const std::complex<_Tp>' and 'const __vector(4) float'
  327 |     return sqrt(x);
      |            ~~~~^~~
In file included from /opt/local/include/LegacySupport/cmath:54,
                 from ../include/cppad/core/base_std_math.hpp:147,
                 from ../include/cppad/base_require.hpp:160:
/opt/local/include/gcc13/c++/cmath:450:5: note: candidate: 'template<class _Tp> constexpr typename __gnu_cxx::__enable_if<std::__is_integer<_Tp>::__value, double>::__type std::sqrt(_Tp)'
  450 |     sqrt(_Tp __x)
      |     ^~~~
/opt/local/include/gcc13/c++/cmath:450:5: note:   template argument deduction/substitution failed:
/opt/local/include/gcc13/c++/cmath: In substitution of 'template<class _Tp> constexpr typename __gnu_cxx::__enable_if<std::__is_integer<_Tp>::__value, double>::__type std::sqrt(_Tp) [with _Tp = __vector(4) float]':
../include/Eigen/src/Core/MathFunctions.h:327:16:   required from 'static Scalar Eigen::internal::sqrt_impl<Scalar>::run(const Scalar&) [with Scalar = __vector(4) float]'
../include/Eigen/src/Core/MathFunctions.h:1467:48:   required from 'typename Eigen::internal::sqrt_retval<typename Eigen::internal::global_math_functions_filtering_base<Scalar>::type>::type Eigen::numext::sqrt(const Scalar&) [with Scalar = __vector(4) float; typename Eigen::internal::sqrt_retval<typename Eigen::internal::global_math_functions_filtering_base<Scalar>::type>::type = __vector(4) float; typename Eigen::internal::global_math_functions_filtering_base<Scalar>::type = __vector(4) float]'
../include/Eigen/src/Core/GenericPacketMath.h:815:52:   required from 'Packet Eigen::internal::psqrt(const Packet&) [with Packet = __vector(4) float]'
../include/Eigen/src/Core/GenericPacketMath.h:821:46:   required from 'Packet Eigen::internal::prsqrt(const Packet&) [with Packet = __vector(4) float]'
../include/Eigen/src/Core/arch/AltiVec/PacketMath.h:1348:3:   required from here
/opt/local/include/gcc13/c++/cmath:450:5: error: no type named '__type' in 'struct __gnu_cxx::__enable_if<false, double>'
../include/Eigen/src/Core/MathFunctions.h: In instantiation of 'static Scalar Eigen::internal::sqrt_impl<Scalar>::run(const Scalar&) [with Scalar = __vector(4) float]':
../include/Eigen/src/Core/MathFunctions.h:1467:48:   required from 'typename Eigen::internal::sqrt_retval<typename Eigen::internal::global_math_functions_filtering_base<Scalar>::type>::type Eigen::numext::sqrt(const Scalar&) [with Scalar = __vector(4) float; typename Eigen::internal::sqrt_retval<typename Eigen::internal::global_math_functions_filtering_base<Scalar>::type>::type = __vector(4) float; typename Eigen::internal::global_math_functions_filtering_base<Scalar>::type = __vector(4) float]'
../include/Eigen/src/Core/GenericPacketMath.h:815:52:   required from 'Packet Eigen::internal::psqrt(const Packet&) [with Packet = __vector(4) float]'
../include/Eigen/src/Core/GenericPacketMath.h:821:46:   required from 'Packet Eigen::internal::prsqrt(const Packet&) [with Packet = __vector(4) float]'
../include/Eigen/src/Core/arch/AltiVec/PacketMath.h:1348:3:   required from here
/opt/local/include/gcc13/c++/cmath:442:3: note: candidate: 'constexpr long double std::sqrt(long double)'
  442 |   sqrt(long double __x)
      |   ^~~~
/opt/local/include/gcc13/c++/cmath:442:20: note:   no known conversion for argument 1 from 'const __vector(4) float' to 'long double'
  442 |   sqrt(long double __x)
      |        ~~~~~~~~~~~~^~~
/opt/local/include/gcc13/c++/cmath:438:3: note: candidate: 'constexpr float std::sqrt(float)'
  438 |   sqrt(float __x)
      |   ^~~~
/opt/local/include/gcc13/c++/cmath:438:14: note:   no known conversion for argument 1 from 'const __vector(4) float' to 'float'
  438 |   sqrt(float __x)
      |        ~~~~~~^~~
In file included from /opt/local/lib/gcc13/gcc/powerpc-apple-darwin10/13.2.0/include-fixed/math.h:35,
                 from /opt/local/include/gcc13/c++/cmath:47:
/opt/local/lib/gcc13/gcc/powerpc-apple-darwin10/13.2.0/include-fixed/architecture/ppc/math.h:479:15: note: candidate: 'double sqrt(double)'
  479 | extern double sqrt( double );
      |               ^~~~
/opt/local/lib/gcc13/gcc/powerpc-apple-darwin10/13.2.0/include-fixed/architecture/ppc/math.h:479:21: note:   no known conversion for argument 1 from 'const __vector(4) float' to 'double'
  479 | extern double sqrt( double );
      |                     ^~~~~~
make: *** [nimDerivs_atomic_dyn_ind.o] Error 1

Upstream Eigen had this fixed quite a while ago. If updating it problematic or undesirable, a quick fix would be to just disable Altivec for Apple.

perrydv commented 8 months ago

What version of nimble are you installing? A new version (1.1.0) is just going up on CRAN now. (It can take a couple of days for all binaries to be updating on CRAN, but the source is there.) That version does update Eigen to its current version of 3.4.0. If you are picking up nimble 1.1.0, then maybe that Eigen update is the problem? If you are using an earlier version of nimble, then maybe the new version is what you need?

barracuda156 commented 8 months ago

I.e., this gonna fix it (though in a suboptimal way):

--- inst/include/Eigen/Core 2024-01-31 03:25:11.000000000 +0800
+++ inst/include/Eigen/Core 2024-02-01 12:09:25.000000000 +0800
@@ -206,7 +206,7 @@
   #include "src/Core/arch/SSE/TypeCasting.h"
   #include "src/Core/arch/SSE/MathFunctions.h"
   #include "src/Core/arch/SSE/Complex.h"
-#elif defined(EIGEN_VECTORIZE_ALTIVEC) || defined(EIGEN_VECTORIZE_VSX)
+#elif (defined(EIGEN_VECTORIZE_ALTIVEC) || defined(EIGEN_VECTORIZE_VSX)) && !defined(__APPLE__)
   #include "src/Core/arch/AltiVec/PacketMath.h"
   #include "src/Core/arch/AltiVec/MathFunctions.h"
   #include "src/Core/arch/AltiVec/Complex.h"
@@ -346,7 +346,7 @@
 #include "src/Core/CoreIterators.h"
 #include "src/Core/ConditionEstimator.h"

-#if defined(EIGEN_VECTORIZE_ALTIVEC) || defined(EIGEN_VECTORIZE_VSX)
+#if (defined(EIGEN_VECTORIZE_ALTIVEC) || defined(EIGEN_VECTORIZE_VSX)) && !defined(__APPLE__)
   #include "src/Core/arch/AltiVec/MatrixProduct.h"
 #elif defined EIGEN_VECTORIZE_NEON
   #include "src/Core/arch/NEON/GeneralBlockPanelKernel.h"
barracuda156 commented 8 months ago

@perrydv Thank you for responding. I am building 1.1.0.

Eigen 3.4.0 has a broken Altivec. The fix was merged after that.

barracuda156 commented 8 months ago

@perrydv Altivec headers were fixed here: https://gitlab.com/libeigen/eigen/-/merge_requests/1150

I have built nimble 1.1.0 with disabled Altivec first (with my patch above), I will try now building against external Eigen with fixed headers.

barracuda156 commented 8 months ago

@perrydv Hmm, configure arg does not have any effect. How should it be used? I tried this:

/opt/local/bin/R CMD INSTALL . --configure-args=' --with-eigen=/opt/local/include/eigen3' 

But it ignored the passed directory path:

configure:3038: checking Eigen/Dense usability
configure:3038: /opt/local/bin/g++-mp-13 -std=gnu++17 -c -pipe -Os -arch ppc -isystem/opt/local/include/LegacySupport -I/opt/local/include conftest.cpp >&5
conftest.cpp:52:10: fatal error: Eigen/Dense: No such file or directory
   52 | #include <Eigen/Dense>
      |          ^~~~~~~~~~~~~
compilation terminated.

(Obviously, I can patch in the flag, but can it be made to work in a neater way?)

barracuda156 commented 8 months ago

Well, I was able to make it recognize the argument, but build still violates it and uses its own Eigen:

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by configure, which was
generated by GNU Autoconf 2.69.  Invocation command line was

  $ ./configure --with-eigen=/opt/local/include/eigen3

## --------- ##
## Platform. ##
## --------- ##

hostname = 36-246.wireless-city.scu.edu.tw
uname -m = Power Macintosh
uname -r = 10.0.0d2
uname -s = Darwin
uname -v = Darwin Kernel Version 10.0.0d2: Fri Oct 10 19:37:52 PDT 2008; root:xnu-1346.7~1/RELEASE_PPC

/usr/bin/uname -p = powerpc
/bin/uname -X     = unknown

/bin/arch              = unknown
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo      = Mach kernel version:
     Darwin Kernel Version 10.0.0d2: Fri Oct 10 19:37:52 PDT 2008; root:xnu-1346.7~1/RELEASE_PPC
Kernel configured for up to 4 processors.
4 processors are physically available.
4 processors are logically available.
Processor type: ppc970 (PowerPC 970)
Processors active: 0 1 2 3
Primary memory available: 16.00 gigabytes
Default processor set: 75 tasks, 374 threads, 4 processors
Load average: 2.39, Mach factor: 1.61
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /opt/local/bin
PATH: /opt/local/sbin
PATH: /bin
PATH: /sbin
PATH: /usr/bin
PATH: /usr/sbin

## ----------- ##
## Core tests. ##
## ----------- ##

configure:2243: checking for C++ compiler version
configure:2252: /opt/local/bin/g++-mp-13 -std=gnu++17 --version >&5
g++-mp-13 (MacPorts gcc13 13.2.0_4+stdlib_flag) 13.2.0
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:2263: $? = 0
configure:2252: /opt/local/bin/g++-mp-13 -std=gnu++17 -v >&5
Using built-in specs.
COLLECT_GCC=/opt/local/bin/g++-mp-13
COLLECT_LTO_WRAPPER=/opt/local/libexec/gcc/powerpc-apple-darwin10/13.2.0/lto-wrapper
Target: powerpc-apple-darwin10
Configured with: /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lang_gcc13/gcc13/work/gcc-13.2.0/configure --prefix=/opt/local --build=powerpc-apple-darwin10 --enable-languages=c,c++,objc,obj-c++,lto,fortran,jit --libdir=/opt/local/lib/gcc13 --includedir=/opt/local/include/gcc13 --infodir=/opt/local/share/info --mandir=/opt/local/share/man --datarootdir=/opt/local/share/gcc-13 --with-local-prefix=/opt/local --with-system-zlib --disable-nls --program-suffix=-mp-13 --with-gxx-include-dir=/opt/local/include/gcc13/c++/ --with-gmp=/opt/local --with-mpfr=/opt/local --with-mpc=/opt/local --with-isl=/opt/local --with-zstd=/opt/local --enable-checking=release --disable-multilib --enable-lto --enable-libstdcxx-time --without-build-config --with-as=/opt/local/bin/as --with-ld=/opt/local/bin/ld --with-ar=/opt/local/bin/ar --with-bugurl=https://trac.macports.org/newticket --enable-host-shared --with-darwin-extra-rpath=/opt/local/lib/libgcc --with-libiconv-prefix=/opt/local --disable-tls --with-gxx-libcxx-include-dir=/opt/local/libexec/gcc13/libc++/include/c++/v1 --with-pkgversion='MacPorts gcc13 13.2.0_4+stdlib_flag'
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 13.2.0 (MacPorts gcc13 13.2.0_4+stdlib_flag) 
configure:2263: $? = 0
configure:2252: /opt/local/bin/g++-mp-13 -std=gnu++17 -V >&5
g++-mp-13: error: unrecognized command-line option '-V'
g++-mp-13: fatal error: no input files
compilation terminated.
configure:2263: $? = 1
configure:2252: /opt/local/bin/g++-mp-13 -std=gnu++17 -qversion >&5
g++-mp-13: error: unrecognized command-line option '-qversion'; did you mean '--version'?
g++-mp-13: fatal error: no input files
compilation terminated.
configure:2263: $? = 1
configure:2283: checking whether the C++ compiler works
configure:2305: /opt/local/bin/g++-mp-13 -std=gnu++17 -pipe -Os -arch ppc -isystem/opt/local/include/LegacySupport -I/opt/local/include -Wl,-headerpad_max_install_names -L/opt/local/lib -lMacportsLegacySupport -Wl,-rpath,/opt/local/lib/libgcc -arch ppc conftest.cpp  >&5
configure:2309: $? = 0
configure:2357: result: yes
configure:2360: checking for C++ compiler default output file name
configure:2362: result: a.out
configure:2368: checking for suffix of executables
configure:2375: /opt/local/bin/g++-mp-13 -std=gnu++17 -o conftest -pipe -Os -arch ppc -isystem/opt/local/include/LegacySupport -I/opt/local/include -Wl,-headerpad_max_install_names -L/opt/local/lib -lMacportsLegacySupport -Wl,-rpath,/opt/local/lib/libgcc -arch ppc conftest.cpp  >&5
configure:2379: $? = 0
configure:2401: result: 
configure:2423: checking whether we are cross compiling
configure:2431: /opt/local/bin/g++-mp-13 -std=gnu++17 -o conftest -pipe -Os -arch ppc -isystem/opt/local/include/LegacySupport -I/opt/local/include -Wl,-headerpad_max_install_names -L/opt/local/lib -lMacportsLegacySupport -Wl,-rpath,/opt/local/lib/libgcc -arch ppc conftest.cpp  >&5
configure:2435: $? = 0
configure:2442: ./conftest
configure:2446: $? = 0
configure:2461: result: no
configure:2466: checking for suffix of object files
configure:2488: /opt/local/bin/g++-mp-13 -std=gnu++17 -c -pipe -Os -arch ppc -isystem/opt/local/include/LegacySupport -I/opt/local/include conftest.cpp >&5
configure:2492: $? = 0
configure:2513: result: o
configure:2517: checking whether we are using the GNU C++ compiler
configure:2536: /opt/local/bin/g++-mp-13 -std=gnu++17 -c -pipe -Os -arch ppc -isystem/opt/local/include/LegacySupport -I/opt/local/include conftest.cpp >&5
configure:2536: $? = 0
configure:2545: result: yes
configure:2554: checking whether /opt/local/bin/g++-mp-13 -std=gnu++17 accepts -g
configure:2574: /opt/local/bin/g++-mp-13 -std=gnu++17 -c -g -isystem/opt/local/include/LegacySupport -I/opt/local/include conftest.cpp >&5
configure:2574: $? = 0
configure:2615: result: yes
configure:2648: checking how to run the C++ preprocessor
configure:2675: /opt/local/bin/g++-mp-13 -std=gnu++17 -E -isystem/opt/local/include/LegacySupport -I/opt/local/include conftest.cpp
configure:2675: $? = 0
configure:2689: /opt/local/bin/g++-mp-13 -std=gnu++17 -E -isystem/opt/local/include/LegacySupport -I/opt/local/include conftest.cpp
conftest.cpp:9:10: fatal error: ac_nonexistent.h: No such file or directory
    9 | #include <ac_nonexistent.h>
      |          ^~~~~~~~~~~~~~~~~~
compilation terminated.
configure:2689: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| /* end confdefs.h.  */
| #include <ac_nonexistent.h>
configure:2714: result: /opt/local/bin/g++-mp-13 -std=gnu++17 -E
configure:2734: /opt/local/bin/g++-mp-13 -std=gnu++17 -E -isystem/opt/local/include/LegacySupport -I/opt/local/include conftest.cpp
configure:2734: $? = 0
configure:2748: /opt/local/bin/g++-mp-13 -std=gnu++17 -E -isystem/opt/local/include/LegacySupport -I/opt/local/include conftest.cpp
conftest.cpp:9:10: fatal error: ac_nonexistent.h: No such file or directory
    9 | #include <ac_nonexistent.h>
      |          ^~~~~~~~~~~~~~~~~~
compilation terminated.
configure:2748: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| /* end confdefs.h.  */
| #include <ac_nonexistent.h>
configure:2777: checking for grep that handles long lines and -e
configure:2835: result: /opt/local/bin/ggrep
configure:2840: checking for egrep
configure:2902: result: /opt/local/bin/ggrep -E
configure:2907: checking for ANSI C header files
configure:2927: /opt/local/bin/g++-mp-13 -std=gnu++17 -c -pipe -Os -arch ppc -isystem/opt/local/include/LegacySupport -I/opt/local/include conftest.cpp >&5
configure:2927: $? = 0
configure:3000: /opt/local/bin/g++-mp-13 -std=gnu++17 -o conftest -pipe -Os -arch ppc -isystem/opt/local/include/LegacySupport -I/opt/local/include -Wl,-headerpad_max_install_names -L/opt/local/lib -lMacportsLegacySupport -Wl,-rpath,/opt/local/lib/libgcc -arch ppc conftest.cpp  >&5
configure:3000: $? = 0
configure:3000: ./conftest
configure:3000: $? = 0
configure:3011: result: yes
configure:3024: checking for sys/types.h
configure:3024: /opt/local/bin/g++-mp-13 -std=gnu++17 -c -pipe -Os -arch ppc -isystem/opt/local/include/LegacySupport -I/opt/local/include conftest.cpp >&5
configure:3024: $? = 0
configure:3024: result: yes
configure:3024: checking for sys/stat.h
configure:3024: /opt/local/bin/g++-mp-13 -std=gnu++17 -c -pipe -Os -arch ppc -isystem/opt/local/include/LegacySupport -I/opt/local/include conftest.cpp >&5
configure:3024: $? = 0
configure:3024: result: yes
configure:3024: checking for stdlib.h
configure:3024: /opt/local/bin/g++-mp-13 -std=gnu++17 -c -pipe -Os -arch ppc -isystem/opt/local/include/LegacySupport -I/opt/local/include conftest.cpp >&5
configure:3024: $? = 0
configure:3024: result: yes
configure:3024: checking for string.h
configure:3024: /opt/local/bin/g++-mp-13 -std=gnu++17 -c -pipe -Os -arch ppc -isystem/opt/local/include/LegacySupport -I/opt/local/include conftest.cpp >&5
configure:3024: $? = 0
configure:3024: result: yes
configure:3024: checking for memory.h
configure:3024: /opt/local/bin/g++-mp-13 -std=gnu++17 -c -pipe -Os -arch ppc -isystem/opt/local/include/LegacySupport -I/opt/local/include conftest.cpp >&5
configure:3024: $? = 0
configure:3024: result: yes
configure:3024: checking for strings.h
configure:3024: /opt/local/bin/g++-mp-13 -std=gnu++17 -c -pipe -Os -arch ppc -isystem/opt/local/include/LegacySupport -I/opt/local/include conftest.cpp >&5
configure:3024: $? = 0
configure:3024: result: yes
configure:3024: checking for inttypes.h
configure:3024: /opt/local/bin/g++-mp-13 -std=gnu++17 -c -pipe -Os -arch ppc -isystem/opt/local/include/LegacySupport -I/opt/local/include conftest.cpp >&5
configure:3024: $? = 0
configure:3024: result: yes
configure:3024: checking for stdint.h
configure:3024: /opt/local/bin/g++-mp-13 -std=gnu++17 -c -pipe -Os -arch ppc -isystem/opt/local/include/LegacySupport -I/opt/local/include conftest.cpp >&5
configure:3024: $? = 0
configure:3024: result: yes
configure:3024: checking for unistd.h
configure:3024: /opt/local/bin/g++-mp-13 -std=gnu++17 -c -pipe -Os -arch ppc -isystem/opt/local/include/LegacySupport -I/opt/local/include conftest.cpp >&5
configure:3024: $? = 0
configure:3024: result: yes
configure:3038: checking Eigen/Dense usability
configure:3038: /opt/local/bin/g++-mp-13 -std=gnu++17 -c -pipe -Os -arch ppc -isystem/opt/local/include/LegacySupport -I/opt/local/include conftest.cpp >&5
conftest.cpp:52:10: fatal error: Eigen/Dense: No such file or directory
   52 | #include <Eigen/Dense>
      |          ^~~~~~~~~~~~~
compilation terminated.
configure:3038: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| /* end confdefs.h.  */
| #include <stdio.h>
| #ifdef HAVE_SYS_TYPES_H
| # include <sys/types.h>
| #endif
| #ifdef HAVE_SYS_STAT_H
| # include <sys/stat.h>
| #endif
| #ifdef STDC_HEADERS
| # include <stdlib.h>
| # include <stddef.h>
| #else
| # ifdef HAVE_STDLIB_H
| #  include <stdlib.h>
| # endif
| #endif
| #ifdef HAVE_STRING_H
| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
| #  include <memory.h>
| # endif
| # include <string.h>
| #endif
| #ifdef HAVE_STRINGS_H
| # include <strings.h>
| #endif
| #ifdef HAVE_INTTYPES_H
| # include <inttypes.h>
| #endif
| #ifdef HAVE_STDINT_H
| # include <stdint.h>
| #endif
| #ifdef HAVE_UNISTD_H
| # include <unistd.h>
| #endif
| #include <Eigen/Dense>
configure:3038: result: no
configure:3038: checking Eigen/Dense presence
configure:3038: /opt/local/bin/g++-mp-13 -std=gnu++17 -E -isystem/opt/local/include/LegacySupport -I/opt/local/include conftest.cpp
conftest.cpp:19:10: fatal error: Eigen/Dense: No such file or directory
   19 | #include <Eigen/Dense>
      |          ^~~~~~~~~~~~~
compilation terminated.
configure:3038: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| /* end confdefs.h.  */
| #include <Eigen/Dense>
configure:3038: result: no
configure:3038: checking for Eigen/Dense
configure:3038: result: no
configure:3269: creating ./config.status

## ---------------------- ##
## Running config.status. ##
## ---------------------- ##

This file was extended by config.status, which was
generated by GNU Autoconf 2.69.  Invocation command line was

  CONFIG_FILES    = 
  CONFIG_HEADERS  = 
  CONFIG_LINKS    = 
  CONFIG_COMMANDS = 
  $ ./config.status 

on 36-246.wireless-city.scu.edu.tw

config.status:738: creating inst/make/Makevars
config.status:738: creating inst/make/Makevars_lib
config.status:738: creating R/config.R
config.status:738: creating src/Makevars

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_cxx_compiler_gnu=yes
ac_cv_env_CCC_set=
ac_cv_env_CCC_value=
ac_cv_env_CPPFLAGS_set=set
ac_cv_env_CPPFLAGS_value='-isystem/opt/local/include/LegacySupport -I/opt/local/include'
ac_cv_env_CXXCPP_set=
ac_cv_env_CXXCPP_value=
ac_cv_env_CXXFLAGS_set=set
ac_cv_env_CXXFLAGS_value='-pipe -Os -arch ppc'
ac_cv_env_CXX_set=set
ac_cv_env_CXX_value='/opt/local/bin/g++-mp-13 -std=gnu++17'
ac_cv_env_LDFLAGS_set=set
ac_cv_env_LDFLAGS_value='-Wl,-headerpad_max_install_names -L/opt/local/lib -lMacportsLegacySupport -Wl,-rpath,/opt/local/lib/libgcc -arch ppc'
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_header_Eigen_Dense=no
ac_cv_header_inttypes_h=yes
ac_cv_header_memory_h=yes
ac_cv_header_stdc=yes
ac_cv_header_stdint_h=yes
ac_cv_header_stdlib_h=yes
ac_cv_header_string_h=yes
ac_cv_header_strings_h=yes
ac_cv_header_sys_stat_h=yes
ac_cv_header_sys_types_h=yes
ac_cv_header_unistd_h=yes
ac_cv_objext=o
ac_cv_path_EGREP='/opt/local/bin/ggrep -E'
ac_cv_path_GREP=/opt/local/bin/ggrep
ac_cv_prog_CXXCPP='/opt/local/bin/g++-mp-13 -std=gnu++17 -E'
ac_cv_prog_cxx_g=yes

## ----------------- ##
## Output variables. ##
## ----------------- ##

CPPAD_INC=''
CPPFLAGS='-isystem/opt/local/include/LegacySupport -I/opt/local/include'
CXX='/opt/local/bin/g++-mp-13 -std=gnu++17'
CXXCPP='/opt/local/bin/g++-mp-13 -std=gnu++17 -E'
CXXFLAGS='-pipe -Os -arch ppc'
DEFS='-DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1'
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP='/opt/local/bin/ggrep -E'
EIGEN_INC='-I/opt/local/include/eigen3'
EXEEXT=''
GNUMAKEFILE_INCLUDE_MAKECONF='Makeconf'
GREP='/opt/local/bin/ggrep'
LDFLAGS='-Wl,-headerpad_max_install_names -L/opt/local/lib -lMacportsLegacySupport -Wl,-rpath,/opt/local/lib/libgcc -arch ppc'
LIBOBJS=''
LIBS=''
LTLIBOBJS=''
NEED_MAKEVARS_FILE='TRUE'
NIMBLE_DIR='WILL_BE_SET_IN_LOCAL_MAKEVARS'
NIMBLE_INC_DIR='WILL_BE_SET_IN_LOCAL_MAKEVARS'
NIMBLE_LIB_DIR='WILL_BE_SET_IN_LOCAL_MAKEVARS'
OBJEXT='o'
PACKAGE_BUGREPORT=''
PACKAGE_NAME=''
PACKAGE_STRING=''
PACKAGE_TARNAME=''
PACKAGE_URL=''
PACKAGE_VERSION=''
PATH_SEPARATOR=':'
RPATH=''
R_ENABLE_LIB='FALSE'
R_PACKAGE_DIR='/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_R_R-nimble/R-nimble/work/build/00LOCK-nimble/00new/nimble'
SHELL='/bin/sh'
USE_REGISTRATION='.NimbleUseRegistration = TRUE'
ac_ct_CXX=''
bindir='${exec_prefix}/bin'
build_alias=''
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE}'
dvidir='${docdir}'
exec_prefix='${prefix}'
host_alias=''
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='/usr/local'
program_transform_name='s,x,x,'
psdir='${docdir}'
runstatedir='${localstatedir}/run'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''

## ----------- ##
## confdefs.h. ##
## ----------- ##

/* confdefs.h */
#define PACKAGE_NAME ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define PACKAGE_STRING ""
#define PACKAGE_BUGREPORT ""
#define PACKAGE_URL ""
#define STDC_HEADERS 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRING_H 1
#define HAVE_MEMORY_H 1
#define HAVE_STRINGS_H 1
#define HAVE_INTTYPES_H 1
#define HAVE_STDINT_H 1
#define HAVE_UNISTD_H 1

configure: exit 0

But:

--->  Building R-nimble
xinstall: mkdir /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_R_R-nimble/R-nimble/work/build
Executing:  cd "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_R_R-nimble/R-nimble/work/nimble" && /opt/local/bin/R CMD INSTALL . --configure-args="--with-eigen=/opt/local/include/eigen3" --library=/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_R_R-nimble/R-nimble/work/build --install-tests 
* installing *source* package ‘nimble’ ...
** package ‘nimble’ successfully unpacked and MD5 sums checked
** using staged installation
Checking eigen directory /opt/local/include/eigen3
Setting CPPFLAGS to find Eigen
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether /opt/local/bin/g++-mp-13 -std=gnu++17 accepts -g... yes
working on eigen
checking how to run the C++ preprocessor... /opt/local/bin/g++-mp-13 -std=gnu++17 -E
checking for grep that handles long lines and -e... /opt/local/bin/ggrep
checking for egrep... /opt/local/bin/ggrep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking Eigen/Dense usability... no
checking Eigen/Dense presence... no
checking for Eigen/Dense... no
Using the version of Eigen provided with NIMBLE
ENABLE_LIB=false
configure: creating ./config.status
config.status: creating inst/make/Makevars
config.status: creating inst/make/Makevars_lib
config.status: creating R/config.R
config.status: creating src/Makevars
removing debugging flags
/opt/local/Library/Frameworks/R.framework/Resources/bin/Rscript --vanilla ./customizeMakeconf.R
Building libnimble.a
/opt/local/bin/g++-mp-13 -std=gnu++17 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DR_NO_REMAP -I"../include"  -isystem/opt/local/include/LegacySupport -I/opt/local/include    -fPIC  -pipe -Os -arch ppc  -c nimDerivs_atomic_dyn_ind.cpp -o nimDerivs_atomic_dyn_ind.o
In file included from ../include/Eigen/src/Core/util/ConfigureVectorization.h:381,
                 from ../include/Eigen/Core:22,
                 from ../include/Eigen/Dense:1,
                 from ../include/nimble/EigenTypedefs.h:24,
                 from ../include/nimble/nimbleCppAD.h:38,
                 from ../include/nimble/nimDerivs_atomic_dyn_ind.h:6,
                 from nimDerivs_atomic_dyn_ind.cpp:1:

What should I do? :)

perrydv commented 8 months ago

Thanks @barracuda156 . This is very helpful. Eigen 3.4.0 is labeled as "latest stable release". How common will this problem be? @paciorek can say more about the configure args.

barracuda156 commented 8 months ago

@perrydv If there are any reservations with regard to updating Eigen headers, do not do it, it is not worth: affected people are obviously very few. (I suspect that nobody has working R on macOS PowerPC outside of Macports, and an intersection of Macports users of macOS PowerPC with users interested to use R is presumably in single digits.)

However it will be nice to either ensure that a build against external Eigen actually works without hacking the code (and a note in README, maybe, advising a usage of newer Eigen from upstream or Macports eigen3-devel), or at least to disable Altivec for Apple. That will result in a somewhat slower code, but again, affected people are few, and it is better to have a working slower code than a broken one.

barracuda156 commented 8 months ago

P. S. I will update the port for R-nimble and see whether external Eigen is found by Clang on Sonoma. If it is not – and I assume this issue should not be compiler- or arch-specific, it is either something wrong on our side (I pass wrong args etc.) or configure code does not work as it should – the issue should be reproducible on any macOS with Macports installed.

paciorek commented 8 months ago

Yes I will check on the question of building against external Eigen via the configure args when I get a chance.

barracuda156 commented 8 months ago

@perrydv @paciorek My updates are merged, so now it hopefully can be reproducible:

Macports will build nimble 1.1.0 against its bundled Eigen with sudo port -v -s build R-nimble (-s flag forces a build from source when added).

While this version of the portfile is supposed to build against Macports Eigen: https://github.com/barracuda156/macports-ports/blob/nimble/R/R-nimble/Portfile (did not work for me, as I documented above, at least on my testing system; I will try on another one today to make sure).

This issue as such is orthogonal to AltiVec breakage. If we make it work for x86 or arm64, it should work for any arch.

By default Macports installs Eigen headers into /opt/local/include/eigen3 (whether released eigen3 or eigen3-devel which tracks upstream).