error compiling sage-4.2 from source

0 views
Skip to first unread message

Francis (Grizzly) Smit

unread,
Nov 6, 2009, 10:09:04 AM11/6/09
to sage-...@googlegroups.com
I type make and after much success it come to this:


building package 'base'
make[6]: Entering directory
`/usr/local/lib/sage-4.2/spkg/build/r-2.9.2/src/src/library/base'
mkdir -p -- ../../../library/base/demo
mkdir -p -- ../../../library/base/po
mkdir -p -- ../../../library/base/man
make[6]: Leaving directory
`/usr/local/lib/sage-4.2/spkg/build/r-2.9.2/src/src/library/base'
/usr/local/lib/sage-4.2/spkg/build/r-2.9.2/src/bin/exec/R:
/usr/local/lib/sage-4.2/local/lib/gcc-lib/i686-pc-linux-gnu/4.0.3/libgcc_s.so.1:
version `GCC_4.2.0' not found (required by /usr/lib/libstdc++.so.6)
make[5]: *** [all] Error 1
make[5]: Leaving directory
`/usr/local/lib/sage-4.2/spkg/build/r-2.9.2/src/src/library/base'
make[4]: *** [R] Error 1
make[4]: Leaving directory
`/usr/local/lib/sage-4.2/spkg/build/r-2.9.2/src/src/library'
make[3]: *** [R] Error 1
make[3]: Leaving directory
`/usr/local/lib/sage-4.2/spkg/build/r-2.9.2/src/src'
make[2]: *** [R] Error 1
make[2]: Leaving directory `/usr/local/lib/sage-4.2/spkg/build/r-2.9.2/src'
Error building R.

real 3m49.903s
user 2m4.240s
sys 0m52.419s
sage: An error occurred while installing r-2.9.2
Please email sage-devel http://groups.google.com/group/sage-devel
explaining the problem and send the relevant part of
of /usr/local/lib/sage-4.2/install.log. Describe your computer,
operating system, etc.
If you want to try to fix the problem yourself, *don't* just cd to
/usr/local/lib/sage-4.2/spkg/build/r-2.9.2 and type 'make'.
Instead type "/usr/local/lib/sage-4.2/sage -sh"
in order to set all environment variables correctly, then cd to
/usr/local/lib/sage-4.2/spkg/build/r-2.9.2
(When you are done debugging, you can type "exit" to leave the
subshell.)
make[1]: *** [installed/r-2.9.2] Error 1
make[1]: Leaving directory `/usr/local/lib/sage-4.2/spkg'

real 4m13.172s
user 2m18.193s
sys 0m53.587s
Error building Sage.

any help would be welcome

Pat LeSmithe

unread,
Nov 6, 2009, 10:14:25 AM11/6/09
to sage-...@googlegroups.com
On 11/06/2009 07:09 AM, Francis (Grizzly) Smit wrote:
> I type make and after much success it come to this:
> `/usr/local/lib/sage-4.2/spkg/build/r-2.9.2/src/src/library/base'
> /usr/local/lib/sage-4.2/spkg/build/r-2.9.2/src/bin/exec/R:
> /usr/local/lib/sage-4.2/local/lib/gcc-lib/i686-pc-linux-gnu/4.0.3/libgcc_s.so.1:
> version `GCC_4.2.0' not found (required by /usr/lib/libstdc++.so.6)

A possible workaround [1]:

Try copying/linking the system's libgcc_s.so.1 to

SAGE_ROOT/local/lib/gcc-lib/x86_64-unknown-linux-gnu/4.0.3/libgcc_s.so

and running "make" again. This worked for me even though "gcc -v"
reports a different version.


[1]
http://groups.google.com/group/sage-devel/browse_thread/thread/951e94279937dea7/079555dbfae650cc?#079555dbfae650cc

William Stein

unread,
Nov 6, 2009, 10:23:17 AM11/6/09
to sage-...@googlegroups.com
Hi,

I vote for removing FORTRAN for Linux for the next Sage release. Thoughts?
That would solve this problem at its core, shrink the Sage source
tarball a lot, and also result in better, more consistent, faster
fortran-related code in Sage.

When we included fortran in Sage in 2007, it was because Fortran
wasn't in the GCC's that everybody used. Now-a-days Fortran is trivial
to install on any Linux distribution.

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

Martin Albrecht

unread,
Nov 6, 2009, 10:41:52 AM11/6/09
to sage-...@googlegroups.com
> I vote for removing FORTRAN for Linux for the next Sage release. Thoughts?
> That would solve this problem at its core, shrink the Sage source
> tarball a lot, and also result in better, more consistent, faster
> fortran-related code in Sage.

+1 although my vote shouldn't count 100% because I essentially never use
Fortran, i.e. I don't care about subtle issues that might arise.

Martin

--
name: Martin Albrecht
_pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99
_otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF
_www: http://www.informatik.uni-bremen.de/~malb
_jab: martinr...@jabber.ccc.de

Robert Bradshaw

unread,
Nov 6, 2009, 12:47:15 PM11/6/09
to sage-...@googlegroups.com
On Nov 6, 2009, at 7:23 AM, William Stein wrote:

> Hi,
>
> I vote for removing FORTRAN for Linux for the next Sage release.
> Thoughts?
> That would solve this problem at its core, shrink the Sage source
> tarball a lot, and also result in better, more consistent, faster
> fortran-related code in Sage.
>
> When we included fortran in Sage in 2007, it was because Fortran
> wasn't in the GCC's that everybody used. Now-a-days Fortran is trivial
> to install on any Linux distribution.

So you we would be adding fortran as a dependancy on linux? If most
people have it (and its easy to check for) I'm +1 for this idea.

- Robert


William Stein

unread,
Nov 6, 2009, 2:36:24 PM11/6/09
to sage-...@googlegroups.com

Yes, definitely. The preqreq script would be changed to require
gfortran on *all* platforms except OS X, since Fortran isn't included
in Xcode so is a pain to require there.

William

Francis (Grizzly) Smit

unread,
Nov 6, 2009, 2:49:38 PM11/6/09
to sage-...@googlegroups.com
ok tried copying system libgcc_s.so.1 to:
SAGE_ROOT/local/lib/gcc-lib/i686-pc-linux-gnu/4.0.3/libgcc_s.so.1

as I am not on the x86_64 architecture, so far so good it's past that
error,
ah done so now it's just test time thankyou very much one and all
> >
>

Dan Drake

unread,
Nov 6, 2009, 7:45:07 PM11/6/09
to sage-...@googlegroups.com
On Fri, 06 Nov 2009 at 07:23AM -0800, William Stein wrote:
> I vote for removing FORTRAN for Linux for the next Sage release.
> Thoughts? That would solve this problem at its core, shrink the Sage
> source tarball a lot, and also result in better, more consistent,
> faster fortran-related code in Sage.
>
> When we included fortran in Sage in 2007, it was because Fortran
> wasn't in the GCC's that everybody used. Now-a-days Fortran is trivial
> to install on any Linux distribution.

This sounds fine, but I'd like to see a way to test this. Can someone
make a "4.2-nofortran" version of Sage with instructions on what Fortran
package to install? Performance regressions and doctest failures seem
very unlikely, but it's best to find out for sure.

Dan

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

signature.asc

François Bissey

unread,
Nov 6, 2009, 9:18:35 PM11/6/09
to sage-...@googlegroups.com
Well, we can already build sage with another fortran compiler by setting
SAGE_FORTRAN and for the unlucky one the LIB variable as well.
I was bitten by that problem as well using gcc-4.4.2 and I am currently
attempting a new build with gfortran.
Speaking of FORTRAN is f2c really necessary? numpy and scipy depend
on it but I am not sure how they depend on it but it looks to me like they
could be build with just gfortran.

Francois

Georg S. Weber

unread,
Nov 7, 2009, 5:49:14 AM11/7/09
to sage-devel

> Yes, definitely.  The preqreq script would be changed to require
> gfortran on *all* platforms except OS X, since Fortran isn't included
> in Xcode so is a pain to require there.
>
> William

Hi William,
I just skipped over the Mac OS X "tools" page from the R project:

http://r.research.att.com/tools/

and I from what I read there, I agree that we should continue to ship
the fortran.spkg with the Sage versions for Mac OS X. Apart from that,
I am "+1" to removing the fortran.spkg, and rely on a Fortran compiler
as an "external" dependency, just as currently with the C/C++ compiler
to be used.

Cheers,
Georg
Reply all
Reply to author
Forward
0 new messages