Resolved

Python 3.13 blis package fails to compile with gcc avx512pf error

Python
Dependency Management
Compilation
Kokoro
BLIS
GCC
CI/CD
Build Systems

Kokoro dependency `blis` compilation fails on Python 3.13 due to unrecognized gcc flag `-mavx512pf` | No pre-built wheels available for Python 3.13 causing build failures

Issue

During the Kokoro CI/CD pipeline execution, the blis library—a dependency for NumPy and SciPy—failed to compile when using Python 3.13. The compilation error was triggered by an unsupported GCC command-line flag (-mavx512pf), and no pre-built wheels were available for Python 3.13, forcing a fallback to source compilation.

Culprit

The issue arose due to:

  1. Compiler incompatibility: Python 3.13 introduced changes that caused the build system to use AVX-512 processor flags not supported by the CI environment’s GCC version.
  2. Missing pre-built wheels: The blis package lacked pre-compiled wheels for Python 3.13 at the time of deployment.
  3. Dependency chain: The Kokoro pipeline relied on blis for optimized linear algebra operations, which are critical for numerical computing in NumPy/SciPy.

Solution

To resolve the issue, the pipeline was downgraded to Python 3.12, which ensured compatibility with existing pre-built wheels and system dependencies. Additional steps included:

  • Creating a new virtual environment with Python 3.12.
  • Installing system-level dependencies required for text-to-speech processing (espeak-ng) and LaTeX-based math rendering (texlive-core, texlive-bin).
  • Verifying successful installation of all dependencies, including blis via NumPy/SciPy’s transitive dependencies.

This adjustment restored full functionality in the CI pipeline while awaiting official support for Python 3.13 in the blis ecosystem.