Ask Your Question
1

make PB when installing from source

asked 2022-07-23 18:43:10 +0100

ortollj gravatar image

I tried to upgrade from SageMath 9.5 to 9.6 without success. because the code below generate error with 9.5:TypeError: unable to find a common ring for all elements

@interact
def _(v=('vector', input_grid(1, 3, default=[[1,2,3]], to_value=lambda x: vector(flatten(x))))):
    print(v.norm())

HI

WSL2,W11,Ubuntu 20.04

I wanted to keep the old version 9.5 which is in the sage directory,so I renamed sage to sage-9.5 and then rename the sage-9.6 directory to sage. the compilation time was much lower than usual, moreover the make does not signal an error. I had thought that maybe it was because I was using make -j32 ,so the compilation takes 30 minutes which is suspicious but I got the same PB with make alone which take 111 min only !.

real    111m46.476s
user    114m7.313s
sys     5m34.121s
Sage build/upgrade complete!
make[1]: Leaving directory '/home/ortollj/sage-9.6'

there are some messages in configure process

config.status: creating convenience symlink venv -> local/var/lib/sage/venv-python3.8
configure:

    notice: the following SPKGs did not find equivalent system packages:

          4ti2 coxeter3 gp2c igraph libsemigroups lrslib pari_elldata pari_galpol pari_nftables pari_seadata polymake _recommended

checking for the package system in use... debian
configure:

    hint: installing the following system packages, if not
    already present, may provide additional optional features:

      $ sudo apt-get update
      $ sudo apt-get install  4ti2 pari-gp2c libigraph-dev lrslib polymake libpolymake-dev default-jdk libavdevice-dev

configure:

    hint: After installation, re-run configure using:

      $ ./config.status --recheck && ./config.status

but when i run the recommended commands I got :0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

edit retag flag offensive close merge delete

Comments

I forgot to tell the message I got:

ortollj@DESKTOP-K30FLRP:~$ cd sage
ortollj@DESKTOP-K30FLRP:~/sage$ sage
************************************************************************
It seems that you are attempting to run Sage from an unpacked source
tarball, but you have not compiled it yet (or maybe the build has not
finished). You should run `make` in the Sage root directory first.
If you did not intend to build Sage from source, you should download
a binary tarball instead. Read README.txt for more information.
************************************************************************
ortollj gravatar imageortollj ( 2022-07-23 18:48:42 +0100 )edit

The code with interact still generate the same error in SageMath 9.6 in my computer than in 9.5 but this code in SageCell don't produce any error , why ?

when I type version() on sagecell I got:

'SageMath version 9.6, Release Date: 2022-05-15' same as mine.

@slelievre : do I have to open a new issue for this ?

ortollj gravatar imageortollj ( 2022-07-24 11:19:53 +0100 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2022-07-23 18:53:57 +0100

slelievre gravatar image

Renaming the directory where Sage is installed is not supported.

Instead, use symlinks.

For example, install Sage 9.5 and Sage 9.6 in ${HOME}/sage-9.5 and ${HOME}/sage-9.6, and run:

$ sudo ln -sf ${HOME}/sage-9.5/sage /usr/local/bin/sage95
$ sudo ln -sf ${HOME}/sage-9.6/sage /usr/local/bin/sage96
$ sudo ln -sf ${HOME}/sage-9.6/sage /usr/local/bin/sage

Then run sage or sage96 to run Sage 9.6, and run sage95 to run Sage 9.5.

edit flag offensive delete link more

Comments

Ok @slelievre I will try,

But it still seems to me that the duration of the MAKE command (30 min only) is suspect, right?

ortollj gravatar imageortollj ( 2022-07-23 19:18:15 +0100 )edit

Ooops, maybe that already having a complete sage directory makes the compiler believe to have already done part of the job?

ortollj gravatar imageortollj ( 2022-07-23 19:30:48 +0100 )edit

@slelievre :I just did the make -j32 , but I'm skeptical, the duration of the make seems way too short

[sagemath_doc_html-none] Build finished. The built documents can be found in /home/sage-9.6/local/share/doc/sage/html/en/thematic_tutorials
make[2]: Leaving directory '/home/sage-9.6/build/make'

real    25m47.719s
user    288m52.371s
sys     16m0.201s
Sage build/upgrade complete!
make[1]: Leaving directory '/home/sage-9.6'
ortollj@DESKTOP-K30FLRP:/home/sage-9.6$
ortollj gravatar imageortollj ( 2022-07-24 09:36:19 +0100 )edit

no it is ok ! ;-) thanks a lot @slelievre

ortollj@DESKTOP-K30FLRP:/$ ls
bin  boot  dev  etc  home  init  lib  lib32  lib64  libx32  lost+found  media  mnt  opt  proc  root  run  sbin  snap  srv  sys  tmp  usr  var
ortollj@DESKTOP-K30FLRP:/$ cd home
ortollj@DESKTOP-K30FLRP:/home$ ls
ortollj  sage-9.6
ortollj@DESKTOP-K30FLRP:/home$ cd sage-9.6
ortollj@DESKTOP-K30FLRP:/home/sage-9.6$ ./sage
┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 9.6, Release Date: 2022-05-15                     │
│ Using Python 3.8.10. Type "help()" for help.                       │
└────────────────────────────────────────────────────────────────────┘
sage:
ortollj gravatar imageortollj ( 2022-07-24 09:42:22 +0100 )edit

in addition to slelievre cmd:

sudo ln -sf ${HOME}/sage-9.6/sage /usr/local/bin/sage

I also had to modify at the end of .bashrc:

nano ~/.bashrc

alias sage=/home/sage-9.6/sage

nano ~/sage_nb.sh

#!/bin/bash
cd '/mnt/c/Documents and Settings/user/Mes documents/IPYNBpc'
/home/sage-9.6/sage --notebook jupyter

and now I just have to click on my SageMath W11 shortcut and all is ok

ortollj gravatar imageortollj ( 2022-07-24 11:07:26 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2022-07-23 18:43:10 +0100

Seen: 360 times

Last updated: Jul 23 '22