Bug#748898: lcalc: FTBFS with clang instead of gcc

2014-07-09 Thread Tobias Hansen
Thanks. I'll wait a bit to see with what they come up in
trac.sagemath.org/ticket/12437 . I think the default parameters will be
moved to the function declarations so it would be good to use the same
patches as Sage as I'm not sure if anything else breaks ABI compatibility.

Cheers,
Tobias Hansen

-- 
debian-science-maintainers mailing list
debian-science-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-science-maintainers


Bug#748898: lcalc: FTBFS with clang instead of gcc

2014-05-21 Thread Arthur Marble
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.0 -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
+   templatetypename _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_verbose3) 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::vectorComplex 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