GNU bug report logs - #76270
[PATCH 0/2] Add sage.

Previous Next

Package: guix-patches;

Reported by: Andreas Enge <andreas <at> enge.fr>

Date: Thu, 13 Feb 2025 15:19:02 UTC

Severity: normal

Tags: patch

Done: Andreas Enge <andreas <at> enge.fr>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 76270 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Enge <andreas <at> enge.fr>
To: 76270 <at> debbugs.gnu.org
Cc: vicvbcun <guix <at> ikherbers.com>, Guillaume Le Vaillant <glv <at> posteo.net>,
 Vinicius Monego <monego <at> posteo.net>,
 Sharlatan Hellseher <sharlatanus <at> gmail.com>
Subject: Add sage
Date: Thu, 13 Feb 2025 16:29:36 +0100
Hello!

The next two commits add SageMath as the package sage to Guix.

Sage uses maxima, but needs maxima compiled with the ecl common lisp
implementation, which I have added as a new package maxima-ecl in 
addition to our current maxima, which is compiled with sbcl.
Ideally, instead of adding this maxima-ecl, I would just have it
replace our current maxima - in this way, we would have only one
maxima package; both should have the same functionality anyway.
What do you think?

I have taken a lot of care to patch the scripts in the sage package so
that the references to external binaries become internal with the
complete paths /gnu/store/..., so that only few propagated inputs are
needed (essentially Python libraries).
From inside sage, you can run %singular, %maxima, %gp or %gap to shell
out to these external computer algebra systems.

In my home profile, the REPL obtained by typing "sage" fails to start,
due to some mysterious conflict between, I suppose, propagated python
inputs pulled in through other packages. I could work around this by
   ./pre-inst-env guix shell -C --pure sage
and then running "sage" in the Guix shell.
The jupyter notebook is directly functional running "sage -n".

There are definitely lots of optional packages that could be added
as inputs in later steps. In that case, I would suggest that for each
new input we come up with a sage command that fails with the current
setup and succeeds with the enhanced setup, so as to "prove" that the
added inputs are indeed taken into account. (As an example, in a previous
iteration, I already had gmp-ecm as an input, but upon inspection it turned
out that it was not actually used to factor numbers using ECM, and I had to
add the
              (substitute* "src/sage/env.py"
                (("\"ecm\"")
                 (string-append "\"" #$gmp-ecm "/bin/ecm\""))
lines to the package.)

So far, I have only tried to compile on x86_64, where it succeeds.

I would suggest to replace our sbcl maxima package by the ebcl one,
and to push sage to master.

What do you think?

Andreas





This bug report was last modified 149 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.