Cannot build 10.9.beta9

187 views
Skip to first unread message

Andrew

unread,
Apr 13, 2026, 12:33:27 AMApr 13
to sage-devel
I gave up trying to compile 10.9.beta8. When 10.9.beta9 came out I switched to using mamba. Since it is available, I first tried using:

mamba env create --file environment-3.14-macos.yml --name sage-dev
mamba activate sage-dev
pip install --no-build-isolation --editable .

but this did not compile. I thought that I'd read somewhere that there were issues using pytnon 3.14 on macosx, so I then tried:

mamba env create --file environment-3.13-macos.yml --name sage-dev
mamba activate sage-dev
pip install --no-build-isolation --editable .

This also failed. So then I tried using python 3.12:

mamba env create --file environment-3.12-macos.yml --name sage-dev
mamba activate sage-dev
pip install --no-build-isolation --editable .

This also does not build (output below). Between each of these attempts, following https://doc.sagemath.org/html/en/installation/source.html#section-build-source I tried:
  • rm src/**/*.so
  • find src/sage/ext/interpreters -type f ! -name 'meson.build' -delete
  • pip uninstall sage-conf sage-setup sagemath-standard
but this didn't help. Just for fun I also deleted ~/.local/share/mamba

--- end of log when building with environment-3.12-macos.yml
       Configuring kernel.json using configuration
      Configuring config.py using configuration
      ../../src/sage/meson.build:178: WARNING: The variable(s) 'FOURTITWO_CIRCUITS', 'FOURTITWO_GRAVER', 'FOURTITWO_GROEBNER', 'FOURTITWO_HILBERT', 'FOURTITWO_MARKOV', 'FOURTITWO_PPI', 'FOURTITWO_QSOLVE', 'FOURTITWO_RAYS', 'FOURTITWO_ZSOLVE', 'SAGE_MATHJAX_DIR' in the input file 'src/sage/config.py.in' are not present in the given configuration data.
      Build targets in project: 574

      SageMath 10.9.beta9

        User defined options
          Native files   : /usr/local/src/sage/build/cp312/meson-python-native-file.ini
          b_ndebug       : if-release
          b_vscrt        : md
          build-docs     : False
          buildtype      : release
          default_library: static

      Found ninja-1.13.2 at /Users/andrew/.local/share/mamba/envs/sage-dev/bin/ninja

      Generating targets:   0%|          | 0/574 eta ?
      Generating targets:   2%|▏         | 9/574 eta 00:23
      Generating targets:   2%|▏         | 12/574 eta 00:22
      Generating targets:  27%|██▋       | 156/574 eta 00:01
      Generating targets:  65%|██████▍   | 371/574 eta 00:00


      Writing build.ninja:   0%|          | 0/2380 eta ?

      Cleaning... 0 files.
      + /Users/andrew/.local/share/mamba/envs/sage-dev/bin/ninja
      [1/1216] Compiling C object src/sage/libs/libecm.cpython-312-darwin.so.p/meson-generated_src_sage_libs_libecm.pyx.c.o
      FAILED: [code=1] src/sage/libs/libecm.cpython-312-darwin.so.p/meson-generated_src_sage_libs_libecm.pyx.c.o
      arm64-apple-darwin20.0.0-clang -Isrc/sage/libs/libecm.cpython-312-darwin.so.p -Isrc/sage/libs -I../../src/sage/libs -Isrc/sage/cpython -I../../src/sage/cpython -Isrc/sage/rings -I../../src/sage/rings -I../../../../../../Users/andrew/.local/share/mamba/envs/sage-dev/lib/python3.12/site-packages/cysignals -I/opt/homebrew/include/python3.12 -I/opt/homebrew/opt/openjdk/include -fvisibility=hidden -fdiagnostics-color=always -DNDEBUG -Wall -Winvalid-pch -std=c17 -O3 -ftree-vectorize -fPIC -fstack-protector-strong -O2 -pipe -isystem /Users/andrew/.local/share/mamba/envs/sage-dev/include -D_FORTIFY_SOURCE=2 -isystem /Users/andrew/.local/share/mamba/envs/sage-dev/include -MD -MQ src/sage/libs/libecm.cpython-312-darwin.so.p/meson-generated_src_sage_libs_libecm.pyx.c.o -MF src/sage/libs/libecm.cpython-312-darwin.so.p/meson-generated_src_sage_libs_libecm.pyx.c.o.d -o src/sage/libs/libecm.cpython-312-darwin.so.p/meson-generated_src_sage_libs_libecm.pyx.c.o -c src/sage/libs/libecm.cpython-312-darwin.so.p/src/sage/libs/libecm.pyx.c
      src/sage/libs/libecm.cpython-312-darwin.so.p/src/sage/libs/libecm.pyx.c:19:10: fatal error: 'Python.h' file not found
         19 | #include "Python.h"
            |          ^~~~~~~~~~
      1 error generated.
      [2/1216] Compiling C object src/sage/cpython/dict_del_by_value.cpython-312-darwin.so.p/meson-generated_src_sage_cpython_dict_del_by_value.pyx.c.o
      FAILED: [code=1] src/sage/cpython/dict_del_by_value.cpython-312-darwin.so.p/meson-generated_src_sage_cpython_dict_del_by_value.pyx.c.o
      arm64-apple-darwin20.0.0-clang -Isrc/sage/cpython/dict_del_by_value.cpython-312-darwin.so.p -Isrc/sage/cpython -I../../src/sage/cpython -I/opt/homebrew/include/python3.12 -I/opt/homebrew/opt/openjdk/include -fvisibility=hidden -fdiagnostics-color=always -DNDEBUG -Wall -Winvalid-pch -std=c17 -O3 -ftree-vectorize -fPIC -fstack-protector-strong -O2 -pipe -isystem /Users/andrew/.local/share/mamba/envs/sage-dev/include -D_FORTIFY_SOURCE=2 -isystem /Users/andrew/.local/share/mamba/envs/sage-dev/include -MD -MQ src/sage/cpython/dict_del_by_value.cpython-312-darwin.so.p/meson-generated_src_sage_cpython_dict_del_by_value.pyx.c.o -MF src/sage/cpython/dict_del_by_value.cpython-312-darwin.so.p/meson-generated_src_sage_cpython_dict_del_by_value.pyx.c.o.d -o src/sage/cpython/dict_del_by_value.cpython-312-darwin.so.p/meson-generated_src_sage_cpython_dict_del_by_value.pyx.c.o -c src/sage/cpython/dict_del_by_value.cpython-312-darwin.so.p/src/sage/cpython/dict_del_by_value.pyx.c
      src/sage/cpython/dict_del_by_value.cpython-312-darwin.so.p/src/sage/cpython/dict_del_by_value.pyx.c:19:10: fatal error: 'Python.h' file not found
         19 | #include "Python.h"
            |          ^~~~~~~~~~
      1 error generated.
      [3/1216] Compiling C object src/sage/cpython/debug.cpython-312-darwin.so.p/meson-generated_src_sage_cpython_debug.pyx.c.o
      FAILED: [code=1] src/sage/cpython/debug.cpython-312-darwin.so.p/meson-generated_src_sage_cpython_debug.pyx.c.o
      arm64-apple-darwin20.0.0-clang -Isrc/sage/cpython/debug.cpython-312-darwin.so.p -Isrc/sage/cpython -I../../src/sage/cpython -I/opt/homebrew/include/python3.12 -I/opt/homebrew/opt/openjdk/include -fvisibility=hidden -fdiagnostics-color=always -DNDEBUG -Wall -Winvalid-pch -std=c17 -O3 -ftree-vectorize -fPIC -fstack-protector-strong -O2 -pipe -isystem /Users/andrew/.local/share/mamba/envs/sage-dev/include -D_FORTIFY_SOURCE=2 -isystem /Users/andrew/.local/share/mamba/envs/sage-dev/include -MD -MQ src/sage/cpython/debug.cpython-312-darwin.so.p/meson-generated_src_sage_cpython_debug.pyx.c.o -MF src/sage/cpython/debug.cpython-312-darwin.so.p/meson-generated_src_sage_cpython_debug.pyx.c.o.d -o src/sage/cpython/debug.cpython-312-darwin.so.p/meson-generated_src_sage_cpython_debug.pyx.c.o -c src/sage/cpython/debug.cpython-312-darwin.so.p/src/sage/cpython/debug.pyx.c
      src/sage/cpython/debug.cpython-312-darwin.so.p/src/sage/cpython/debug.pyx.c:19:10: fatal error: 'Python.h' file not found
         19 | #include "Python.h"
            |          ^~~~~~~~~~
      1 error generated.
      [4/1216] Compiling C object src/sage/cpython/atexit.cpython-312-darwin.so.p/meson-generated_src_sage_cpython_atexit.pyx.c.o
      FAILED: [code=1] src/sage/cpython/atexit.cpython-312-darwin.so.p/meson-generated_src_sage_cpython_atexit.pyx.c.o
      arm64-apple-darwin20.0.0-clang -Isrc/sage/cpython/atexit.cpython-312-darwin.so.p -Isrc/sage/cpython -I../../src/sage/cpython -I/opt/homebrew/include/python3.12 -I/opt/homebrew/opt/openjdk/include -fvisibility=hidden -fdiagnostics-color=always -DNDEBUG -Wall -Winvalid-pch -std=c17 -O3 -ftree-vectorize -fPIC -fstack-protector-strong -O2 -pipe -isystem /Users/andrew/.local/share/mamba/envs/sage-dev/include -D_FORTIFY_SOURCE=2 -isystem /Users/andrew/.local/share/mamba/envs/sage-dev/include -MD -MQ src/sage/cpython/atexit.cpython-312-darwin.so.p/meson-generated_src_sage_cpython_atexit.pyx.c.o -MF src/sage/cpython/atexit.cpython-312-darwin.so.p/meson-generated_src_sage_cpython_atexit.pyx.c.o.d -o src/sage/cpython/atexit.cpython-312-darwin.so.p/meson-generated_src_sage_cpython_atexit.pyx.c.o -c src/sage/cpython/atexit.cpython-312-darwin.so.p/src/sage/cpython/atexit.pyx.c
      src/sage/cpython/atexit.cpython-312-darwin.so.p/src/sage/cpython/atexit.pyx.c:19:10: fatal error: 'Python.h' file not found
         19 | #include "Python.h"
            |          ^~~~~~~~~~
      1 error generated.
      [5/1216] Compiling C object src/sage/cpython/builtin_types.cpython-312-darwin.so.p/meson-generated_src_sage_cpython_builtin_types.pyx.c.o
      FAILED: [code=1] src/sage/cpython/builtin_types.cpython-312-darwin.so.p/meson-generated_src_sage_cpython_builtin_types.pyx.c.o
      arm64-apple-darwin20.0.0-clang -Isrc/sage/cpython/builtin_types.cpython-312-darwin.so.p -Isrc/sage/cpython -I../../src/sage/cpython -I/opt/homebrew/include/python3.12 -I/opt/homebrew/opt/openjdk/include -fvisibility=hidden -fdiagnostics-color=always -DNDEBUG -Wall -Winvalid-pch -std=c17 -O3 -ftree-vectorize -fPIC -fstack-protector-strong -O2 -pipe -isystem /Users/andrew/.local/share/mamba/envs/sage-dev/include -D_FORTIFY_SOURCE=2 -isystem /Users/andrew/.local/share/mamba/envs/sage-dev/include -MD -MQ src/sage/cpython/builtin_types.cpython-312-darwin.so.p/meson-generated_src_sage_cpython_builtin_types.pyx.c.o -MF src/sage/cpython/builtin_types.cpython-312-darwin.so.p/meson-generated_src_sage_cpython_builtin_types.pyx.c.o.d -o src/sage/cpython/builtin_types.cpython-312-darwin.so.p/meson-generated_src_sage_cpython_builtin_types.pyx.c.o -c src/sage/cpython/builtin_types.cpython-312-darwin.so.p/src/sage/cpython/builtin_types.pyx.c
      src/sage/cpython/builtin_types.cpython-312-darwin.so.p/src/sage/cpython/builtin_types.pyx.c:19:10: fatal error: 'Python.h' file not found
         19 | #include "Python.h"
            |          ^~~~~~~~~~
      1 error generated.
      [6/1216] Compiling C++ object src/sage/libs/braiding.cpython-312-darwin.so.p/meson-generated_src_sage_libs_braiding.pyx.cpp.o
      FAILED: [code=1] src/sage/libs/braiding.cpython-312-darwin.so.p/meson-generated_src_sage_libs_braiding.pyx.cpp.o
      arm64-apple-darwin20.0.0-clang++ -Isrc/sage/libs/braiding.cpython-312-darwin.so.p -Isrc/sage/libs -I../../src/sage/libs -Isrc/sage/cpython -I../../src/sage/cpython -Isrc/sage/rings -I../../src/sage/rings -I../../../../../../Users/andrew/.local/share/mamba/envs/sage-dev/lib/python3.12/site-packages/cysignals -I/opt/homebrew/include/python3.12 -I/Users/andrew/.local/share/mamba/envs/sage-dev/include -I/opt/homebrew/opt/openjdk/include -fvisibility=hidden -fvisibility-inlines-hidden -fdiagnostics-color=always -DNDEBUG -Wall -Winvalid-pch -std=c++17 -O3 -ftree-vectorize -fPIC -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -fmessage-length=0 -isystem /Users/andrew/.local/share/mamba/envs/sage-dev/include -D_FORTIFY_SOURCE=2 -isystem /Users/andrew/.local/share/mamba/envs/sage-dev/include -MD -MQ src/sage/libs/braiding.cpython-312-darwin.so.p/meson-generated_src_sage_libs_braiding.pyx.cpp.o -MF src/sage/libs/braiding.cpython-312-darwin.so.p/meson-generated_src_sage_libs_braiding.pyx.cpp.o.d -o src/sage/libs/braiding.cpython-312-darwin.so.p/meson-generated_src_sage_libs_braiding.pyx.cpp.o -c src/sage/libs/braiding.cpython-312-darwin.so.p/src/sage/libs/braiding.pyx.cpp
      src/sage/libs/braiding.cpython-312-darwin.so.p/src/sage/libs/braiding.pyx.cpp:19:10: fatal error: 'Python.h' file not found
         19 | #include "Python.h"
            |          ^~~~~~~~~~
      1 error generated.
      [7/1216] Compiling C object src/sage/libs/homfly.cpython-312-darwin.so.p/meson-generated_src_sage_libs_homfly.pyx.c.o
      FAILED: [code=1] src/sage/libs/homfly.cpython-312-darwin.so.p/meson-generated_src_sage_libs_homfly.pyx.c.o
      arm64-apple-darwin20.0.0-clang -Isrc/sage/libs/homfly.cpython-312-darwin.so.p -Isrc/sage/libs -I../../src/sage/libs -Isrc/sage/cpython -I../../src/sage/cpython -Isrc/sage/rings -I../../src/sage/rings -I../../../../../../Users/andrew/.local/share/mamba/envs/sage-dev/lib/python3.12/site-packages/cysignals -I/opt/homebrew/include/python3.12 -I/Users/andrew/.local/share/mamba/envs/sage-dev/include -I/opt/homebrew/opt/openjdk/include -fvisibility=hidden -fdiagnostics-color=always -DNDEBUG -Wall -Winvalid-pch -std=c17 -O3 -ftree-vectorize -fPIC -fstack-protector-strong -O2 -pipe -isystem /Users/andrew/.local/share/mamba/envs/sage-dev/include -D_FORTIFY_SOURCE=2 -isystem /Users/andrew/.local/share/mamba/envs/sage-dev/include -MD -MQ src/sage/libs/homfly.cpython-312-darwin.so.p/meson-generated_src_sage_libs_homfly.pyx.c.o -MF src/sage/libs/homfly.cpython-312-darwin.so.p/meson-generated_src_sage_libs_homfly.pyx.c.o.d -o src/sage/libs/homfly.cpython-312-darwin.so.p/meson-generated_src_sage_libs_homfly.pyx.c.o -c src/sage/libs/homfly.cpython-312-darwin.so.p/src/sage/libs/homfly.pyx.c
      src/sage/libs/homfly.cpython-312-darwin.so.p/src/sage/libs/homfly.pyx.c:19:10: fatal error: 'Python.h' file not found
         19 | #include "Python.h"
            |          ^~~~~~~~~~
      1 error generated.
      [8/1216] Compiling C++ object src/sage/libs/eclib/homspace.cpython-312-darwin.so.p/meson-generated_src_sage_libs_eclib_homspace.pyx.cpp.o
      FAILED: [code=1] src/sage/libs/eclib/homspace.cpython-312-darwin.so.p/meson-generated_src_sage_libs_eclib_homspace.pyx.cpp.o
      arm64-apple-darwin20.0.0-clang++ -Isrc/sage/libs/eclib/homspace.cpython-312-darwin.so.p -Isrc/sage/libs/eclib -I../../src/sage/libs/eclib -Isrc/sage/cpython -I../../src/sage/cpython -Isrc/sage/ext -I../../src/sage/ext -Isrc/sage/libs/flint -I../../src/sage/libs/flint -Isrc/sage/libs/ntl -I../../src/sage/libs/ntl -Isrc/sage/rings -I../../src/sage/rings -I../../../../../../Users/andrew/.local/share/mamba/envs/sage-dev/lib/python3.12/site-packages/cysignals -I/opt/homebrew/include/python3.12 -I/Users/andrew/.local/share/mamba/envs/sage-dev/include -I/opt/homebrew/opt/openjdk/include -fvisibility=hidden -fvisibility-inlines-hidden -fdiagnostics-color=always -DNDEBUG -Wall -Winvalid-pch -std=c++17 -O3 -ftree-vectorize -fPIC -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -fmessage-length=0 -isystem /Users/andrew/.local/share/mamba/envs/sage-dev/include -D_FORTIFY_SOURCE=2 -isystem /Users/andrew/.local/share/mamba/envs/sage-dev/include -MD -MQ src/sage/libs/eclib/homspace.cpython-312-darwin.so.p/meson-generated_src_sage_libs_eclib_homspace.pyx.cpp.o -MF src/sage/libs/eclib/homspace.cpython-312-darwin.so.p/meson-generated_src_sage_libs_eclib_homspace.pyx.cpp.o.d -o src/sage/libs/eclib/homspace.cpython-312-darwin.so.p/meson-generated_src_sage_libs_eclib_homspace.pyx.cpp.o -c src/sage/libs/eclib/homspace.cpython-312-darwin.so.p/src/sage/libs/eclib/homspace.pyx.cpp
      src/sage/libs/eclib/homspace.cpython-312-darwin.so.p/src/sage/libs/eclib/homspace.pyx.cpp:19:10: fatal error: 'Python.h' file not found
         19 | #include "Python.h"
            |          ^~~~~~~~~~
      1 error generated.
      [9/1216] Compiling C++ object src/sage/libs/eclib/mat.cpython-312-darwin.so.p/meson-generated_src_sage_libs_eclib_mat.pyx.cpp.o
      FAILED: [code=1] src/sage/libs/eclib/mat.cpython-312-darwin.so.p/meson-generated_src_sage_libs_eclib_mat.pyx.cpp.o
      arm64-apple-darwin20.0.0-clang++ -Isrc/sage/libs/eclib/mat.cpython-312-darwin.so.p -Isrc/sage/libs/eclib -I../../src/sage/libs/eclib -Isrc/sage/cpython -I../../src/sage/cpython -Isrc/sage/ext -I../../src/sage/ext -Isrc/sage/libs/flint -I../../src/sage/libs/flint -Isrc/sage/libs/ntl -I../../src/sage/libs/ntl -Isrc/sage/rings -I../../src/sage/rings -I../../../../../../Users/andrew/.local/share/mamba/envs/sage-dev/lib/python3.12/site-packages/cysignals -I/opt/homebrew/include/python3.12 -I/Users/andrew/.local/share/mamba/envs/sage-dev/include -I/opt/homebrew/opt/openjdk/include -fvisibility=hidden -fvisibility-inlines-hidden -fdiagnostics-color=always -DNDEBUG -Wall -Winvalid-pch -std=c++17 -O3 -ftree-vectorize -fPIC -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -fmessage-length=0 -isystem /Users/andrew/.local/share/mamba/envs/sage-dev/include -D_FORTIFY_SOURCE=2 -isystem /Users/andrew/.local/share/mamba/envs/sage-dev/include -MD -MQ src/sage/libs/eclib/mat.cpython-312-darwin.so.p/meson-generated_src_sage_libs_eclib_mat.pyx.cpp.o -MF src/sage/libs/eclib/mat.cpython-312-darwin.so.p/meson-generated_src_sage_libs_eclib_mat.pyx.cpp.o.d -o src/sage/libs/eclib/mat.cpython-312-darwin.so.p/meson-generated_src_sage_libs_eclib_mat.pyx.cpp.o -c src/sage/libs/eclib/mat.cpython-312-darwin.so.p/src/sage/libs/eclib/mat.pyx.cpp
      src/sage/libs/eclib/mat.cpython-312-darwin.so.p/src/sage/libs/eclib/mat.pyx.cpp:19:10: fatal error: 'Python.h' file not found
         19 | #include "Python.h"
            |          ^~~~~~~~~~
      1 error generated.
      [10/1216] Compiling C object src/sage/cpython/type.cpython-312-darwin.so.p/meson-generated_src_sage_cpython_type.pyx.c.o
      FAILED: [code=1] src/sage/cpython/type.cpython-312-darwin.so.p/meson-generated_src_sage_cpython_type.pyx.c.o
      arm64-apple-darwin20.0.0-clang -Isrc/sage/cpython/type.cpython-312-darwin.so.p -Isrc/sage/cpython -I../../src/sage/cpython -I/opt/homebrew/include/python3.12 -I/opt/homebrew/opt/openjdk/include -fvisibility=hidden -fdiagnostics-color=always -DNDEBUG -Wall -Winvalid-pch -std=c17 -O3 -ftree-vectorize -fPIC -fstack-protector-strong -O2 -pipe -isystem /Users/andrew/.local/share/mamba/envs/sage-dev/include -D_FORTIFY_SOURCE=2 -isystem /Users/andrew/.local/share/mamba/envs/sage-dev/include -MD -MQ src/sage/cpython/type.cpython-312-darwin.so.p/meson-generated_src_sage_cpython_type.pyx.c.o -MF src/sage/cpython/type.cpython-312-darwin.so.p/meson-generated_src_sage_cpython_type.pyx.c.o.d -o src/sage/cpython/type.cpython-312-darwin.so.p/meson-generated_src_sage_cpython_type.pyx.c.o -c src/sage/cpython/type.cpython-312-darwin.so.p/src/sage/cpython/type.pyx.c
      src/sage/cpython/type.cpython-312-darwin.so.p/src/sage/cpython/type.pyx.c:19:10: fatal error: 'Python.h' file not found
         19 | #include "Python.h"
            |          ^~~~~~~~~~
      1 error generated.
      [11/1216] Compiling C object src/sage/libs/ecl.cpython-312-darwin.so.p/meson-generated_src_sage_libs_ecl.pyx.c.o
      FAILED: [code=1] src/sage/libs/ecl.cpython-312-darwin.so.p/meson-generated_src_sage_libs_ecl.pyx.c.o
      arm64-apple-darwin20.0.0-clang -Isrc/sage/libs/ecl.cpython-312-darwin.so.p -Isrc/sage/libs -I../../src/sage/libs -Isrc/sage/cpython -I../../src/sage/cpython -Isrc/sage/rings -I../../src/sage/rings -I../../../../../../Users/andrew/.local/share/mamba/envs/sage-dev/lib/python3.12/site-packages/cysignals -I/opt/homebrew/include/python3.12 -I/opt/homebrew/opt/openjdk/include -fvisibility=hidden -fdiagnostics-color=always -DNDEBUG -Wall -Winvalid-pch -std=c17 -O3 -ftree-vectorize -fPIC -fstack-protector-strong -O2 -pipe -isystem /Users/andrew/.local/share/mamba/envs/sage-dev/include -D_FORTIFY_SOURCE=2 -isystem /Users/andrew/.local/share/mamba/envs/sage-dev/include -MD -MQ src/sage/libs/ecl.cpython-312-darwin.so.p/meson-generated_src_sage_libs_ecl.pyx.c.o -MF src/sage/libs/ecl.cpython-312-darwin.so.p/meson-generated_src_sage_libs_ecl.pyx.c.o.d -o src/sage/libs/ecl.cpython-312-darwin.so.p/meson-generated_src_sage_libs_ecl.pyx.c.o -c src/sage/libs/ecl.cpython-312-darwin.so.p/src/sage/libs/ecl.pyx.c
      src/sage/libs/ecl.cpython-312-darwin.so.p/src/sage/libs/ecl.pyx.c:19:10: fatal error: 'Python.h' file not found
         19 | #include "Python.h"
            |          ^~~~~~~~~~
      1 error generated.
      [12/1216] Compiling C object src/sage/cpython/getattr.cpython-312-darwin.so.p/meson-generated_src_sage_cpython_getattr.pyx.c.o
      FAILED: [code=1] src/sage/cpython/getattr.cpython-312-darwin.so.p/meson-generated_src_sage_cpython_getattr.pyx.c.o
      arm64-apple-darwin20.0.0-clang -Isrc/sage/cpython/getattr.cpython-312-darwin.so.p -Isrc/sage/cpython -I../../src/sage/cpython -I/opt/homebrew/include/python3.12 -I/opt/homebrew/opt/openjdk/include -fvisibility=hidden -fdiagnostics-color=always -DNDEBUG -Wall -Winvalid-pch -std=c17 -O3 -ftree-vectorize -fPIC -fstack-protector-strong -O2 -pipe -isystem /Users/andrew/.local/share/mamba/envs/sage-dev/include -D_FORTIFY_SOURCE=2 -isystem /Users/andrew/.local/share/mamba/envs/sage-dev/include -MD -MQ src/sage/cpython/getattr.cpython-312-darwin.so.p/meson-generated_src_sage_cpython_getattr.pyx.c.o -MF src/sage/cpython/getattr.cpython-312-darwin.so.p/meson-generated_src_sage_cpython_getattr.pyx.c.o.d -o src/sage/cpython/getattr.cpython-312-darwin.so.p/meson-generated_src_sage_cpython_getattr.pyx.c.o -c src/sage/cpython/getattr.cpython-312-darwin.so.p/src/sage/cpython/getattr.pyx.c
      src/sage/cpython/getattr.cpython-312-darwin.so.p/src/sage/cpython/getattr.pyx.c:19:10: fatal error: 'Python.h' file not found
         19 | #include "Python.h"
            |          ^~~~~~~~~~
      1 error generated.
      [13/1216] Compiling C object src/sage/cpython/cython_metaclass.cpython-312-darwin.so.p/meson-generated_src_sage_cpython_cython_metaclass.pyx.c.o
      FAILED: [code=1] src/sage/cpython/cython_metaclass.cpython-312-darwin.so.p/meson-generated_src_sage_cpython_cython_metaclass.pyx.c.o
      arm64-apple-darwin20.0.0-clang -Isrc/sage/cpython/cython_metaclass.cpython-312-darwin.so.p -Isrc/sage/cpython -I../../src/sage/cpython -I/opt/homebrew/include/python3.12 -I/opt/homebrew/opt/openjdk/include -fvisibility=hidden -fdiagnostics-color=always -DNDEBUG -Wall -Winvalid-pch -std=c17 -O3 -ftree-vectorize -fPIC -fstack-protector-strong -O2 -pipe -isystem /Users/andrew/.local/share/mamba/envs/sage-dev/include -D_FORTIFY_SOURCE=2 -isystem /Users/andrew/.local/share/mamba/envs/sage-dev/include -MD -MQ src/sage/cpython/cython_metaclass.cpython-312-darwin.so.p/meson-generated_src_sage_cpython_cython_metaclass.pyx.c.o -MF src/sage/cpython/cython_metaclass.cpython-312-darwin.so.p/meson-generated_src_sage_cpython_cython_metaclass.pyx.c.o.d -o src/sage/cpython/cython_metaclass.cpython-312-darwin.so.p/meson-generated_src_sage_cpython_cython_metaclass.pyx.c.o -c src/sage/cpython/cython_metaclass.cpython-312-darwin.so.p/src/sage/cpython/cython_metaclass.pyx.c
      src/sage/cpython/cython_metaclass.cpython-312-darwin.so.p/src/sage/cpython/cython_metaclass.pyx.c:19:10: fatal error: 'Python.h' file not found
         19 | #include "Python.h"
            |          ^~~~~~~~~~
      1 error generated.
      [14/1216] Compiling C++ object src/sage/libs/sirocco.cpython-312-darwin.so.p/meson-generated_src_sage_libs_sirocco.pyx.cpp.o
      FAILED: [code=1] src/sage/libs/sirocco.cpython-312-darwin.so.p/meson-generated_src_sage_libs_sirocco.pyx.cpp.o
      arm64-apple-darwin20.0.0-clang++ -Isrc/sage/libs/sirocco.cpython-312-darwin.so.p -Isrc/sage/libs -I../../src/sage/libs -Isrc/sage/cpython -I../../src/sage/cpython -Isrc/sage/rings -I../../src/sage/rings -I../../../../../../Users/andrew/.local/share/mamba/envs/sage-dev/lib/python3.12/site-packages/cysignals -I/opt/homebrew/include/python3.12 -I/Users/andrew/.local/share/mamba/envs/sage-dev/include -I/opt/homebrew/opt/openjdk/include -fvisibility=hidden -fvisibility-inlines-hidden -fdiagnostics-color=always -DNDEBUG -Wall -Winvalid-pch -std=c++17 -O3 -ftree-vectorize -fPIC -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -fmessage-length=0 -isystem /Users/andrew/.local/share/mamba/envs/sage-dev/include -D_FORTIFY_SOURCE=2 -isystem /Users/andrew/.local/share/mamba/envs/sage-dev/include -MD -MQ src/sage/libs/sirocco.cpython-312-darwin.so.p/meson-generated_src_sage_libs_sirocco.pyx.cpp.o -MF src/sage/libs/sirocco.cpython-312-darwin.so.p/meson-generated_src_sage_libs_sirocco.pyx.cpp.o.d -o src/sage/libs/sirocco.cpython-312-darwin.so.p/meson-generated_src_sage_libs_sirocco.pyx.cpp.o -c src/sage/libs/sirocco.cpython-312-darwin.so.p/src/sage/libs/sirocco.pyx.cpp
      src/sage/libs/sirocco.cpython-312-darwin.so.p/src/sage/libs/sirocco.pyx.cpp:19:10: fatal error: 'Python.h' file not found
         19 | #include "Python.h"
            |          ^~~~~~~~~~
      1 error generated.
      [15/1216] Compiling C object src/sage/libs/arb/arith.cpython-312-darwin.so.p/meson-generated_src_sage_libs_arb_arith.pyx.c.o
      FAILED: [code=1] src/sage/libs/arb/arith.cpython-312-darwin.so.p/meson-generated_src_sage_libs_arb_arith.pyx.c.o
      arm64-apple-darwin20.0.0-clang -Isrc/sage/libs/arb/arith.cpython-312-darwin.so.p -Isrc/sage/libs/arb -I../../src/sage/libs/arb -Isrc/sage/cpython -I../../src/sage/cpython -Isrc/sage/libs/flint -I../../src/sage/libs/flint -Isrc/sage/rings -I../../src/sage/rings -I/opt/homebrew/include/python3.12 -I/opt/homebrew/opt/openjdk/include -fvisibility=hidden -fdiagnostics-color=always -DNDEBUG -Wall -Winvalid-pch -std=c17 -O3 -ftree-vectorize -fPIC -fstack-protector-strong -O2 -pipe -isystem /Users/andrew/.local/share/mamba/envs/sage-dev/include -D_FORTIFY_SOURCE=2 -isystem /Users/andrew/.local/share/mamba/envs/sage-dev/include -MD -MQ src/sage/libs/arb/arith.cpython-312-darwin.so.p/meson-generated_src_sage_libs_arb_arith.pyx.c.o -MF src/sage/libs/arb/arith.cpython-312-darwin.so.p/meson-generated_src_sage_libs_arb_arith.pyx.c.o.d -o src/sage/libs/arb/arith.cpython-312-darwin.so.p/meson-generated_src_sage_libs_arb_arith.pyx.c.o -c src/sage/libs/arb/arith.cpython-312-darwin.so.p/src/sage/libs/arb/arith.pyx.c
      src/sage/libs/arb/arith.cpython-312-darwin.so.p/src/sage/libs/arb/arith.pyx.c:19:10: fatal error: 'Python.h' file not found
         19 | #include "Python.h"
            |          ^~~~~~~~~~
      1 error generated.
      [16/1216] Compiling C object src/sage/cpython/string.cpython-312-darwin.so.p/meson-generated_src_sage_cpython_string.pyx.c.o
      FAILED: [code=1] src/sage/cpython/string.cpython-312-darwin.so.p/meson-generated_src_sage_cpython_string.pyx.c.o
      arm64-apple-darwin20.0.0-clang -Isrc/sage/cpython/string.cpython-312-darwin.so.p -Isrc/sage/cpython -I../../src/sage/cpython -I/opt/homebrew/include/python3.12 -I/opt/homebrew/opt/openjdk/include -fvisibility=hidden -fdiagnostics-color=always -DNDEBUG -Wall -Winvalid-pch -std=c17 -O3 -ftree-vectorize -fPIC -fstack-protector-strong -O2 -pipe -isystem /Users/andrew/.local/share/mamba/envs/sage-dev/include -D_FORTIFY_SOURCE=2 -isystem /Users/andrew/.local/share/mamba/envs/sage-dev/include -MD -MQ src/sage/cpython/string.cpython-312-darwin.so.p/meson-generated_src_sage_cpython_string.pyx.c.o -MF src/sage/cpython/string.cpython-312-darwin.so.p/meson-generated_src_sage_cpython_string.pyx.c.o.d -o src/sage/cpython/string.cpython-312-darwin.so.p/meson-generated_src_sage_cpython_string.pyx.c.o -c src/sage/cpython/string.cpython-312-darwin.so.p/src/sage/cpython/string.pyx.c
      src/sage/cpython/string.cpython-312-darwin.so.p/src/sage/cpython/string.pyx.c:19:10: fatal error: 'Python.h' file not found
         19 | #include "Python.h"
            |          ^~~~~~~~~~
      1 error generated.
      [17/1216] Generating src/sage/ext/interpreters/sage.ext.interpreters with a custom command
      Generating interpreters for fast_callable in src/sage/ext/interpreters
      [18/1208] Generating src/sage/modular/arithgroup/farey_symbol.h with a custom command
      ninja: build stopped: subcommand failed.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> from file:///usr/local/src/sage

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

Dima Pasechnik

unread,
Apr 13, 2026, 9:56:42 AMApr 13
to sage-...@googlegroups.com, andrew...@gmail.com
Why are you building libecm and
not installing it from conda?

Tobia...@gmx.de

unread,
Apr 13, 2026, 6:22:54 PMApr 13
to sage-devel
It looks to me the issue is more about the Python installation.
>  fatal error: 'Python.h' file not found
> 19 | #include "Python.h"

The argument 
>  -I/opt/homebrew/include/python3.12

suggests that it tries to use the homebrew-installed python instead of the one from conda. The questions thus are:
1. Does the python3.12 folder contain a Python.h file?
2. Why is meson trying to use the include directory from the homebrew python and not conda. The logs under  /usr/local/src/sage/build/cp312/meson-logs/meson-log.txt might be helpful for this - could you please post them here.

Andrew

unread,
Apr 13, 2026, 9:38:47 PMApr 13
to sage-devel
Thanks for the replies:


> Why are you building libecm and not installing it from conda?

I followed the instructions from https://doc.sagemath.org/html/en/installation/source.html. In particular, as far as I know, I did not build libecm by hand. I thought that conda installed everything in its own virtual environment, automatically taking care of things like this?


> suggests that it tries to use the homebrew-installed python instead of the one from conda. The questions thus are:
> 1. Does the python3.12 folder contain a Python.h file?
> 2. Why is meson trying to use the include directory from the homebrew python and not conda. The logs under  /usr/local/src/sage/build/cp312/meson-logs/meson-log.txt might be helpful for this - could you please post them here.

Thanks, I didn't know where the meson logs were. 

I just tried a new install using:


mamba env create --file environment-3.12-macos.yml --name sage-dev
mamba activate sage-dev
pip install --no-build-isolation --editable .

This time sage compiled for me. Unfortunately, when I run sage it crashes. I attach the meson log and the crash report. Claude suggests that the problem is with fflas-ffpack and givaro. I tried patching and recompiling gaviaro and friends with 10.9.beta8 but couldn't get it to work. In another post, there was an issue downstream with givaro. Perhaps this is not fixed yet? 

Andrew
Sage_crash_report.txt
meson-log.txt

Tobia...@gmx.de

unread,
Apr 16, 2026, 4:05:13 PMApr 16
to sage-devel
For further reference, this is the error:
> ImportError: dlopen(/usr/local/src/sage/build/cp312/src/sage/libs/linbox/linbox_flint_interface.cpython-312-darwin.so, 0x0002): symbol not found in flat namespace '__ZN6FFPACK8CharPolyIN6Givaro8Poly1DomINS1_7ModularIddvEENS1_5DenseEEEEERNT_7ElementERKS7_S9_mNS7_8Domain_t11Element_ptrEmRNS7_8Domain_t8RandIterENS_19FFPACK_CHARPOLY_TAGEm'

I'm sorry, I haven't seen this before.

The meson log file shows that many dependencies were cached from a previous run. Maybe try to delete the  sage/build/cp312 folder, and try again.

Sorry for the inconvenience!

Andrew

unread,
Apr 17, 2026, 11:48:18 PMApr 17
to sage-devel
Thanks again. I have already flushed the meson build directories several times, and tried different python versions etc without any success. I think all my issues are due to new  macosx and xcode, which my "university managed" computer forced me to install for "security reasons". There is a discussion of the associated problems, and the attempts to fix them, on sage-release  (see https://groups.google.com/u/1/g/sage-release/c/7e3RjHOqFQA). Using

https://github.com/sagemath/sage/pull/41964
https://github.com/linbox-team/givaro/pull/240

I get a little bit further, but no joy yet. I think that I will just have to wait until someone figures out to get sage to compile with the latest macosx and xcode releases.

Andrew

Dima Pasechnik

unread,
Apr 18, 2026, 4:40:19 PMApr 18
to sage-...@googlegroups.com
I think <https://github.com/sagemath/sage/pull/41626>

might have most or all missing pieces of the puzzle.

Probably only with Accelerate enabled, but I am not sure, I still have no means to test this locally.

Andrew

unread,
Apr 20, 2026, 2:51:52 AMApr 20
to sage-devel
Thanks Dima for looking at this. Using 41625 I initially had compilation errors like:

error: unknown argument: '-MD'

in the linbox_flint_interface compilation, that appeared to be caused by the flags

-Xpreprocessor -fopenmp -lomp ... -Xpreprocessor -MD

I am quite confused, however, as I just tried again with

make distclean && git clean -fd && ./configure && make -j8

and this time sage compiled properly this time. I am happy to send logs and run tests you'd like if this would be helpful.
Reply all
Reply to author
Forward
0 new messages