Dear Maintainer,
The version 3.14.0+ds-1 still FTBFS on ppc64el despite the fix uploaded
for this bug.
Build log:
https://buildd.debian.org/status/fetch.php?pkg=supercollider-sc3-plugins&arch=ppc64el&ver=3.13.0%7Erepack-1.2&stamp=1782753041&raw=0
Root cause:
Removing -mno-altivec/-mno-vsx in 3.14.0+ds-1 re-enabled AltiVec/VSX on
ppc64el,
exposing a pre-existing defect in two bundled nova-simd headers:
external_libraries/nova-simd/vec/vec_altivec.hpp
external_libraries/nova-simd/vec/vec_int_altivec.hpp
current falling build log :
https://buildd.debian.org/status/fetch.php?pkg=supercollider-sc3-plugins&arch=ppc64&ver=3.14.0%2Bds-1&stamp=1782852658&raw=0
Both include <altivec.h> and immediately open a C++ namespace.
On ppc64el, GCC defines __APPLE_ALTIVEC__, which causes <altivec.h> to
skip its #define vector __vector macro.
The bare vector keyword then reaches the C++ parser directly, and inside
a namespace where std::vector is also visible,
GCC 15 fails with:
error: 'vector' does not name a type; did you mean 'vec_or'?
30 | typedef vector float fvec;
Fix:
Replaced all bare vector usages inside the affected namespaces with
__vector — GCC's built-in keyword,
valid at any scope regardless of __APPLE_ALTIVEC__. Added #undef
vector/#undef pixel/#undef bool after #include <altivec.h>
as a defensive guard. Also fixed vec_re(arg) → vec_re(arg.data_), since
the intrinsic requires a raw __vector float, not the wrapper class.
Verified on a ppc64el LPAR (Debian sid):
dpkg-buildpackage -us -uc -b successfully builds supercollider on
ppc64el generating below .dep files
ladspalist_3.14.0+ds-3_ppc64el.deb
sc3-plugins-server_3.14.0+ds-3_ppc64el.deb
ladspalist-dbgsym_3.14.0+ds-3_ppc64el.deb
sc3-plugins-server-dbgsym_3.14.0+ds-3_ppc64el.deb
sc3-plugins_3.14.0+ds-3_all.deb
sc3-plugins-language_3.14.0+ds-3_all.deb
I have shared two patches below, please review it.
I will create a Merge Request on Salsa with this patch if it looks good
to you.
Please let me know if any changes are needed.
Thanks,
Trupti
Index: supercollider-sc3-plugins-3.14.0+ds/external_libraries/nova-simd/vec/vec_int_altivec.hpp
===================================================================
--- supercollider-sc3-plugins-3.14.0+ds.orig/external_libraries/nova-simd/vec/vec_int_altivec.hpp
+++ supercollider-sc3-plugins-3.14.0+ds/external_libraries/nova-simd/vec/vec_int_altivec.hpp
@@ -21,21 +21,24 @@
#define VEC_INT_ALTIVEC_HPP
#include <altivec.h>
+#undef bool
+#undef vector
+#undef pixel
namespace nova {
namespace detail {
struct int_vec_altivec
{
- typedef vector float fvec;
- typedef vector unsigned int ivec;
+ typedef __vector float fvec;
+ typedef __vector unsigned int ivec;
ivec data_;
private:
static ivec set_vector(int i)
{
#ifdef __GNUC__
- return (ivec){i, i, i, i};
+ return (ivec){(unsigned int)i,(unsigned int)i, (unsigned int)i, (unsigned int)i};
#else
#error compiler not supported
#endif
@@ -58,7 +61,7 @@ public:
data_(arg.data_)
{}
- int_vec_altivec(vector signed int arg):
+ int_vec_altivec(__vector signed int arg):
data_((ivec)arg)
{}
Index: supercollider-sc3-plugins-3.14.0+ds/external_libraries/nova-simd/vec/vec_altivec.hpp
===================================================================
--- supercollider-sc3-plugins-3.14.0+ds.orig/external_libraries/nova-simd/vec/vec_altivec.hpp
+++ supercollider-sc3-plugins-3.14.0+ds/external_libraries/nova-simd/vec/vec_altivec.hpp
@@ -22,6 +22,8 @@
#include <altivec.h>
#undef bool
+#undef vector
+#undef pixel
#include "../detail/vec_math.hpp"
#include "vec_int_altivec.hpp"
@@ -39,13 +41,13 @@ namespace nova
template <>
struct vec<float>:
- vec_base<float, vector float, 4>
+ vec_base<float, __vector float, 4>
{
- typedef vector float internal_vector_type;
+ typedef __vector float internal_vector_type;
typedef float float_type;
private:
- typedef vec_base<float, vector float, 4> base;
+ typedef vec_base<float, __vector float, 4> base;
static internal_vector_type set_vector(float f0, float f1, float f2, float f3)
{
@@ -231,7 +233,7 @@ private:
// adapted from http://developer.apple.com/hardwaredrivers/ve/algorithms.html
// Get the reciprocal estimate
- vector float estimate = vec_re(arg);
+ __vector float estimate = vec_re(arg);
// One round of Newton-Raphson refinement
return vec_madd(vec_nmsub(estimate, arg, gen_one()), estimate, estimate);
@@ -284,7 +286,7 @@ public:
friend vec fast_reciprocal(const vec & arg)
{
- vector float estimate = vec_re(arg);
+ __vector float estimate = vec_re(arg.data_);
return estimate;
}
@@ -316,8 +318,8 @@ public:
vec operator op(vec const & rhs) const \
{ \
const internal_vector_type one = gen_one(); \
- vector unsigned int mask = (vector unsigned int)opcode(data_, rhs.data_); \
- return (internal_vector_type)vec_and(mask, (vector unsigned int)one); \
+ __vector unsigned int mask = (__vector unsigned int)opcode(data_, rhs.data_); \
+ return (internal_vector_type)vec_and(mask, (__vector unsigned int)one); \
}
#define vec_cmple_(a, b) vec_cmpge(b, a)
@@ -367,7 +369,7 @@ public:
friend inline vec select(vec lhs, vec rhs, vec bitmask)
{
- return vec_sel(lhs.data_, rhs.data_, (vector unsigned int)bitmask.data_);
+ return vec_sel(lhs.data_, rhs.data_, (__vector unsigned int)bitmask.data_);
}
/* @} */
@@ -395,14 +397,14 @@ private:
// adapted from http://developer.apple.com/hardwaredrivers/ve/algorithms.html
//Get the square root reciprocal estimate
- vector float zero = gen_zero();
- vector float oneHalf = gen_05();
- vector float one = gen_one();
- vector float estimate = vec_rsqrte(arg);
+ __vector float zero = gen_zero();
+ __vector float oneHalf = gen_05();
+ __vector float one = gen_one();
+ __vector float estimate = vec_rsqrte(arg);
//One round of Newton-Raphson refinement
- vector float estimateSquared = vec_madd(estimate, estimate, zero);
- vector float halfEstimate = vec_madd(estimate, oneHalf, zero);
+ __vector float estimateSquared = vec_madd(estimate, estimate, zero);
+ __vector float halfEstimate = vec_madd(estimate, oneHalf, zero);
return vec_madd(vec_nmsub(arg, estimateSquared, one), halfEstimate, estimate);
}