--- Begin Message ---
Package: lcalc
Severity: minor
Usertags: clang-ftbfs
User: pkg-llvm-t...@lists.alioth.debian.org
Tag: patch
Hello,
Using the rebuild infrastructure, your package fails to build with clang
(instead of gcc).
Thanks,
Arthur
diff -Naur lcalc.orig/lcalc-1.23+dfsg/debian/changelog lcalc/lcalc-1.23+dfsg/debian/changelog
--- lcalc.orig/lcalc-1.23+dfsg/debian/changelog 2014-05-18 22:01:55.817738552 -0500
+++ lcalc/lcalc-1.23+dfsg/debian/changelog 2014-05-21 23:11:45.965611744 -0500
@@ -1,3 +1,16 @@
+lcalc (1.23+dfsg-3) unstable; urgency=low
+
+ * Fix FTBFS with clang:
+ - Fixed error: C++ requires a type specifier for all declarations,
+ error: variable length array of non-POD element type in
+ include/L.h
+ include/Lcomplex.h
+ include/Ldokchitser.h
+ include/Lexplicit_formula.h
+ include/Lgamma.h
+
+ -- Arthur Marble <art...@info9.net> Wed, 21 May 2014 23:11:43 -0500
+
lcalc (1.23+dfsg-2) unstable; urgency=medium
* Add patch fix_pari_include.patch:
diff -Naur lcalc.orig/lcalc-1.23+dfsg/debian/patches/clang-ftbfs.diff lcalc/lcalc-1.23+dfsg/debian/patches/clang-ftbfs.diff
--- lcalc.orig/lcalc-1.23+dfsg/debian/patches/clang-ftbfs.diff 1969-12-31 18:00:00.000000000 -0600
+++ lcalc/lcalc-1.23+dfsg/debian/patches/clang-ftbfs.diff 2014-05-21 23:06:15.701619120 -0500
@@ -0,0 +1,161 @@
+--- a/include/Lcomplex.h
++++ b/include/Lcomplex.h
+@@ -135,7 +135,7 @@ namespace std
+ template<typename _Up>
+ complex<_Tp>& operator/=(const complex<_Up>&);
+
+- friend reset(complex<_Tp>& C) {
++ friend void reset(complex<_Tp>& C) {
+ reset(C._M_real);
+ reset(C._M_imag);
+ }
+--- a/include/Lgamma.h
++++ b/include/Lgamma.h
+@@ -77,7 +77,7 @@ Complex exp_recycle();
+ //n=0 should just give log_GAMMA(z)... thus making log_GAMMA
+ //code obsolete. But leave log_GAMMA intact anyways.
+ template <class ttype>
+-precise(ttype) log_GAMMA (ttype z,int n=0)
++precise(ttype) log_GAMMA (ttype z,int n)
+ {
+ int M;
+ precise(ttype) log_G,r,r2,y;
+@@ -230,7 +230,7 @@ Complex GAMMA (ttype z1, ttype2 delta)
+ //value exp_w which holds exp(-w)
+ //computes G(z,w), so there's an extra w^(-z) factor.
+ template <class ttype>
+-Complex inc_GAMMA (ttype z,ttype w, const char *method="temme", ttype exp_w = 0, bool recycle=false)
++Complex inc_GAMMA (ttype z,ttype w, const char *method, ttype exp_w, bool recycle)
+ {
+
+ Complex G;
+@@ -334,7 +334,7 @@ Complex inc_GAMMA (ttype z,ttype w, cons
+
+
+ template <class ttype>
+-ttype cfrac_GAMMA (ttype z,ttype w, ttype exp_w=0, bool recycle=false) //computes G(z,w) via continued fraction
++ttype cfrac_GAMMA (ttype z,ttype w, ttype exp_w, bool recycle) //computes G(z,w) via continued fraction
+ {
+
+ ttype G;
+@@ -424,7 +424,7 @@ ttype cfrac_GAMMA (ttype z,ttype w, ttyp
+ }
+
+ template <class ttype>
+-ttype asympt_GAMMA (ttype z,ttype w, ttype exp_w = 0, bool recycle=false) //computes G(z,w) via asymptotic series
++ttype asympt_GAMMA (ttype z,ttype w, ttype exp_w, bool recycle) //computes G(z,w) via asymptotic series
+ {
+
+ if(my_verbose>3) cout << "called asympt_GAMMA("<<z<<","<<w<<")"<< endl;
+@@ -446,7 +446,7 @@ ttype asympt_GAMMA (ttype z,ttype w, tty
+
+
+ template <class ttype>
+-ttype comp_inc_GAMMA (ttype z,ttype w,ttype exp_w = 0, bool recycle=false) //computes g(z,w)
++ttype comp_inc_GAMMA (ttype z,ttype w,ttype exp_w, bool recycle) //computes g(z,w)
+ {
+
+ ttype g;
+@@ -604,7 +604,7 @@ ttype comp_inc_GAMMA (ttype z,ttype w,tt
+ }
+
+ template <class ttype>
+-Complex gamma_sum(Complex s, int what_type, ttype *coeff, int N, Double g, Complex l, Double Q, Long Period, Complex delta=1, const char *method="temme")
++Complex gamma_sum(Complex s, int what_type, ttype *coeff, int N, Double g, Complex l, Double Q, Long Period, Complex delta, const char *method)
+ {
+ Complex SUM=0;
+
+--- a/include/L.h
++++ b/include/L.h
+@@ -491,7 +491,7 @@ public:
+
+ //#include "Ldirichlet_series.h" //for computing Dirichlet series
+ Complex partial_dirichlet_series(Complex s, long long N1, long long N2);
+- Complex dirichlet_series(Complex s, long long N);
++ Complex dirichlet_series(Complex s, long long N=-1);
+
+ //#include "Ltaylor_series.h" //for computing taylor series for Dirichlet series
+ //void compute_taylor_series(int N, int K, Complex s_0, Complex *series);
+--- a/include/Ldokchitser.h
++++ b/include/Ldokchitser.h
+@@ -1,6 +1,8 @@
+ #ifndef Ldokchitser_H
+ #define Ldokchitser_H
+
++#include <vector>
++
+ //finding the explicit taylor series for \phi(t) using Dokchitser algo
+
+ #define MYDIGITS 5 // estimate of precision ... will be set using the precision variable
+@@ -69,7 +71,8 @@ phi_series(int precision)
+
+ // compute the values m[j] for the respective lambda_k[j]
+
+- Complex m[N+1];
++ std::vector<Complex> m;
++ m.resize(N+1);
+ for (j=1;j<=N;j++)
+ m[j] = -2*lambda_k[j] + 2;
+
+@@ -77,8 +80,18 @@ phi_series(int precision)
+ // compute sum_{k=1}^a log Gamma((s+m[j]+2*lambda[k])/2) for each j
+
+ int n,fact_n;
+- Complex log_Gamma[N+1][a+1][MYDIGITS+1];
+- Complex sum_log_Gamma[N+1][MYDIGITS+1];
++ std::vector<std::vector<std::vector<Complex> > log_Gamma;
++ log_Gamma.resize(N+1);
++ for (j=1;j<=N;j++)
++ {
++ log_Gamma[j].resize(a+1);
++ for (k=1;k<=a;k++)
++ log_Gamma[j][k].resize(MYDIGITS+1);
++ }
++
++ std::vector<std::vector<Complex> > sum_log_Gamma;
++ sum_log_Gamma.resize(N+1);
++ for (j=1;j<=N;j++) sum_log_Gamma[j].resize(MYDIGITS+1);
+
+ for (j=1;j<=N;j++)
+ for (n=0;n<=MYDIGITS;n++)
+@@ -103,8 +116,19 @@ phi_series(int precision)
+
+ // compute the exponential taylor series for gamma = exp(sum_log_Gamma)
+
+- Complex exp_sum_log_Gamma[N+1][MYDIGITS+1][MYDIGITS+1]; // symmetric functions
+- Complex gamma[N+1][MYDIGITS+1]; // gamma(s+m[j]) for j = 1 to N
++ std::vector<std::vector<std::vector<Complex> > > exp_sum_log_Gamma;
++ exp_sum_log_Gamma.resize(N+1);
++ for (j=1;j<=N;j++)
++ {
++ exp_sum_log_Gamma[j].resize(MYDIGITS+1);
++ for (k=1;k<=MYDIGITS;k++)
++ exp_sum_log_Gamma[j][k].resize(MYDIGITS+1);
++ }
++
++ std::vector<std::vector<Complex> > gamma;
++ gamma.resize(N+1);
++ for (j=1;j<=N;j++) gamma[j].resize(MYDIGITS+1);
++
+ Complex temp_gamma[MYDIGITS+1];
+ Complex temp_mult_gamma[MYDIGITS+1];
+ Complex temp_exp_sum_log_Gamma[MYDIGITS+1];
+--- a/include/Lexplicit_formula.h
++++ b/include/Lexplicit_formula.h
+@@ -1,4 +1,5 @@
+ // This file mainly due to Kevin McGown, with modifications by Michael Rubinstein
++#include <vector>
+
+ #ifndef Lexplicit_formula_H
+ #define Lexplicit_formula_H
+@@ -24,8 +25,8 @@ template <class ttype>
+ int L_function <ttype>::
+ dirichlet_coeffs_log_diff(int num_coeffs, Complex *c)
+ {
+-
+- Complex b[num_coeffs+1];
++ std::vector<Complex> b;
++ b.resize(num_coeffs+1);
+ int j, n, d1, ind;
+ Complex total, total2, temp;
diff -Naur lcalc.orig/lcalc-1.23+dfsg/debian/patches/series lcalc/lcalc-1.23+dfsg/debian/patches/series
--- lcalc.orig/lcalc-1.23+dfsg/debian/patches/series 2014-05-18 22:01:55.817738552 -0500
+++ lcalc/lcalc-1.23+dfsg/debian/patches/series 2014-05-18 22:33:33.473696172 -0500
@@ -2,3 +2,4 @@
pari_2.7.patch
Makefile.patch
fix_pari_include.patch
+clang-ftbfs.diff
--- End Message ---