Repository navigation
Description
Solution to issue cannot be found in the documentation.
- I checked the documentation.
Issue
Summary
Currently, creating a new Conda environment with conda create -n test -c conda-forge python=3.12 will pull Python 3.12.14 build h5f976f7_2_cpython, identified in the Python REPL as Python 3.12.14 (main, Sep 2 2026, 15:22:51) [GCC 15.3.0] on linux (i.e., the build is new as of today, Sep 2, 2026).
Within this environment, sysconfig.get_config_var('CFLAGS') has the value
'-fno-strict-overflow -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -fno-merge-constants -isystem /home/ross/mambaforge/envs/repro-clean/include -fdebug-prefix-map=/home/conda/feedstock_root/build_artifacts/python-split_1788361757984/work=/usr/local/src/conda/python-split-3.12.14 -fuse-linker-plugin -ffat-lto-objects -partition=none -fPIC -O2 -fno-merge-constants -isystem /home/ross/mambaforge/envs/repro-clean/include -fdebug-prefix-map=/home/conda/feedstock_root/build_artifacts/python-split_1788361757984/work=/usr/local/src/conda/python-split-3.12.14 -fuse-linker-plugin -ffat-lto-objects -partition=none '
In particular, it contains the flag -partition=none. This is a problem because the -partition=none flag (which should probably be -flto-partition=none) is rejected by GCC, leading to build failures for at least some Python packages containing C extensions.
(The installed packages and environment info below are for this minimal reproduction environment.)
Context
I found this issue while debugging a CI failure in nanograv/pint_pal. The GitHub actions logs for the failure can be found here. The pip build for a package containing C extensions (nanograv/fastshermanmorrison) was failing with the error
gcc: error: unrecognized command-line option ‘-partition=none’; did you mean ‘-flto-partition=none’?
After iterating on this error in a conversation with Claude Sonnet 5 (https://claude.ai/share/67f6b316-739a-4e59-9094-154f53324593), I realized that I could reproduce the offending flag even in a clean Conda environment with this Python build, so it was most likely an issue with this specific conda-forge build of Python. Note, however, that this bug report is my own work, and was not written or submitted using AI.
Installed packages
# packages in environment at /home/ross/mambaforge/envs/repro-clean
# Name Version Build Channel
_openmp_mutex 4.5 20_gnu conda-forge
bzip2 1.0.8 hda65f42_10 conda-forge
ca-certificates 2026.7.22 hbd8a1cb_0 conda-forge
icu 78.3 py310h44b86e0_2 conda-forge
ld_impl_linux-64 2.46.1 default_hbd61a6d_102 conda-forge
libexpat 2.8.1 hecca717_1 conda-forge
libffi 3.7.0 h81df57d_1 conda-forge
libgcc 16.2.0 ha9f2e26_4 conda-forge
libgomp 16.2.0 he0feb66_4 conda-forge
liblzma 5.8.3 hb03c661_1 conda-forge
libnsl 2.0.1 hb9d3cd8_1 conda-forge
libpython 3.12.14 h0c77377_2_cpython conda-forge
libsqlite 3.53.4 h13e7031_1 conda-forge
libstdcxx 16.2.0 h934c35e_4 conda-forge
libuuid 2.42.3 hcfc3c73_0 conda-forge
libxcrypt 4.4.38 h280c20c_0 conda-forge
libzlib 1.3.2 h25fd6f3_3 conda-forge
ncurses 6.6 hdb14827_1 conda-forge
openssl 3.6.4 h781a0a9_0 conda-forge
packaging 26.3 pyhc364b38_0 conda-forge
pip 26.2.1 pyh8b19718_0 conda-forge
python 3.12.14 h5f976f7_2_cpython conda-forge
readline 8.3 hd6e31c0_1 conda-forge
setuptools 84.0.0 pyh332efcf_0 conda-forge
tk 8.6.13 noxft_h1df4ec4_4 conda-forge
tzdata 2026c h151e31d_0 conda-forge
wheel 0.48.0 pyhd8ed1ab_0 conda-forge
zstd 1.5.7 hb78ec9c_7 conda-forgeEnvironment info
active environment : repro-clean
active env location : /home/ross/mambaforge/envs/repro-clean
shell level : 1
user config file : /home/ross/.condarc
populated config files : /home/ross/mambaforge/.condarc
/home/ross/.condarc
conda version : 22.9.0
conda-build version : not installed
python version : 3.10.8.final.0
virtual packages : __cuda=13.0=0
__linux=6.8.0=0
__glibc=2.39=0
__unix=0=0
__archspec=1=x86_64
base environment : /home/ross/mambaforge (writable)
conda av data dir : /home/ross/mambaforge/etc/conda
conda av metadata url : None
channel URLs : https://conda.anaconda.org/conda-forge/linux-64
https://conda.anaconda.org/conda-forge/noarch
package cache : /home/ross/mambaforge/pkgs
/home/ross/.conda/pkgs
envs directories : /home/ross/mambaforge/envs
/home/ross/.conda/envs
platform : linux-64
user-agent : conda/22.9.0 requests/2.28.1 CPython/3.10.8 Linux/6.8.0-136-generic ubuntu/24.04.4 glibc/2.39
UID:GID : 1000:1000
netrc file : None
offline mode : False
Activity
[-]Latest Python 3.12 build has broken CFLAGS[/-][+]Latest Python 3.12 build (h5f976f7_2_cpython) has broken CFLAGS[/+][-]Latest Python 3.12 build (h5f976f7_2_cpython) has broken CFLAGS[/-][+]Latest Python 3.12.14 build (h5f976f7_2_cpython) has broken CFLAGS[/+]h-vetinari commentedon Sep 2, 2026
See #923