Error Building Sage With WSL

123 views
Skip to first unread message

Caleb Van't Land

unread,
Jan 23, 2025, 2:18:57 PM1/23/25
to sage-devel
Hello,

I'm attempting to build sage on my machine using WSL. My computer is running Windows 10, build 19045.5371.

I have attempted to follow the instructions at https://github.com/sagemath/sage/#readme, but the 'make' command is failing when it tries to build gap-4.13.1. I have attached the two logs files indicated by the error message.

I have tried running 'make distclean' then trying to build sage again. It does not appear to make any difference.

Thanks in advance for any help you can provide,
Caleb
config.log
gap-4.13.1.log

Dima Pasechnik

unread,
Jan 24, 2025, 8:48:31 AM1/24/25
to sage-...@googlegroups.com
How are you trying to install Sage. Using conda, or not?

If not, them you need to make sure your conda libraries are not interfering.
So you might need to deactivate the conda environments and make sure
PATH etc are not pointing anywhere
where parts of conda are installed.
> --
> You received this message because you are subscribed to the Google Groups "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/sage-devel/4ce82a2b-a516-4d4e-8790-de0e2e6ef526n%40googlegroups.com.

Caleb Van't Land

unread,
Jan 26, 2025, 7:19:56 PM1/26/25
to sage-devel
I was not trying to use conda, but I had previously used conda to install the user version of sage. I think you are correct that this was part of the problem, conda was active and parts of the PATH were pointing to locations associated with conda.

I have now deactivated conda and I ran the following command:
$ export PATH=/usr/sbin/:/sbin/:/bin/:/usr/lib/wsl/lib/
as suggested in step 8 of: https://github.com/sagemath/sage/#readme

Sage still does not build correctly. I think it's getting farther, Gap looks to have built correctly, but it's now failing to build lcalc-2.0.5.

I have attached the relevant log files.

Thank you for your help,
Caleb
config.log
lcalc-2.0.5.log

Dima Pasechnik

unread,
Jan 26, 2025, 11:56:35 PM1/26/25
to sage-...@googlegroups.com
your config.log says you have leftovers from the previous attempt to install, which was unsuccessful due to conda issues.

Please clean up by running

make distclean

and then start again with

./bootstrap
./configure
make

Caleb Van't Land

unread,
Jan 28, 2025, 8:41:09 AM1/28/25
to sage-devel
That worked and I was able to successfully build sage. 
Unfortunately it started failing again once I pulled the latest version (10.6.beta5).

Now ./configure is failing with the following error:
configure: error: found a good version of tar in /bin//tar, but it's not the first "tar" program in your PATH

I have tried running 'make distclean', it does not appear to make a difference.

Googling the error I found the following issue, which may be relevant:

I have attached config.log.
config.log

Caleb Van't Land

unread,
Jan 29, 2025, 9:31:22 AM1/29/25
to sage-devel
The problem solved itself, sage is now building correctly. I think rebooting my computer is probably what fixed things.

Thank you for all your help!

Dima Pasechnik

unread,
Jan 29, 2025, 9:31:56 AM1/29/25
to sage-...@googlegroups.com
On Tue, Jan 28, 2025 at 7:41 AM Caleb Van't Land
<caleb.v...@gmail.com> wrote:
>
> That worked and I was able to successfully build sage.
> Unfortunately it started failing again once I pulled the latest version (10.6.beta5).
>
> Now ./configure is failing with the following error:
> configure: error: found a good version of tar in /bin//tar, but it's not the first "tar" program in your PATH

this looks like your WSL environment has changed.

What is the output of

which tar

if you run this in the shell you build Sage in?
(and same for "which gtar")
> To view this discussion visit https://groups.google.com/d/msgid/sage-devel/868f86f8-abb8-4407-97ac-e364c26923e2n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages