Why using giac no longer works in sage 10.6?

192 views
Skip to first unread message

Nasser M. Abbasi

unread,
Jul 9, 2025, 8:19:50 PMJul 9
to sage-devel
I am on arch based system.  Installed sagemath using pacman. I no longer build from source.

Also installed giac latest using pacman. (same for Fricas and maxima)

But when from inside sagemath I do integrate(sin(x),x,algorithm="giac") it returns back the input.

Not sure why.

>which sage
/usr/bin/sage
>sage
──────────────┐
│ SageMath version 10.6, Release Date: 2025-03-31 │
│ Using Python 3.13.5. Type "help()" for help. │

sage: print(fricas.eval(")lisp |$build_version|"))

Value = "FriCAS 1.3.12"
sage: x=var('x')
sage: integrate(sin(x),x,algorithm="fricas")
-cos(x)

sage: integrate(sin(x),x,algorithm="giac")
integrate(sin(x), x)

sage: print(giac.version())
"giac 2.0.0, (c) B. Parisse and R. De Graeve, Institut Fourier, Universite Grenoble Alpes. Optimization, signalprocessing, graph theory (c) Luka Marohnić"

sage: print(maxima.version())
5.47.0

sage: integrate(sin(x),x,algorithm="maxima")
-cos(x)
sage:

giac is installed on Linux and works fine

>giac
Reading from cache /usr/share/giac/doc/en/
get_index_from_cache /usr/share/giac/doc/en/html_mtt OK
// Read 1243 entries from cache /usr/share/giac/doc/en/html_mtt
get_index_from_cache /usr/share/giac/doc/en/html_mall OK
// Read 1528 entries from cache /usr/share/giac/doc/en/html_mall
// Read 1057 entries from cache /usr/share/giac/doc/en/html_vall
Welcome to giac readline interface, version 2.0.0
(c) 2002,2023 B. Parisse & others


0>> integrate(sin(x),x)
-cos(x)
// Time 0
1>>

--- version info

>which giac
/usr/bin/giac
>giac --version
// Using locale /usr/share/locale/
// en_US.UTF-8
// /usr/share/locale/
// giac
// UTF-8
// Maximum number of parallel threads 10
// (c) 2001, 2021 B. Parisse & others
2.0.0
>
>yay -Qi giac
Name            : giac
Version         : 2.0.0.10-1
Description     : A free computer algebra system
Architecture    : x86_64
URL             : http://www-fourier.ujf-grenoble.fr/~parisse/giac.html
Licenses        : GPL-3.0-only
Groups          : None
Provides        : None
Depends On      : blas  cblas  curl  fltk  gcc-libs  glibc  glpk  gmp  gmp-ecm  gsl  lapack  libao  libglvnd  libpng  libsamplerate  libusb  mpfi  mpfr  nauty  ntl  pari  readline
                 zlib
Optional Deps   : perl: for pgiac [installed]
Required By     : None
Optional For    : None
Conflicts With  : None
Replaces        : None
Installed Size  : 272.00 MiB
Packager        : Antonio Rojas <aro...@archlinux.org>
Build Date      : Sat 05 Jul 2025 11:43:40 AM CDT
Install Date    : Wed 09 Jul 2025 06:01:25 PM CDT
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : Signature

>

>yay -Qi sagemath
Name            : sagemath
Version         : 10.6-6
Description     : Open Source Mathematics Software, free alternative to Magma, Maple, Mathematica, and Matlab
Architecture    : x86_64
URL             : http://www.sagemath.org
Licenses        : GPL-2.0-or-later
Groups          : None
Provides        : None
Depends On      : brial  cblas  cliquer  ecl  eclib  fflas-ffpack  flint  gap  gcc-libs  gd  gfan  givaro  glibc  glpk  gmp  gmp-ecm  gsl  iml  ipython  lcalc  libbraiding
                 libhomfly  libmpc  linbox  lrcalc  m4ri  m4rie  maxima-fas  mpfi  mpfr  nauty  ntl  palp  pari  pari-galdata  pari-seadata-small  planarity  python
                 python-conway-polynomials  python-cvxopt  python-cysignals  python-cypari2  python-docutils  python-fpylll  python-ipywidgets  python-matplotlib
                 python-memory-allocator  python-mpmath  python-networkx  python-numpy  python-pexpect  python-pillow  python-pplpy  python-primecountpy  python-pygments
                 python-pyparsing  python-requests  python-rpy2  python-scipy  python-sphinx  python-sympy  python-traitlets  rankwidth  sage-data-elliptic_curves
                 sage-data-graphs  sage-data-polytopes_db  singular  symmetrica  sympow  tachyon  threejs-sage
Optional Deps   : benzene: for generating fusenes and benzenoids
                 blas-openblas: faster linear algebra [installed]
                 bliss: bliss backend for graph theory
                 buckygen: for generating fullerene graphs
                 coin-or-csdp: for computing Lovász theta-function of graphs
                 coxeter: Coxeter groups implementation
                 cryptominisat: SAT solver
                 cython: to compile cython code
                 dot2tex: for displaying some diagrams
                 ffmpeg: to export animations to video [installed]
                 fricas: FriCAS interface [installed]
                 imagemagick: to show animations [installed]
                 jmol: alternative 3D plot engine
                 jupyter-jsmol: alternative 3D plot engine in the Jupyter notebook
                 lrs: Algorithms for linear reverse search used in game theory and for computing volume of polytopes
                 latte-integrale: integral point count in polyhedra
                 msolve: polynomial system solving via msolve
                 plantri: for generating some classes of graphs
                 python-cvxpy: interface for several convex optimization backends
                 python-database-cubic-hecke: cubic Hecke algebras
                 python-database-knotinfo: interface to the KnotInfo and LinkInfo databases
                 python-igraph: igraph backend for graph theory
                 python-jupymake: polymake backend for polyhedral computations
                 python-matroid-database: matroids database
                 python-phitigra: graph editor
                 python-pkgconfig: to compile cython code
                 python-pycosat: picosat SAT solver
                 python-pynormaliz: Normaliz backend for polyhedral computations
                 python-pyscipopt: SCIP mixed integer linear programming backend
                 rubiks: Rubiks cube algorithms
                 sage-data-cunningham_tables: list of prime numbers in the Cunningham table
                 sagemath-doc: HTML documentation
                 sagemath-giac: giac integration backend
                 shared_meataxe: faster matrix arithmetic over finite fields
                 sirocco: for computing the fundamental group of the complement of a plane curve
                 topcom: to compute triangulations of point configurations
Required By     : None
Optional For    : None
Conflicts With  : None
Replaces        : None
Installed Size  : 517.14 MiB
Packager        : Antonio Rojas <aro...@archlinux.org>
Build Date      : Thu 12 Jun 2025 03:27:33 PM CDT
Install Date    : Sun 29 Jun 2025 06:55:46 PM CDT
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : Signature

>

Any idea why giac integrate no longer works but Fricas and maxima work? (all installed using pacman).

Do I need to set something special?









Dima Pasechnik

unread,
Jul 9, 2025, 9:19:19 PMJul 9
to sage-...@googlegroups.com
This is an Arch-specific issue

Antonio Rojas

unread,
Jul 10, 2025, 2:46:52 AMJul 10
to sage-devel
Did you install the optional dependency that is listed in the output you posted?

Michael Orlitzky

unread,
Jul 10, 2025, 9:58:49 AMJul 10
to 'Nasser M. Abbasi' via sage-devel
On 2025-07-09 16:36:40, 'Nasser M. Abbasi' via sage-devel wrote:
> But when from inside sagemath I do integrate(sin(x),x,algorithm="giac") it
> returns back the input.
>
> Not sure why.

Giac was made optional recently. In the past (when giac was not
optional), the giac integrator would try to integrate your function
and then "do nothing" if it did not know how to do the integral. This
made sense because we would try several integration routines in a row:
maxima, sympy, and giac -- and we wanted to proceed to the next one
(rather than raising an error) if one engine could not do the
integral.

But now that giac is optional, I think it makes much more sense to
have the giac integrator throw an error telling you to install the
optional sagemath-giac component.

Georgi Guninski

unread,
Jul 11, 2025, 10:08:22 AMJul 11
to sage-...@googlegroups.com
FYI the following fails on 10.6 and https://sagecell.sagemath.org/

print(giac.version())
K.<X,Y>=QQ[];I=Ideal([X+Y,X*Y])
I2=I.elimination_ideal(X,algorithm="giac");I2 #fails with exception

"giac 1.9.0, (c)
ModuleNotFoundError: No module named 'sagemath_giac'

Dima Pasechnik

unread,
Jul 11, 2025, 11:32:02 AMJul 11
to sage-...@googlegroups.com
I reported this on their github repo sagemath/sagecell

They also have a dedicated Google Group, for which this would be a better place to report

Michael Orlitzky

unread,
Jul 11, 2025, 6:06:30 PMJul 11
to sage-...@googlegroups.com
On 2025-07-10 09:58:43, Michael Orlitzky wrote:
> But now that giac is optional, I think it makes much more sense to
> have the giac integrator throw an error telling you to install the
> optional sagemath-giac component.

Working on this at,

https://github.com/sagemath/sage/pull/40405

Giac is still in (the middle of) the default list of integrators, so
we don't want to raise a FeatureNotPresentError every time the
integrator is invoked[0]. Instead I've removed "giac" from the
algorithm list when sagemath-giac is not installed. This will lead to
an "Unknown algorithm" instead.

The docs have also been updated to explain that sagemath-giac is
required for algorithm="giac" to work.


[0] The benefit of this is that giac will automatically be tried as an
integrator as soon as you install sagemath-giac. So while there is
some inconsistency with e.g. FriCAS now, I think we should make those
like this and not this like those.

Georgi Guninski

unread,
Jul 12, 2025, 6:41:05 AMJul 12
to sage-...@googlegroups.com
On Fri, Jul 11, 2025 at 6:32 PM Dima Pasechnik <dim...@gmail.com> wrote:
>
> I reported this on their github repo sagemath/sagecell
>
> They also have a dedicated Google Group, for which this would be a better place to report
>

On this testcase, both sagecell and sage 10.6 built from source on
Fedora 41 with system giac give the same output, so they both are
equally correct or equally incorrect.

Michael Orlitzky

unread,
Jul 12, 2025, 7:58:07 AMJul 12
to sage-...@googlegroups.com
On 2025-07-12 13:40:19, Georgi Guninski wrote:
>
> On this testcase, both sagecell and sage 10.6 built from source on
> Fedora 41 with system giac give the same output, so they both are
> equally correct or equally incorrect.
>

The output is correct, although again it would be better if it told
you to install sagemath-giac somewhere.

The difference between a local installation and sagecell is that, with
a local install, you can actually install sagemath-giac, and with the
sagecell, you can't. So it's a sagecell bug in the sense that they
would have to be the ones to install the new optional package.

Nasser M. Abbasi

unread,
Jul 12, 2025, 9:38:49 AMJul 12
to sage-devel
Fyi after doing

sudo pacman -Sy sagemath-giac

Now it works.

>which sage
/usr/bin/sage
>which giac
/usr/bin/giac
>sage
┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 10.6, Release Date: 2025-03-31                    │
│ Using Python 3.13.5. Type "help()" for help.                       │
└────────────────────────────────────────────────────────────────────┘
sage: print(giac.version())
"giac 2.0.0, (c) B. Parisse and R. De Graeve, Institut Fourier, Universite Grenoble Alpes. Optimization, signalprocessing, graph theory
(c) Luka Marohnić"
sage: var('x')
x
sage: integrate(sin(x),x,algorithm="giac")
-cos(x)


--Nasser

Dima Pasechnik

unread,
Jul 12, 2025, 12:09:38 PMJul 12
to sage-...@googlegroups.com
the point is that sagemath_giac is an optional package, it is not built/installed by default
Reply all
Reply to author
Forward
0 new messages