The package rpms/cxsc.git has added or updated architecture specific content in its spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s): https://src.fedoraproject.org/cgit/rpms/cxsc.git/commit/?id=9a1c86d40b6c4fd0....
Change: +%ifarch %{x86_64}
Thanks.
Full change: ============
commit 9a1c86d40b6c4fd09cf30813610beeafb2c26b7b Author: Jerry James loganjerry@gmail.com Date: Wed Jun 4 09:14:18 2025 -0600
Fix FTBFS due to ambiguous references to "complex"
diff --git a/cxsc-complex.patch b/cxsc-complex.patch new file mode 100644 index 0000000..cf23de8 --- /dev/null +++ b/cxsc-complex.patch @@ -0,0 +1,77 @@ +Fixes errors such as this: + +In file included from Modules/cpoly.cpp:53: +Modules/cpoly.hpp:67:5: error: reference to ‘complex’ is ambiguous + 67 | complex& operator[] ( int i ) { return coeff[i]; } + | ^~~~~~~ + +--- CToolbox/Modules/cpoly.hpp.orig 2014-01-30 10:49:26.000000000 -0700 ++++ CToolbox/Modules/cpoly.hpp 2025-06-04 08:45:35.312426064 -0600 +@@ -64,7 +64,7 @@ class CPolynomial { + public: + CPolynomial ( int ); + CPolynomial ( const CPolynomial& ); +- complex& operator[] ( int i ) { return coeff[i]; } ++ cxsc::complex& operator[] ( int i ) { return coeff[i]; } + + friend int Deg ( const CPolynomial& ); + friend istream& operator>> ( istream&, CPolynomial& ); +--- CToolbox/Modules/cpzero.cpp.orig 2014-01-30 10:49:26.000000000 -0700 ++++ CToolbox/Modules/cpzero.cpp 2025-06-04 08:52:58.818838446 -0600 +@@ -115,14 +115,14 @@ static real MaxNorm ( CPolynomial p ) + // 'z' of polynomial 'p', as well as for the coefficients 'q' of the + // deflated polynomial. + //---------------------------------------------------------------------------- +-static void Approximation ( CPolynomial p, complex& z, ++static void Approximation ( CPolynomial p, cxsc::complex& z, + CPolynomial& q, int& Err ) + { + const int kmax = 50; // Maximum number of iteration steps + const real eps = 1E-9; // Relative error of approximation + + int stop, k, i, n = Deg(p); +- complex t; ++ cxsc::complex t; + cdotprecision accu; + CPolynomial delta(n-1), d(n-1), w(n-1), qHlp(n-2); + +@@ -208,7 +208,7 @@ static void Approximation ( CPolynomial + // well as for the coefficients of the deflated polynomial. + //---------------------------------------------------------------------------- + static void IntervalIteration ( CPolynomial p, CPolynomial q, +- complex z, CIPolynomial& qq, ++ cxsc::complex z, CIPolynomial& qq, + cinterval& zz, int& Err ) + { + const int kmax = 10; // Maximum number of iteration steps +@@ -334,7 +334,7 @@ static void IntervalIteration ( CPolynom + // computed, and then verified enclosures for a root and for a deflated + // polynomial are returned. + //---------------------------------------------------------------------------- +-void CPolyZero ( CPolynomial p, complex z, ++void CPolyZero ( CPolynomial p, cxsc::complex z, + CIPolynomial& qq, cinterval& zz, int& Err ) + { + int n = Deg(p); +--- CToolbox/Modules/cpzero.hpp.orig 2014-01-30 10:49:26.000000000 -0700 ++++ CToolbox/Modules/cpzero.hpp 2025-06-04 08:49:14.941766793 -0600 +@@ -39,7 +39,7 @@ using namespace cxsc; + using namespace std; + + extern char* CPolyZeroErrMsg ( int ); +-extern void CPolyZero ( CPolynomial, complex, ++extern void CPolyZero ( CPolynomial, cxsc::complex, + CIPolynomial&, cinterval&, int& ); + #endif + +--- CToolbox/Programs/cpz_ex.cpp.orig 2014-01-30 10:49:30.000000000 -0700 ++++ CToolbox/Programs/cpz_ex.cpp 2025-06-04 08:57:10.056039428 -0600 +@@ -27,7 +27,7 @@ using namespace std; + int main ( ) + { + int Err, n; +- complex z; ++ cxsc::complex z; + cinterval zz; + + do { diff --git a/cxsc.spec b/cxsc.spec index 8d95d09..06619eb 100644 --- a/cxsc.spec +++ b/cxsc.spec @@ -2,7 +2,7 @@
Name: cxsc Version: %(tr - . <<< %{upstreamver}) -Release: 29%{?dist} +Release: 30%{?dist} Summary: C++ library for Extended Scientific Computing
%global majver %(cut -d. -f1 <<< %{version}) @@ -26,6 +26,8 @@ Patch: %{name}-uninit.patch Patch: %{name}-neg-alloc.patch # Remove template IDs from constructors Patch: %{name}-template-id.patch +# Disambiguate the name "complex" +Patch: %{name}-complex.patch
# See https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval ExcludeArch: %{ix86} @@ -92,7 +94,7 @@ sed -i 's/(RPATH[[:blank:]]*=).*/\1/;' Makefile.in CToolbox/Makefile sed -i '/LINKERPATH=-Wl,-R/d' install_cxsc
# Don't build with SSE2 support on platforms the script doesn't recognize -%ifnarch %{ix86} x86_64 +%ifnarch %{x86_64} sed -i 's/ -mfpmath=sse -msse2//' install_cxsc.in %endif
@@ -108,13 +110,13 @@ if [ %{_libdir} != "%{_prefix}/lib" ]; then fi
# Use an efficient representation for a_btyp on 64-bit systems -if [ "%{__isa_bits}" = "64" ]; then - sed -ri 's/(#define SHORTABTYP) .*/\1 1/' src/rts/o_spec.h - sed -i 's/#if DEC_ALPHA_C+GNU_X86_64+CXSC_PPC64/#if 1/' src/rts/p88rts.h -else - sed -ri 's/(#define SHORTABTYP) .*/\1 0/' src/rts/o_spec.h - sed -i 's/#if DEC_ALPHA_C+GNU_X86_64+CXSC_PPC64/#if 0/' src/rts/p88rts.h -fi +%if 0%{?__isa_bits} == 64 +sed -ri 's/(#define SHORTABTYP) .*/\1 1/' src/rts/o_spec.h +sed -i 's/#if DEC_ALPHA_C+GNU_X86_64+CXSC_PPC64/#if 1/' src/rts/p88rts.h +%else +sed -ri 's/(#define SHORTABTYP) .*/\1 0/' src/rts/o_spec.h +sed -i 's/#if DEC_ALPHA_C+GNU_X86_64+CXSC_PPC64/#if 0/' src/rts/p88rts.h +%endif
# Remove spurious executable bits chmod a-x src/fi_lib/*.{cpp,hpp} @@ -132,16 +134,16 @@ done
%build # FIXME: tests fail without -fno-inline. Why? -if [ "%{__isa_bits}" = "64" ]; then - use64=-DIS_64_BIT -else - use64= -fi +%if 0%{?__isa_bits} == 64 +use64=-DIS_64_BIT +%else +use64= +%endif printf "yes\n\ gnu\n\ no\n\ yes\n\ -%ifarch x86_64 +%ifarch %{x86_64} %{build_cxxflags} -DCXSC_USE_BLAS -DCXSC_USE_LAPACK -DCXSC_USE_OPENMP -DCXSC_USE_FMA -DIS_64_BIT -fopenmp %{build_ldflags}\n\ 64\n\ asm\n\ @@ -208,6 +210,9 @@ make toolboxtest_dyn %doc docu/apidoc
%changelog +* Wed Jun 04 2025 Jerry James loganjerry@gmail.com - 2.5.4-30 +- Fix FTBFS due to ambiguous references to "complex" + * Thu Jan 16 2025 Fedora Release Engineering releng@fedoraproject.org - 2.5.4-29 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild