Build problems with gcc-4.5.0

28 views
Skip to first unread message

Jeroen Demeyer

unread,
Sep 16, 2009, 8:45:33 AM9/16/09
to sage-...@googlegroups.com
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.
sage-pari.patch

William Stein

unread,
Sep 16, 2009, 1:29:31 PM9/16/09
to sage-...@googlegroups.com
On Wed, Sep 16, 2009 at 5:45 AM, Jeroen Demeyer <jdem...@cage.ugent.be> wrote:
> 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.

Are they the only two issues and other than those Sage builds?

Thanks greatly for working on this!!

William
--
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org

Jeroen Demeyer

unread,
Sep 16, 2009, 2:04:22 PM9/16/09
to sage-...@googlegroups.com
William Stein wrote:
> On Wed, Sep 16, 2009 at 5:45 AM, Jeroen Demeyer <jdem...@cage.ugent.be> wrote:
>> 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.
>
> Are they the only two issues and other than those Sage builds?

I'm not sure I understand what you mean, but after fixing these two
issues sage builds perfectly with gcc-4.5.0.

However: there is one important caveat. I use the environment variable
CC to set my compiler and not all packages honor this variable. At
least the following packages do not use $CC (I have not investigated
this issue deeply).
* cliquer-1.2
* flint-1.3.0.p2
* atlas-3.8.3.p7
* f2c-20070816.p1
* symmetrica-2.0.p4
* rubiks-20070912.p9
* ratpoints-2.1.2.p2
* zn_poly-0.9.p1

William Stein

unread,
Sep 16, 2009, 3:11:58 PM9/16/09
to sage-devel
2009/9/16 Jeroen Demeyer <jdem...@cage.ugent.be>:

>
> William Stein wrote:
>> On Wed, Sep 16, 2009 at 5:45 AM, Jeroen Demeyer <jdem...@cage.ugent.be> wrote:
>>> 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.
>>
>> Are they the only two issues and other than those Sage builds?
>
> I'm not sure I understand what you mean, but after fixing these two
> issues sage builds perfectly with gcc-4.5.0.

I meant to ask: "after fixing these two issues does sage builds
perfectly with gcc-4.5.0?" And indeed it does. Cool.

>
> However: there is one important caveat.  I use the environment variable
> CC to set my compiler and not all packages honor this variable.  At
> least the following packages do not use $CC (I have not investigated
> this issue deeply).
> * cliquer-1.2
> * flint-1.3.0.p2
> * atlas-3.8.3.p7
> * f2c-20070816.p1
> * symmetrica-2.0.p4
> * rubiks-20070912.p9
> * ratpoints-2.1.2.p2
> * zn_poly-0.9.p1
>

Thanks for listing these. If you patch any to accept CC, this would
be greatly appreciated!

William

Dr. David Kirkby

unread,
Sep 16, 2009, 3:21:50 PM9/16/09
to sage-...@googlegroups.com
Jeroen Demeyer wrote:

> However: there is one important caveat. I use the environment variable
> CC to set my compiler and not all packages honor this variable. At
> least the following packages do not use $CC (I have not investigated
> this issue deeply).
> * cliquer-1.2
> * flint-1.3.0.p2
> * atlas-3.8.3.p7
> * f2c-20070816.p1
> * symmetrica-2.0.p4
> * rubiks-20070912.p9
> * ratpoints-2.1.2.p2
> * zn_poly-0.9.p1

That is a useful list. We really need to find out all the packages which
ignore CC (or CXX, or SAGE_FORTRAN). Those that use SCons seem
particularly partial to use a random compiler - on Solaris, often using
a mix of GNU and Sun compilers.

Dan Drake

unread,
Sep 16, 2009, 7:08:10 PM9/16/09
to sage-...@googlegroups.com
On Wed, 16 Sep 2009 at 08:04PM +0200, Jeroen Demeyer wrote:
> However: there is one important caveat. I use the environment variable
> CC to set my compiler and not all packages honor this variable. At
> least the following packages do not use $CC (I have not investigated
> this issue deeply).
> * cliquer-1.2
> * flint-1.3.0.p2
> * atlas-3.8.3.p7
> * f2c-20070816.p1
> * symmetrica-2.0.p4
> * rubiks-20070912.p9
> * ratpoints-2.1.2.p2
> * zn_poly-0.9.p1

Some of these are known problems; see http://trac.sagemath.org/sage_trac/ticket/2999. I'll update that ticket with your list.

Dan

--
--- Dan Drake
----- http://mathsci.kaist.ac.kr/~drake
-------

signature.asc

Minh Nguyen

unread,
Sep 16, 2009, 7:15:39 PM9/16/09
to sage-...@googlegroups.com
Hi Jeroen,

On Thu, Sep 17, 2009 at 4:04 AM, Jeroen Demeyer <jdem...@cage.ugent.be> wrote:

<SNIP>

> However: there is one important caveat. I use the environment variable
> CC to set my compiler and not all packages honor this variable. At
> least the following packages do not use $CC (I have not investigated
> this issue deeply).
> * cliquer-1.2

There's an updated cliquer package that respects the CC environment
variable. See ticket #6681.

--
Regards
Minh Van Nguyen

Reply all
Reply to author
Forward
0 new messages