Hello, I am trying to compile sage-4.1.1 from source on a Gentoo Linux x86_64 system with the experimental gcc-4.5.0.
There are two issues, which are really the same problem. *** FIRST ISSUE *** gcc -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/local/src/sage-4.1.1/local/include/fplll -I/usr/local/src/sage-4.1.1/local//include -I/usr/local/src/sage-4.1.1/local//include/csage -I/usr/local/src/sage-4.1.1/devel//sage/sage/ext -I/usr/local/src/sage-4.1.1/local/include/python2.6 -c sage/libs/fplll/fplll.cpp -o build/temp.linux-x86_64-2.6/sage/libs/fplll/fplll.o cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++ In file included from /usr/local/src/sage-4.1.1/local//include/fplll/defs.h:36:0, from /usr/local/src/sage-4.1.1/local//include/fplll/util.h:29, from /usr/local/src/sage-4.1.1/local//include/fplll/fplll.h:33, from sage/libs/fplll/fplll.cpp:140: /usr/local/src/sage-4.1.1/local//include/fplll/dpe.h:74:20: error: new declaration 'double round(double)' /usr/include/bits/mathcalls.h:310:1: error: ambiguates old declaration 'double round(double)' /usr/local/src/sage-4.1.1/local//include/fplll/dpe.h:77:20: error: new declaration 'double trunc(double)' /usr/include/bits/mathcalls.h:314:1: error: ambiguates old declaration 'double trunc(double)' sage/libs/fplll/fplll.cpp:1959:65: warning: '__pyx_doc_4sage_4libs_5fplll_5fplll_6FP_LLL___new__' defined but not used sage/libs/fplll/fplll.cpp:2088:69: warning: '__pyx_doc_4sage_4libs_5fplll_5fplll_6FP_LLL___dealloc__' defined but not used error: command 'gcc' failed with exit status 1 sage: There was an error installing modified sage library code. This is not surprising, since local/include/fplll/dpe.h contains #ifndef round double round(double); #endif #ifndef trunc double trunc(double); #endif While /usr/include/bits/mathcalls.h declares round() as (using some macros): extern double round (double __x) throw () __attribute__ ((__const__)); *** SECOND ISSUE *** The second issue is that PARI/GP does not compile with g++-4.5.0. This has been fixed in the SVN version of PARI, I attach a backported patch for the version of PARI which sage uses. For more info, see http://pari.math.u-bordeaux.fr/archives/pari-dev-0909/msg00046.html Cheers, Jeroen. --~--~---------~--~----~------------~-------~--~----~ To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---
Only in sage-pari-new/src/config: has_alarm.c diff -u --recursive sage-pari-org/src/config/has_exp2.c sage-pari-new/src/config/has_exp2.c --- sage-pari-org/src/config/has_exp2.c 2004-05-06 00:51:18.000000000 +0200 +++ sage-pari-new/src/config/has_exp2.c 2009-09-16 14:18:48.000000000 +0200 @@ -1,3 +1,3 @@ #include <math.h> -char (*f)() = exp2; +double (*f)(double) = exp2; int main(){ return f != exp2; } diff -u --recursive sage-pari-org/src/config/has_log2.c sage-pari-new/src/config/has_log2.c --- sage-pari-org/src/config/has_log2.c 2004-05-06 00:51:18.000000000 +0200 +++ sage-pari-new/src/config/has_log2.c 2009-09-16 14:18:50.000000000 +0200 @@ -1,3 +1,3 @@ #include <math.h> -char (*f)() = log2; +double (*f)(double) = log2; int main(){ return f != log2; } Only in sage-pari-new/src/config: has_setsid.c diff -u --recursive sage-pari-org/src/src/headers/paricom.h sage-pari-new/src/src/headers/paricom.h --- sage-pari-org/src/src/headers/paricom.h 2006-09-09 23:39:28.000000000 +0200 +++ sage-pari-new/src/src/headers/paricom.h 2009-09-16 14:19:40.000000000 +0200 @@ -131,19 +131,11 @@ #ifndef HAS_EXP2 # undef exp2 -# ifdef __cplusplus - inline double exp2(double x) {return exp(x*LOG2);} -# else -# define exp2(x) (exp((double)(x)*LOG2)) -# endif +# define exp2(x) (exp((double)(x)*LOG2)) #endif #ifndef HAS_LOG2 # undef log2 -# ifdef __cplusplus - inline double log2(double x) {return log(x)/LOG2;} -# else -# define log2(x) (log((double)(x))/LOG2) -# endif +# define log2(x) (log((double)(x))/LOG2) #endif #ifdef min