Arch Linux and Sage

49 views
Skip to first unread message

Josh

unread,
Nov 7, 2009, 8:21:36 PM11/7/09
to sage-support
So when attempting to run make I got this:

sage: An error occurred while installing sqlite-3.6.17
Please email sage-devel http://groups.google.com/group/sage-devel
explaining the problem and send the relevant part of
of /home/josh/Downloads/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
/home/josh/Downloads/sage-4.2/spkg/build/sqlite-3.6.17 and type
'make'.
Instead type "/home/josh/Downloads/sage-4.2/sage -sh"
in order to set all environment variables correctly, then cd to
/home/josh/Downloads/sage-4.2/spkg/build/sqlite-3.6.17
(When you are done debugging, you can type "exit" to leave the
subshell.)
make[1]: *** [installed/sqlite-3.6.17] Error 1
make[1]: Leaving directory `/home/josh/Downloads/sage-4.2/spkg'

real 0m0.774s
user 0m0.723s
sys 0m0.043s
Error building Sage.

I installed sqlite, is there still stuff that is wrong?

Tim Joseph Dumol

unread,
Nov 7, 2009, 8:54:40 PM11/7/09
to sage-s...@googlegroups.com
Hey Josh,

Currently, Sage does not build properly in Arch Linux. You may want to install the binary version at http://sagemath.org or at the Arch Linux AUR ( http://trac.sagemath.org/sage_trac/ticket/7408 ).

- Tim Joseph Dumol <tim (at) timdumol (dot) com>
http://timdumol.com

Josh

unread,
Nov 7, 2009, 11:39:45 PM11/7/09
to sage-support
Is there a reason why it does not compile well?

On Nov 7, 8:54 pm, Tim Joseph Dumol <t...@timdumol.com> wrote:
> Hey Josh,
>
> Currently, Sage does not build properly in Arch Linux. You may want to
> install the binary version athttp://sagemath.orgor at the Arch Linux AUR (http://trac.sagemath.org/sage_trac/ticket/7408).
>
> - Tim Joseph Dumol <tim (at) timdumol (dot) com>http://timdumol.com
>
> On Sun, Nov 8, 2009 at 9:21 AM, Josh <chaotixmonju...@gmail.com> wrote:
>
> > So when attempting to run make I got this:
>
> > sage: An error occurred while installing sqlite-3.6.17
> > Please email sage-develhttp://groups.google.com/group/sage-devel

Tim Joseph Dumol

unread,
Nov 7, 2009, 11:58:14 PM11/7/09
to sage-s...@googlegroups.com
The main issues are:

* Incompatible libreadline.so.6 -- the libreadline in Sage is dynamically linked to libtermcap. Arch Linux disables libtermcap, so one needs to copy the system's libreadline to $SAGE_ROOT/local/lib. This is also the case in binary distributions.
* Issue building R -- this is a problem in many platforms with up-to-date GCC packages, and is worked around by either copying the system's libgcc, or by building Sage with the environment vars SAGE_FORTRAN and SAGE_FORTRAN_LIB set to the system's gfortran and libgfortran.so.
* Build hangs while building libfplll, which is worked around by copying the system's libfplll, and editing the $SAGE_ROOT/local/installed/ to make the build system think that libfplll is installed.
* Finally, after the build is done, starting Sage or running the doctests fails with a message about a function in the Singular interface not being implemented. I do not know any workarounds to this.

Thus, it would probably be best to use the binary distribution for now.


- Tim Joseph Dumol <tim (at) timdumol (dot) com>
http://timdumol.com


William Stein

unread,
Nov 8, 2009, 12:06:36 AM11/8/09
to sage-s...@googlegroups.com
On Sat, Nov 7, 2009 at 8:58 PM, Tim Joseph Dumol <t...@timdumol.com> wrote:
> The main issues are:
>
> * Incompatible libreadline.so.6 -- the libreadline in Sage is dynamically
> linked to libtermcap. Arch Linux disables libtermcap, so one needs to copy
> the system's libreadline to $SAGE_ROOT/local/lib. This is also the case in
> binary distributions.

Maybe this could be fixed by not linking to termcap on archlinux.
This would just require changing the spkg-install.

> * Issue building R -- this is a problem in many platforms with up-to-date
> GCC packages, and is worked around by either copying the system's libgcc, or
> by building Sage with the environment vars SAGE_FORTRAN and SAGE_FORTRAN_LIB
> set to the system's gfortran and libgfortran.so.

We will switch to requiring gfortran by default soon. For now do

export SAGE_FORTRAN=/usr/bin/gfortran
export SAGE_FORTRAN_LIB="/usr/lib/libgfortran.so"

before building sage.

> * Build hangs while building libfplll, which is worked around by copying the
> system's libfplll, and editing the $SAGE_ROOT/local/installed/ to make the
> build system think that libfplll is installed.

I didn't see this at all.

> * Finally, after the build is done, starting Sage or running the doctests
> fails with a message about a function in the Singular interface not being
> implemented. I do not know any workarounds to this.

I didn't see this at all either.

>
> Thus, it would probably be best to use the binary distribution for now.
>

I've only built a 64-bit binary distribution, since I haven't setup a
32-bit archlinux box yet. I will, but not now, since it takes a
while (even given the 32-bit install Dan Drake gave me -- there's
still a lot of config work I have to do).

SUMMARY: I built the 64-bit binary. For me Sage starts fine and
*all* doctests pass (both normal and long), so I don't at all see the
Singular issues you mention. I also definitely didn't have any
trouble with libfplll. Is there really a system libfplll on your
system? That seems unlikely, given that it is such an incredibly
specialized library for a specific part of math.

Anyway, I want to emphasize that the officially supported Linux
distros for building Sage are:

Debian, Ubuntu, CentOS (=Redhat), Fedora Core, OpenSuse, Mandriva

It would be nice to add arch linux to the list, but we're not quite
there yet. I'm confident we will be soon.

William

-- William

Alex Ghitza

unread,
Nov 8, 2009, 12:13:30 AM11/8/09
to sage-s...@googlegroups.com

I've been building Sage on 32-bit Archlinux for at least one year now.

With 4.2, I only have two problems: the sqlite issue and the R issue.
Thanks to previous threads on this sort of thing, I work around them
by copying the system libreadline.so and libgcc.so to the appropriate
places in the sage build directory.

It's a bit annoying because as far as I can tell I have to wait for
sqlite to fail before copying libreadline, and then for R to fail
before copying libgcc. So the whole thing needs a bit too much of my
attention.

On the other hand, after that I have sage-4.2-goodness with longtests
passing. There are no problems with Singular on my system.


Best,
Alex


On Sat, Nov 07, 2009 at 09:06:36PM -0800, William Stein wrote:
>
> > * Build hangs while building libfplll, which is worked around by copying the
> > system's libfplll, and editing the $SAGE_ROOT/local/installed/ to make the
> > build system think that libfplll is installed.
>
> I didn't see this at all.
>
> > * Finally, after the build is done, starting Sage or running the doctests
> > fails with a message about a function in the Singular interface not being
> > implemented. I do not know any workarounds to this.
>
> I didn't see this at all either.
>

[...]

--
Alex Ghitza -- Lecturer in Mathematics -- The University of Melbourne
-- Australia -- http://www.ms.unimelb.edu.au/~aghitza/

William Stein

unread,
Nov 8, 2009, 12:17:22 AM11/8/09
to sage-s...@googlegroups.com
On Sat, Nov 7, 2009 at 9:13 PM, Alex Ghitza <agh...@gmail.com> wrote:
>
>
> I've been building Sage on 32-bit Archlinux for at least one year now.
>
> With 4.2, I only have two problems: the sqlite issue and the R issue.
> Thanks to previous threads on this sort of thing, I work around them
> by copying the system libreadline.so and libgcc.so to the appropriate
> places in the sage build directory.
>
> It's a bit annoying because as far as I can tell I have to wait for
> sqlite to fail before copying libreadline, and then for R to fail
> before copying libgcc.  So the whole thing needs a bit too much of my
> attention.

You should set SAGE_FORTRAN to completely avoid the R issue.

> On the other hand, after that I have sage-4.2-goodness with longtests
> passing.  There are no problems with Singular on my system.

Cool -- I'm glad the problem isn't 32-bit only (say).

-- William

Tim Joseph Dumol

unread,
Nov 8, 2009, 12:29:17 AM11/8/09
to sage-s...@googlegroups.com
I installed libfplll from the AUR, and copied it from the system. The libfplll build stopped while building "generate.Tpo", although gc1plus still consumed CPU time. I do not know why this was the case. As for the Singular thing, I have absolutely no idea. I'm on x86_64 Core 2 Duo E4500 2.2Ghz with 4GB RAM right now.

Perhaps I'll try reformatting my system sometime to see if it's a problem with the libraries on my system.


- Tim Joseph Dumol <tim (at) timdumol (dot) com>
http://timdumol.com


Josh

unread,
Nov 8, 2009, 6:33:29 PM11/8/09
to sage-support
What is your work around for the sqlite issue?

William Stein

unread,
Nov 8, 2009, 6:39:09 PM11/8/09
to sage-s...@googlegroups.com
On Sun, Nov 8, 2009 at 3:33 PM, Josh <chaotix...@gmail.com> wrote:
>
> What is your work around for the sqlite issue?

I don't know who you're asking, but for me it's to copy the
system-wide readline library into SAGE_ROOT/local/lib/, as you
suggested.

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

Josh

unread,
Nov 8, 2009, 6:55:59 PM11/8/09
to sage-support
I was wondering what I am suppose to do with libreadline to get it to
compile.

On Nov 8, 6:39 pm, William Stein <wst...@gmail.com> wrote:
> On Sun, Nov 8, 2009 at 3:33 PM, Josh <chaotixmonju...@gmail.com> wrote:
>
> > What is your work around for thesqliteissue?
>
> I don't know who you're asking, but for me it's to copy the
> system-wide readline library into SAGE_ROOT/local/lib/, as you
> suggested.
>
> William
>
>
>
> > On Nov 8, 12:13 am, Alex Ghitza <aghi...@gmail.com> wrote:
> >> I've been building Sage on 32-bit Archlinux for at least one year now.
>
> >> With 4.2, I only have two problems: thesqliteissue and the R issue.
> >> Thanks to previous threads on this sort of thing, I work around them
> >> by copying the system libreadline.so and libgcc.so to the appropriate
> >> places in the sage build directory.
>
> >> It's a bit annoying because as far as I can tell I have to wait for
> >>sqliteto fail before copying libreadline, and then for R to fail

William Stein

unread,
Nov 8, 2009, 6:57:12 PM11/8/09
to sage-s...@googlegroups.com
On Sun, Nov 8, 2009 at 3:55 PM, Josh <chaotix...@gmail.com> wrote:
>
> I was wondering what I am suppose to do with libreadline to get it to
> compile.

Quoting from Tim's email: "* Incompatible libreadline.so.6 -- the

Alex Ghitza

unread,
Nov 8, 2009, 7:00:21 PM11/8/09
to sage-s...@googlegroups.com

Yep. On my system, when I get the sqlite error, I type

cp /usr/lib/libreadline.so /opt/sage-4.2/local/lib/

and then make again.


Best,
Alex

Josh

unread,
Nov 9, 2009, 6:52:27 PM11/9/09
to sage-support
Thank you! This appears to have worked great!
I just haven't found any problems, so I'm assuming its great.

On Nov 8, 7:00 pm, Alex Ghitza <aghi...@gmail.com> wrote:
> On Sun, Nov 08, 2009 at 03:57:12PM -0800, William Stein wrote:
>

Alex Ghitza

unread,
Nov 9, 2009, 7:17:08 PM11/9/09
to sage-s...@googlegroups.com
On Mon, Nov 09, 2009 at 03:52:27PM -0800, Josh wrote:
>
> Thank you! This appears to have worked great!
> I just haven't found any problems, so I'm assuming its great.
>

There's a way to check this, if you want to be sure.

Go into the directory of your freshly-installed Sage, and type

make test

This runs most of the Sage test suite (it could take a while,
depending on your machine) and reports on failures. There is also a
longer version, unsurprisingly called

make testlong

which runs the whole test suite.

Dr. David Kirkby

unread,
Nov 9, 2009, 8:35:42 PM11/9/09
to sage-s...@googlegroups.com
William Stein wrote:

> We will switch to requiring gfortran by default soon. For now do
>
> export SAGE_FORTRAN=/usr/bin/gfortran
> export SAGE_FORTRAN_LIB="/usr/lib/libgfortran.so"

What happens if someone wants to use another compiler, other than GCC? I'm
thinking of Sun Studio of course.


dave

Josh

unread,
Nov 9, 2009, 8:49:40 PM11/9/09
to sage-support
I got the error when it attempted to compile R, 113 minutes into the
process. Is this why I would have had to copy libgcc.so to the
appropriate directory and if so, what directory?

Alex Ghitza

unread,
Nov 9, 2009, 9:03:21 PM11/9/09
to sage-s...@googlegroups.com
On Mon, Nov 09, 2009 at 05:49:40PM -0800, Josh wrote:
>
> I got the error when it attempted to compile R, 113 minutes into the
> process. Is this why I would have had to copy libgcc.so to the
> appropriate directory and if so, what directory?
>

Here is where you have two options:

1. As William wrote in a previous message, do

export SAGE_FORTRAN=/usr/bin/gfortran
export SAGE_FORTRAN_LIB="/usr/lib/libgfortran.so"

This assumes you have gfortran installed on your system. If not, do

pacman -S gcc-fortran

Now if you run "make" there should be no problems with R any more.
(Note that I haven't tried this option yet, but it should be the right
way to go. It also has the advantage that you can do it at the very
beginning, instead of having to wait until R fails.)

2. The other option (more of a hackish workaround) is to do

cp /usr/lib/libgcc_s.so /opt/sage-4.2/local/lib/gcc-lib/i686-pc-linux-gnu/4.0.3/

and try "make" again.

William Stein

unread,
Nov 10, 2009, 1:31:12 AM11/10/09
to sage-s...@googlegroups.com

Give the Fortran that works with that compiler instead of gfortran.
There's nothing GCC specific about the environment variables
SAGE_FORTRAN and SAGE_FORTRAN_LIB.

William

Dr. David Kirkby

unread,
Nov 10, 2009, 5:13:34 AM11/10/09
to sage-s...@googlegroups.com

OK,

I mis-understood your use of "requiring gfortran".


Dave

Tim Joseph Dumol

unread,
Nov 10, 2009, 5:31:20 AM11/10/09
to sage-s...@googlegroups.com
Just as an update, I've done the reformat and I still have the problem. I'm guessing there's something wrong with my system setup.


- Tim Joseph Dumol <tim (at) timdumol (dot) com>
http://timdumol.com


Reply all
Reply to author
Forward
0 new messages