problem compiling sage (from at least 2.8.15 to 2.9.1.1)

1 view
Skip to first unread message

Francois

unread,
Dec 28, 2007, 3:47:28 AM12/28/07
to sage-devel
Hi all,

I have trouble compiling sage on my linux box which is as follow:
x86 (amd athlon - definitely not amd64)
distro is gentoo up to date as of last week. kernel 2.6.23, glibc
2.6.1
gcc-4.2.2, binutils-2.18.
The problem I have is in the compilation of sage itself more precisely
libcsage.

Here is the last message:
sage: Building and installing modified SAGE library files.


Installing c_lib
gcc -o src/convert.os -c -O2 -g -fPIC -I/home/francois/Work/Gentoo/
sage-2.9.1.1/local/include
-I/home/francois/Work/Gentoo/sage-2.9.1.1/local/include/python2.5 -I/
home/francois/Work/Gentoo/sage-2.9.1.1/local/include/NTL -Iinclude
src/convert.c
gcc -o
src/interrupt.os -c -O2 -g -fPIC -I/home/francois/Work/Gentoo/
sage-2.9.1.1/local/include -I/home/francois/Work/Gentoo/sage-2.9.1.1/
local/include/python2.5 -I/home/francois/Work/Gentoo/sage-2.9.1.1/
local/include/NTL -Iinclude
src/interrupt.c
gcc -o
src/mpn_pylong.os -c -O2 -g -fPIC -I/home/francois/Work/Gentoo/
sage-2.9.1.1/local/include -I/home/francois/Work/Gentoo/sage-2.9.1.1/
local/include/python2.5 -I/home/francois/Work/Gentoo/sage-2.9.1.1/
local/include/NTL -Iinclude
src/mpn_pylong.c
gcc -o
src/mpz_pylong.os -c -O2 -g -fPIC -I/home/francois/Work/Gentoo/
sage-2.9.1.1/local/include -I/home/francois/Work/Gentoo/sage-2.9.1.1/
local/include/python2.5 -I/home/francois/Work/Gentoo/sage-2.9.1.1/
local/include/NTL -Iinclude
src/mpz_pylong.c
gcc -o
src/stdsage.os -c -O2 -g -fPIC -I/home/francois/Work/Gentoo/
sage-2.9.1.1/local/include -I/home/francois/Work/Gentoo/sage-2.9.1.1/
local/include/python2.5 -I/home/francois/Work/Gentoo/sage-2.9.1.1/
local/include/NTL -Iinclude
src/stdsage.c
gcc -o
src/gmp_globals.os -c -O2 -g -fPIC -I/home/francois/Work/Gentoo/
sage-2.9.1.1/local/include -I/home/francois/Work/Gentoo/sage-2.9.1.1/
local/include/python2.5 -I/home/francois/Work/Gentoo/sage-2.9.1.1/
local/include/NTL -Iinclude
src/gmp_globals.c
g++ -o
src/ZZ_pylong.os -c -fPIC -I/home/francois/Work/Gentoo/sage-2.9.1.1/
local/include -I/home/francois/Work/Gentoo/sage-2.9.1.1/local/include/
python2.5 -I/home/francois/Work/Gentoo/sage-2.9.1.1/local/include/NTL -
Iinclude
src/ZZ_pylong.cpp
g++ -o
src/ntl_wrap.os -c -fPIC -I/home/francois/Work/Gentoo/sage-2.9.1.1/
local/include -I/home/francois/Work/Gentoo/sage-2.9.1.1/local/include/
python2.5 -I/home/francois/Work/Gentoo/sage-2.9.1.1/local/include/NTL -
Iinclude
src/ntl_wrap.cpp
ld -o libcsage.so -shared -no_archive src/convert.os src/interrupt.os
src/mpn_pylong.os src/mpz_pylong.os src/stdsage.os src/gmp_globals.os
src/ZZ_pylong.os
src/ntl_wrap.os -L/home/francois/Work/Gentoo/sage-2.9.1.1/local/lib -
lntl -lgmp -lpari
ld: cannot find -lpari
scons: *** [libcsage.so] Error 1

========================

I poked around a bit and the problem is not with pari. The problem
is the parameter "-no_archive". My version of ld from binutils-2.18
doesn't
support such an option. In fact if it did, it should be --no_archive
as it is
the option can be interpreted as -n -o _archive and if I try to issue
it
again I end up with a file called _archive and a message about
creating an
archive containing DT_TEXTREL symbols.

Removing the -no_archive gives a normal result. Unfortunately I don't
know how
to resume the compilation process correctly from there as scons behave
very
differently from make.

I don't where to patch things so that it doesn't happen in the first
place. I
cannot find anything about this parameter in the SConstruct file or
spkg-install. I don't know where to look from there.

Things did go normally with sage 2.8.12 the first I compiled, I first
had the
problem trying to compile 2.8.15 and ever since. I didn't try 2.8.13.
or .14.

Any idea?

Cheers from New Zealand,
Francois

mabshoff

unread,
Dec 28, 2007, 3:52:15 AM12/28/07
to sage-devel


On Dec 28, 9:47 am, Francois <fbis...@slingshot.co.nz> wrote:
> Hi all,
>
> I have trouble compiling sage on my linux box which is as follow:
> x86 (amd athlon - definitely not amd64)
> distro is gentoo up to date as of last week. kernel 2.6.23, glibc
> 2.6.1
> gcc-4.2.2, binutils-2.18.
> The problem I have is in the compilation of sage itself more precisely
> libcsage.
>
> Here is the last message:
> sage: Building and installing modified SAGE library files.
>
<SNIP>

>
> I poked around a bit and the problem is not with pari. The problem
> is the parameter "-no_archive". My version of ld from binutils-2.18
> doesn't
> support such an option. In fact if it did, it should be --no_archive
> as it is
> the option can be interpreted as -n -o _archive and if I try to issue
> it
> again I end up with a file called _archive and a message about
> creating an
> archive containing DT_TEXTREL symbols.
>
> Removing the -no_archive gives a normal result. Unfortunately I don't
> know how
> to resume the compilation process correctly from there as scons behave
> very
> differently from make.
>
> I don't where to patch things so that it doesn't happen in the first
> place. I
> cannot find anything about this parameter in the SConstruct file or
> spkg-install. I don't know where to look from there.

cd into devel/sage and execute "sage -b". That should continue the
build process.

> Things did go normally with sage 2.8.12 the first I compiled, I first
> had the
> problem trying to compile 2.8.15 and ever since. I didn't try 2.8.13.
> or .14.
>
> Any idea?

Thanks for the report. I will be looking into this.

> Cheers from New Zealand,
> Francois

Cheers,

Michael

mabshoff

unread,
Dec 28, 2007, 1:43:28 PM12/28/07
to sage-devel


On Dec 28, 9:47 am, Francois <fbis...@slingshot.co.nz> wrote:
> Hi all,
>
<SNIP>

Hello Francois,

> I poked around a bit and the problem is not with pari. The problem
> is the parameter "-no_archive". My version of ld from binutils-2.18
> doesn't
> support such an option. In fact if it did, it should be --no_archive
> as it is
> the option can be interpreted as -n -o _archive and if I try to issue
> it
> again I end up with a file called _archive and a message about
> creating an
> archive containing DT_TEXTREL symbols.
>
> Removing the -no_archive gives a normal result. Unfortunately I don't
> know how
> to resume the compilation process correctly from there as scons behave
> very
> differently from make.
>
> I don't where to patch things so that it doesn't happen in the first
> place. I
> cannot find anything about this parameter in the SConstruct file or
> spkg-install. I don't know where to look from there.
>
> Things did go normally with sage 2.8.12 the first I compiled, I first
> had the
> problem trying to compile 2.8.15 and ever since. I didn't try 2.8.13.
> or .14.
>
> Any idea?

I did poke around and there is no place in Sage that sets that flag.
Even a grep -r over a complete from source install does not yield any
hits. Since we import the current ENV into SCons is there any chance
it is in your ENV?

> Cheers from New Zealand,
> Francois

Cheers,

Michael

Francois

unread,
Dec 28, 2007, 2:36:01 PM12/28/07
to sage-devel
Hello Michael,

I think I found my problem. A little googling actually helped with
this link:
http://bugs.archlinux.org/task/6864
I did some experiments with the intel _fortran_ compiler (not even the
C compiler)
and I still have it on my system.
Since the intel compiler doesn't compile my lattice QCD code correctly
anyway
I will remove it and try again.
I am busy for the next few hours so I will do that a bit latter.

Thanks for looking,
Francois

mabshoff

unread,
Dec 28, 2007, 10:54:38 PM12/28/07
to sage-devel


On Dec 28, 8:36 pm, Francois <fbis...@slingshot.co.nz> wrote:
> Hello Michael,

Hello Francois,
This is actually something we can prevent on our end by forcing SCons
to use the GNU compilers instead of the Intel ones in case they are
present. I had to fix similar issues on Solaris when Sun's compilers
were installed and SCons picked those over gcc. Thanks for tracking
this down. This is now

http://trac.sagemath.org/sage_trac/ticket/1618

> Thanks for looking,
> Francois

Cheers,

Michael

François Bissey

unread,
Dec 29, 2007, 1:43:40 AM12/29/07
to sage-...@googlegroups.com
Nice! It was definitely ifc poisoning the build. libcsage builds fine now.

Thanks,
Francois

Reply all
Reply to author
Forward
0 new messages