build error of sage 10.9.beta4 with pip in conda with environment-3.13-linux.yml

72 views
Skip to first unread message

Vincent Delecroix

unread,
Jan 28, 2026, 5:54:15 PM (2 days ago) Jan 28
to sage-devel
Hello,

In a clone of 10.9.beta4, I created a fresh conda environment

$ micromamba env create --file environment-3.13-linux.yml --name sage-dev

activated it

$ micromamba activate sage-dev

and tried to build sage in it

(sage-dev)$ pip install --no-build-isolation --editable .

but it failed at Cython compilation (see attached file).

Any idea on how to solve it?

Best
Vincent
sage-pip-build-error.log

Dima Pasechnik

unread,
Jan 28, 2026, 6:18:15 PM (2 days ago) Jan 28
to sage-...@googlegroups.com, Vincent Delecroix
On Wed, Jan 28, 2026 at 4:54 PM Vincent Delecroix
there is an NTL/flint error, did you notice?
Apperently Conda's NTL is non-TLS?

/home/vincent/micromamba/envs/sage-dev/bin/../libexec/gcc/x86_64-conda-linux-gnu/14.3.0/ld:
_ZN3NTL8zz_pInfoE: TLS reference in src/sage/
libs/linbox/linbox_flint_interface.cpython-313-x86_64-linux-gnu.so.p/meson-generated_src_sage_libs_linbox_linbox_flint_interface.pyx.cpp.o
mism
atches non-TLS definition in
/home/vincent/micromamba/envs/sage-dev/lib/libntl.so section .bss
/home/vincent/micromamba/envs/sage-dev/bin/../libexec/gcc/x86_64-conda-linux-gnu/14.3.0/ld:
/home/vincent/micromamba/envs/sage-dev/lib/li
bntl.so: error adding symbols: bad value
collect2: error: ld returned 1 exit status

>
> Best
> Vincent
>
> --
> 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/CAGEwAAkmeAnmGrzWMjT58-97Ow1kT-8wY_aqKqSV5DGrxkGKWg%40mail.gmail.com.

Vincent Delecroix

unread,
Jan 29, 2026, 4:22:25 AM (2 days ago) Jan 29
to Dima Pasechnik, sage-...@googlegroups.com
With Julian at sage days 130 we noticed other fishy things happening

1) (minor) cmake was not installed in the conda environment

2) (problematic but probably not critical) both system cmake and conda
cmake thinks that my blas and cblas are better from the system

$ micromamba activate sage-dev
(sage-dev) $ cmake --find-package -DNAME=CBLAS -DCOMPILER_ID=GNU
-DLANGUAGE=CXX -DMODE=LINK
/usr/lib/libcblas.so.3.12.0 /usr/lib/libblas.so.3.12.0

julian...@fsfe.org

unread,
Jan 29, 2026, 7:31:25 AM (2 days ago) Jan 29
to sage-devel
Since I'm also on ArchLinux, I have the same issue. I found that I can fix things if I manually patch out `-I /usr/include` in the generated jinja.build file.
It seems that this causes trouble because ArchLinux's NTL/config.h has #define NTL_THREADS which conda-forge's does not have.

So, the include paths I see in the ninja file always have this shape:

-Isrc/sage/... and -I../../src/sage/...
-Ipath-to-conda-env/lib/python3.12/site-packages/cypari2
-Ipath-to-conda-env/lib/python3.12/site-packages/cysignals
-Ipath-to-conda-env/include/python3.12
-I/usr/include
-Ipath-to-conda-env/include
and then some more conda paths

So why is /usr/include coming before the conda paths? I don't see this anywhere in my environment variables.

It might actually be related to the cmake bits you posted earlier. If you ask cmake for cblas compiler switches it reports /usr/include. Is that somehow invoked in the setup? I don't really understands how the ninja build file is generated but if somebody can point me to the correct place, I am happy to provide a PR for this.

julian

julian...@fsfe.org

unread,
Jan 29, 2026, 8:56:28 AM (2 days ago) Jan 29
to sage-devel
Installing blas-devel should fix it but I cannot try it out because the internet connection at SageDays 130 does not cooperate.
Let's continue this on GitHub: https://github.com/sagemath/sage/issues/41555

Dima Pasechnik

unread,
Jan 29, 2026, 8:58:52 AM (2 days ago) Jan 29
to sage-...@googlegroups.com
ninja.build is generated by meson.

There is a hierarchy of meson.build files and a top-level meson.options file in src/

There is also a description in the docs of how to run the build using meson commands directly.

Michael Orlitzky

unread,
Jan 29, 2026, 9:41:28 AM (2 days ago) Jan 29
to sage-...@googlegroups.com
On 2026-01-29 04:31:25, julian...@fsfe.org wrote:
> It might actually be related to the cmake bits you posted earlier. If you
> ask cmake for cblas compiler switches it reports /usr/include. Is that
> somehow invoked in the setup? I don't really understands how the ninja
> build file is generated but if somebody can point me to the correct place,
> I am happy to provide a PR for this.

If your guess is correct, you may be able to work around it by telling
CMake to use pkg-config to find BLAS instead of whatever it normally
does:

https://cmake.org/cmake/help/latest/module/FindBLAS.html

On Gentoo I usually set,

BLA_PREFER_PKGCONFIG=ON
BLA_PKGCONFIG_BLAS=cblas

Our cblas.pc does also include the default libdir and includedir, but
pkg-config is smart enough to strip them.
Reply all
Reply to author
Forward
0 new messages