Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to correctly setup sagemath to use external CAS system?

I think sagemath handling of using external CAS system is not too clear.

I installed sagemath 9.6 beta 7. It comes with OLD maxima and old GIAC CAS systems.

So I downloaded maxima and giac directly from their websites and build them from sources and installed them. They go to /usr/local/bin

>which maxima
/usr/local/bin/maxima

>maxima --version
Maxima 5.45.1

>which giac
/usr/local/bin/giac

>giac --version
// Maximum number of parallel threads 24
// (c) 2001, 2021 B. Parisse & others
1.7.0
>

The versions that come with sagemath sources tar file are older.

Maxima is 5.45.0 and giac is 1.6.0.47p3. These are old.

The problem is that there is no option in ./configureur to tell it _not_ to include or build these old versions so that a user can use the newer versions in /usr/local/bin

Each time I install sagemath I have to go to its $SAGE_ROOT/local/bin and manually delete maxima and giac and make symbolic link to the ones in my /usr/local/bin so I can use these from sagemath.

>cd $SAGE_ROOT/local/bin
>ls -l maxima
lrwxrwxrwx 1 me me 21 Apr  7 12:16 maxima -> /usr/local/bin/maxima
>ls -l giac
lrwxrwxrwx 1 me me 19 Apr  7 12:17 giac -> /usr/local/bin/giac
>

The only problem doing it this way, is that sagemath ver command still thinks it is using the old maxima and giac I deleted, only in terms of displaying the version numbers

>sage
┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 9.6.beta7, Release Date: 2022-04-02               │
│ Using Python 3.10.3. Type "help()" for help.                       │
└────────────────────────────────────────────────────────────────────┘

sage: ver = installed_packages()
sage: ver['maxima']
'5.45.0.p0'
sage: ver['giac']
'1.6.0.47p3'

sage:  print(maxima.version())
WARNING: Maxima is unable to set up the help system.
(Details: CL-INFO::LOAD-PRIMARY-INDEX: Couldn't load
                                       "/mnt/g/nabbasi/data/CDROM/sagemath/sage-9.6.beta7/local/info/./maxima-index.lisp":
                                       file does not exist.)

5.45.1

 sage: print(giac.version())
"giac 1.7.0, (c) B. Parisse and R. De Graeve, Institut Fourier, Universite de Grenoble I"
sage:

So I can just use print(giac.version()) and not use ver['giac'] from now on to get the correct version number.

I just think this whole issue needs better design.

Why not allow users when doing ./configure the ability to _not_ install CAS systems they already have on their system. This will solve all this confusion. I see that one can do this with fricas (it is not on by default, and to install it, one must do ./configure --enable-fricas to install. But not for maxima and not for giac. Why?

Now, I see no option to do this.

Is there a better way to do this?

How to correctly setup sagemath to use external CAS system?

I think sagemath handling of using external CAS system is not too clear.

I installed sagemath 9.6 beta 7. It comes with OLD maxima and old GIAC CAS systems.

So I downloaded maxima and giac directly from their websites and build them from sources and installed them. They go to /usr/local/bin

>which maxima
/usr/local/bin/maxima

>maxima --version
Maxima 5.45.1

>which giac
/usr/local/bin/giac

>giac --version
// Maximum number of parallel threads 24
// (c) 2001, 2021 B. Parisse & others
1.7.0
>

The versions that come with sagemath sources tar file are older.

Maxima is 5.45.0 and giac is 1.6.0.47p3. These are old.

The problem is that there is no option in ./configureur./configure to tell it _not_ to include or build these old versions so that a user can use the newer versions in /usr/local/bin

Each time I install sagemath I have to go to its $SAGE_ROOT/local/bin and manually delete maxima and giac and make symbolic link links to the ones I want to actually use in my /usr/local/bin so I can use these from sagemath.

>cd $SAGE_ROOT/local/bin
>ls -l maxima
lrwxrwxrwx 1 me me 21 Apr  7 12:16 maxima -> /usr/local/bin/maxima
>ls -l giac
lrwxrwxrwx 1 me me 19 Apr  7 12:17 giac -> /usr/local/bin/giac
>

The only problem doing it this way, is that sagemath ver command still thinks it is using the old maxima and giac I deleted, only in terms of displaying the version numbers

>sage
┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 9.6.beta7, Release Date: 2022-04-02               │
│ Using Python 3.10.3. Type "help()" for help.                       │
└────────────────────────────────────────────────────────────────────┘

sage: ver = installed_packages()
sage: ver['maxima']
'5.45.0.p0'
sage: ver['giac']
'1.6.0.47p3'

sage:  print(maxima.version())
WARNING: Maxima is unable to set up the help system.
(Details: CL-INFO::LOAD-PRIMARY-INDEX: Couldn't load
                                       "/mnt/g/nabbasi/data/CDROM/sagemath/sage-9.6.beta7/local/info/./maxima-index.lisp":
                                       file does not exist.)

5.45.1

 sage: print(giac.version())
"giac 1.7.0, (c) B. Parisse and R. De Graeve, Institut Fourier, Universite de Grenoble I"
sage:

So I can just use print(giac.version()) and not use ver['giac'] from now on to get the correct version number.

I just think this whole issue needs better design.

Why not allow users when doing ./configure the ability to _not_ install CAS systems they already have on their system. This will solve all this confusion. I see that one can do this with fricas (it is not on by default, and to install it, one must do ./configure --enable-fricas to install. But not for maxima and not for giac. Why?

Now, I see no option to do this.

Is there a better way to do all of this?