Compiling Sage on Ubuntu 20.05

22 views
Skip to first unread message

Saksham

unread,
Feb 27, 2022, 12:08:36 PM2/27/22
to sage-support
Hi all, 

I have been trying to install sage 9.5 from source on Ubuntu. 

After running the following command i get an error.

CC=gcc-7 CXX=g++ FC=gfortran-7 ./configure

The error that i get is. 

configure: error:

    Given --with-system-gcc=force, but no system package could be used.
    That's an error.  Please install the indicated package to continue.
    (To override this error, use ./configure --without-system-gcc)

Does anyone have a solution for this ? (using -without-system-gcc does fix this error but why could system package not be used)

Thanks,
Saksham.

Thierry Dumont

unread,
Feb 27, 2022, 1:57:51 PM2/27/22
to sage-s...@googlegroups.com
You should start by installing "build-essential" and gfortran. To do
this you have to do:

sudo apt update
sudo apt install build-essential gfortran

sudo is mandatory (rivileged (root) access).

build-essential contains gcc and g++ compilers as well as some libraries
and tools, but not the fortran compiler (gfortran).

You will certainly have to install other tools and libraries. Follow
sage installation procedure, you will get the list of what too install.

Yours,
t.d.
> --
> You received this message because you are subscribed to the Google
> Groups "sage-support" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to sage-support...@googlegroups.com
> <mailto:sage-support...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sage-support/54776375-dc6c-46a5-91d8-ace3d5681ca0n%40googlegroups.com
> <https://groups.google.com/d/msgid/sage-support/54776375-dc6c-46a5-91d8-ace3d5681ca0n%40googlegroups.com?utm_medium=email&utm_source=footer>.

slelievre

unread,
Feb 27, 2022, 2:24:09 PM2/27/22
to sage-support
2022-02-27 13:08:36 UTC+1, Saksham:
>
> CC=gcc-7 CXX=g++ FC=gfortran-7 ./configure

What do the following give?
```
$ which gcc-7
$ which g++
$ which gfortran-7
$ gcc-7 --version
$ g++ --version
$ gfortran-7 --version
```

Eric Gourgoulhon

unread,
Feb 27, 2022, 9:19:05 PM2/27/22
to sage-support
A quick way to install Sage 9.5 from sources on Ubuntu 20.04 is decribed at
HTH.

Eric.
Reply all
Reply to author
Forward
0 new messages