flint-3.5.0 interface

71 views
Skip to first unread message

Vincent Delecroix

unread,
May 9, 2026, 1:56:45 AM (11 days ago) May 9
to sage-devel
Dear all,

In https://github.com/sagemath/sage/pull/42146 I made an attempt to
make SageMath aware of all flint 3.5.0 features. One practical problem
that I am facing is that I develop in conda but conda does not ship
flint 3.5.0 yet. In particular, I am missing some header files. Is
there a workaround?

Best
Vincent

Tobia...@gmx.de

unread,
May 9, 2026, 4:30:12 AM (11 days ago) May 9
to sage-devel

Michael Orlitzky

unread,
May 13, 2026, 4:50:05 PM (6 days ago) May 13
to sage-...@googlegroups.com
In this case updating the conda package is the better solution, but in
general, you can use a hand-built library to build sage.

Flint ships a pkg-config file, so if you build your own copy of flint
with (say) --prefix=/home/videlec/flint-3.5.0 then you can look for
the flint.pc file it creates and put the containing directory in
PKG_CONFIG_PATH, something like

$ export PKG_CONFIG_PATH=/home/videlec/flint-3.5.0/lib/pkgconfig

After that, meson should find the flint.pc file, and will
automatically handle the -I and -L flags needed for the compiler and
linker. After the build, you'll also need to update your
LD_LIBRARY_PATH so that the operating system knows where to find the
flint libraries:

$ export LD_LIBRARY_PATH=$(pkg-config --variable=libdir flint)

For a package that does NOT shop a pkg-config file, the process is
mostly the same except you can skip PKG_CONFIG_PATH but in exchange
have to append -I and -L flags to your CPPFLAGS to tell the
compiler/linker where to find the headers and libraries.
Reply all
Reply to author
Forward
0 new messages