periods.cc:593: error: call of overloaded `log(int)' is ambiguous

51 views
Skip to first unread message

karakas

unread,
Jul 22, 2008, 7:36:27 AM7/22/08
to sage-devel
Hello,

upon compiling of sage 3.0.5 I got this error:

######################################
periods.cc: In member function `void ldash1::init(const level*, const
std::vector<long int, std::allocator<long int> >&, long int, const
rational&)':
periods.cc:593: error: call of overloaded `log(int)' is ambiguous
/usr/include/bits/mathcalls.h:110: error: candidates are: double
log(double)
/usr/include/c++/3.3.5/cmath:419: error: long double
std::log(long double)
/usr/include/c++/3.3.5/cmath:411: error: float
std::log(float)
periods.cc: In constructor `lfchi::lfchi(const level*, const
newform*)':
periods.cc:635: error: call of overloaded `log(int)' is ambiguous
/usr/include/bits/mathcalls.h:110: error: candidates are: double
log(double)
/usr/include/c++/3.3.5/cmath:419: error: long double
std::log(long double)
/usr/include/c++/3.3.5/cmath:411: error: float
std::log(float)
periods.cc: In function `NTL::RR G(int, NTL::RR)':
periods.cc:975: error: call of overloaded `log(int)' is ambiguous
/usr/include/bits/mathcalls.h:110: error: candidates are: double
log(double)
/usr/include/c++/3.3.5/cmath:419: error: long double
std::log(long double)
/usr/include/c++/3.3.5/cmath:411: error: float
std::log(float)
make[3]: *** [periods_n.o] Error 1
make[3]: Leaving directory `/opt/sage-3.0.5/spkg/build/
eclib-20080310.p4/src/g0n'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/opt/sage-3.0.5/spkg/build/
eclib-20080310.p4/src'
Error building cremona

real 8m43.572s
user 6m51.700s
sys 0m17.700s
sage: An error occurred while installing eclib-20080310.p4
Please email sage-devel http://groups.google.com/group/sage-devel
explaining the problem and send the relevant part of
...
######################################

This is a Linux 2.4.31 SMP kernel with all bells and whistles.

Any suggestions?

Regards

Chris Karakas
http://www.karakas-online.de

William Stein

unread,
Jul 22, 2008, 8:12:07 AM7/22/08
to sage-...@googlegroups.com
What compiler, operating system, etc., are you using, etc.?

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

karakas

unread,
Jul 22, 2008, 9:07:58 AM7/22/08
to sage-devel
Here is part of install.log (I have set "XXXXXXXX" over more or less
sensitive, or boring information):


make[1]: Entering directory `XXXXXX/sage-3.0.5/spkg'
base/dir-0.1-install
../data/
../local/
../local/etc
../local/lib
../local/bin
../local/include
../tmp/
XXXXXX/spkg/build
installed/
base/prereq-0.3-install
Starting prerequisite check.
Machine: Linux XXXXXXXX 2.4.31 #11 SMP Sun Jul 10 00:53:34 CEST 2005
i686 i686 i386 GNU/Linux
found make
found perl
found m4
found ranlib
found tar
found gcc
prereq-0.3/
prereq-0.3/.hg/
prereq-0.3/.hg/00changelog.i
prereq-0.3/.hg/dirstate
prereq-0.3/.hg/requires
prereq-0.3/.hg/store/
prereq-0.3/.hg/store/00changelog.i
prereq-0.3/.hg/store/00manifest.i
prereq-0.3/.hg/store/data/
prereq-0.3/.hg/store/data/_makefile.in.i
prereq-0.3/.hg/store/data/autom4te.cache/
prereq-0.3/.hg/store/data/autom4te.cache/output.0.i
prereq-0.3/.hg/store/data/autom4te.cache/requests.i
prereq-0.3/.hg/store/data/autom4te.cache/traces.0.i
prereq-0.3/.hg/store/data/configure.ac.i
prereq-0.3/.hg/store/data/configure.i
prereq-0.3/.hg/store/undo
prereq-0.3/.hg/undo.dirstate
prereq-0.3/configure
prereq-0.3/configure.ac
prereq-0.3/Makefile.in
checking for g++... g++
checking for C++ compiler default output file name... a.out
checking whether the C++ compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for flex... flex
checking for yywrap in -lfl... yes
checking lex output file root... lex.yy
checking whether yytext is a pointer... yes
checking for bison... bison -y
checking for gcc... yes
checking for make... yes
checking for m4... yes
checking for perl... yes
checking for ranlib... yes
checking for bison... bison
checking for flex... flex
checking whether gcc is new enough... yes
configure: creating ./config.status
config.status: creating Makefile
All prerequisites appear to be present.
base/bzip2-1.0.4-install 2>&1
Decompressing bzip2
bzip2-1.0.4/
bzip2-1.0.4/libbz2.def
XXXXXXXXX

bzip2-1.0.4/README.XML.STUFF
make[2]: Entering directory `XXXXXX/spkg/build/bzip2-1.0.4'

If compilation produces errors, or a large number of warnings,
please read README.COMPILATION.PROBLEMS -- you might be able to
adjust the flags in this Makefile to improve matters.

Also in README.COMPILATION.PROBLEMS are some hints that may help
if your build produces an executable which is unable to correctly
handle so-called 'large files' -- files of size 2GB or more.

gcc -fPIC -c blocksort.c
gcc -fPIC -c huffman.c
gcc -fPIC -c crctable.c
gcc -fPIC -c randtable.c
gcc -fPIC -c compress.c
gcc -fPIC -c decompress.c
gcc -fPIC -c bzlib.c
rm -f libbz2.a
ar cq libbz2.a blocksort.o huffman.o crctable.o randtable.o compress.o
decompress.o bzlib.o
ranlib libbz2.a
gcc -fPIC -c bzip2.c
gcc -fPIC -o bzip2 bzip2.o -L. -lbz2
gcc -fPIC -c bzip2recover.c
gcc -fPIC -o bzip2recover bzip2recover.o

Doing 6 tests (3 compress, 3 uncompress) ...
If there's a problem, things might stop at this point.

./bzip2 -1 < sample1.ref > sample1.rb2
./bzip2 -2 < sample2.ref > sample2.rb2
./bzip2 -3 < sample3.ref > sample3.rb2
./bzip2 -d < sample1.bz2 > sample1.tst
./bzip2 -d < sample2.bz2 > sample2.tst
./bzip2 -ds < sample3.bz2 > sample3.tst
cmp sample1.bz2 sample1.rb2
cmp sample2.bz2 sample2.rb2
cmp sample3.bz2 sample3.rb2
cmp sample1.tst sample1.ref
cmp sample2.tst sample2.ref
cmp sample3.tst sample3.ref

If you got this far and the 'cmp's didn't complain, it looks
like you're in business.

To install in /usr/local/bin, /usr/local/lib, /usr/local/man and
/usr/local/include, type

make install

To install somewhere else, eg, /xxx/yyy/{bin,lib,man,include}, type

make install PREFIX=/xxx/yyy

If you are (justifiably) paranoid and want to see what 'make install'
is going to do, you can first do

make -n install or
make -n install PREFIX=/xxx/yyy respectively.

The -n instructs make to show the commands it would execute, but
not actually execute them.

Instructions for use are in the preformatted manual page, in the file
bzip2.txt. For more detailed documentation, read the full manual.
It is available in Postscript form (manual.ps), PDF form (manual.pdf),
and HTML form (manual.html).

You can also do "bzip2 --help" to see some helpful information.
"bzip2 -L" displays the software license.

XXXXXXXXXXXXXX long install output here XXXXXXXXXXXXXXXXXXXX


sage_scripts-3.0.5
Machine:
Linux XXXXXXXX 2.4.31 #11 SMP Sun Jul 10 00:53:34 CEST 2005 i686 i686
i386 GNU/Linux
Deleting directories from past builds of previous/current versions of
sage_scripts-3.0.5
Extracting package XXXXXXXX/spkg/standard/sage_scripts-3.0.5.spkg ...
-rw-r--r-- 1 1003 1003 640433 2008-07-11 20:52 XXXXXXX/
sage/spkg/standard/sage_scripts-3.0.5.spkg
sage_scripts-3.0.5/
sage_scripts-3.0.5/dsage_setup.py
sage_scripts-3.0.5/dsage_worker.py

XXXXXXXXXXXXXXXXX

Finished extraction
****************************************************
Host system
uname -a:
Linux XXXXXXXXXXXXXX 2.4.31 #11 SMP Sun Jul 10 00:53:34 CEST 2005
i686 i686 i386 GNU/Linux
****************************************************
****************************************************
GCC Version
gcc -v
Reading specs from /usr/lib/gcc-lib/i586-suse-linux/3.3.5/specs
Configured with: ../configure --enable-threads=posix --prefix=/usr --
with-local-prefix=/usr/local --infodir=/usr/share/info --mandir=/usr/
share/man --enable-languages=c,c++,f77,objc,java,ada --disable-
checking --libdir=/usr/lib --enable-libgcj --with-slibdir=/lib --with-
system-zlib --enable-shared --enable-__cxa_atexit i586-suse-linux
Thread model: posix
gcc version 3.3.5 20050117 (prerelease) (SUSE Linux)
****************************************************
cp: cannot stat `XXXXXXX/sage-python': No such file or directory
cp: cannot stat `XXXXXXX/ipython': No such file or directory
cp: cannot stat `XXXXXXX/matplotlibrc': No such file or directory

real 0m0.148s
user 0m0.030s
sys 0m0.040s
Successfully installed sage_scripts-3.0.5
Now cleaning up tmp files.

XXXXXXXXXXXX

...etc.etc.

mabshoff

unread,
Jul 22, 2008, 11:12:09 AM7/22/08
to sage-devel

On Jul 22, 6:07 am, karakas <ch...@karakas-online.de> wrote:

Hi,

> Here is part of install.log (I have set "XXXXXXXX" over more or less
> sensitive, or boring information):
>
> GCC Version
> gcc -v
> Reading specs from /usr/lib/gcc-lib/i586-suse-linux/3.3.5/specs
> Configured with: ../configure --enable-threads=posix --prefix=/usr --
> with-local-prefix=/usr/local --infodir=/usr/share/info --mandir=/usr/
> share/man --enable-languages=c,c++,f77,objc,java,ada --disable-
> checking --libdir=/usr/lib --enable-libgcj --with-slibdir=/lib --with-
> system-zlib --enable-shared --enable-__cxa_atexit i586-suse-linux
> Thread model: posix
> gcc version 3.3.5 20050117 (prerelease) (SUSE Linux)

You need at least gcc 3.4 or higher to build Sage since we require
c99. eclib itself does not need c99, but it is not supported to build
the current release with gcc 3.4 or earlier. We do have a gcc check,
but unfortunately that happens right before building FLINT which is
past eclib. The issue is known and in the bug tracker already and I
meant to take care of it, but had not had the time to do so. Sorry,
hopefully in Sage 3.1 this will be fixed so that Sage tells you
immediately that the compiler is not modern enough.

Cheers,

Michael

mabshoff

unread,
Jul 22, 2008, 11:49:08 AM7/22/08
to sage-devel


On Jul 22, 8:12 am, mabshoff <mabsh...@googlemail.com> wrote:
> On Jul 22, 6:07 am, karakas <ch...@karakas-online.de> wrote:
>
> Hi,
>
> > Here is part of install.log (I have set "XXXXXXXX" over more or less
> > sensitive, or boring information):
>
> > GCC Version
> > gcc -v
> > Reading specs from /usr/lib/gcc-lib/i586-suse-linux/3.3.5/specs
> > Configured with: ../configure --enable-threads=posix --prefix=/usr --
> > with-local-prefix=/usr/local --infodir=/usr/share/info --mandir=/usr/
> > share/man --enable-languages=c,c++,f77,objc,java,ada --disable-
> > checking --libdir=/usr/lib --enable-libgcj --with-slibdir=/lib --with-
> > system-zlib --enable-shared --enable-__cxa_atexit i586-suse-linux
> > Thread model: posix
> > gcc version 3.3.5 20050117 (prerelease) (SUSE Linux)
>
> You need at least gcc 3.4 or higher to build Sage since we require
> c99. eclib itself does not need c99, but it is not supported to build
> the current release with gcc 3.4 or earlier.

Oops, the above should obviously state *gcc 3.3 or earlier*. Sorry for
the mistake and the extra email.

> We do have a gcc check,
> but unfortunately that happens right before building FLINT which is
> past eclib. The issue is known and in the bug tracker already and I
> meant to take care of it, but had not had the time to do so. Sorry,
> hopefully in Sage 3.1 this will be fixed so that Sage tells you
> immediately that the compiler is not modern enough.
>
> Cheers,
>
> Michael

Cheers,

Michael

karakas

unread,
Jul 22, 2008, 1:18:25 PM7/22/08
to sage-devel
Thank you very much for the clear and fast answer. Since upgrading gcc
will probably mean an upgrading of glibc too, which will mean a
recompilation/upgrade of the whole system, I guess it is better to
postpone compilation until I finish my migration from SuSE to Gentoo
(which is going to take a *long* time anyway the way things move
(read: technology: fast, me: slow :-))).

mabshoff

unread,
Jul 22, 2008, 6:25:19 PM7/22/08
to sage-devel
On Jul 22, 10:18 am, karakas <ch...@karakas-online.de> wrote:

Hi Chris,

> Thank you very much for the clear and fast answer. Since upgrading gcc
> will probably mean an upgrading of glibc too, which will mean a
> recompilation/upgrade of the whole system,

gcc 3.4.6 or 4.0.2 (or is .3 the last one?) will likely build on your
box with the current glibc. Just make sure to enable c and c++ as
languages and install into some prefix like /usr/local/gcc-3.4.6. Then
prepend /usr/local/gcc-3.4.6/bin to PATH and /usr/local/gcc-3.4.6/lib
to LD_LIBRARY_PATH and do another clean Sage build from scratch.

> I guess it is better to
> postpone compilation until I finish my migration from SuSE to Gentoo
> (which is going to take a *long* time anyway the way things move
> (read: technology: fast, me: slow :-))).

Considering that the support for that SuSE release ended a while ago
that might be a good idea :)

Cheers,

Michael
Reply all
Reply to author
Forward
0 new messages