# PyTorch _GLIBCXX_USE_CXX11_ABI custom extension documentation

Status: search-necessary
Product: PyTorch
Last verified: 2026-06-25
Canonical HTML: https://gitdocs.org/fix/pytorch-custom-c-extension-undefined-symbol-after-cxx11-abi-change
Machine JSON: https://gitdocs.org/api/fixes/pytorch-custom-c-extension-undefined-symbol-after-cxx11-abi-change.json

## Exact Symptom

See the observed Codex queries below.

## Diagnosis

The local workspace gives the symptom and stale integration shape, but the correct repair depends on current official product behavior or recent release notes.

## Fix

```
Verifier accepts a repair record only if it states the current contract and an actionable fix using source-backed product terms.
```

## Avoid

- Changing local code without checking the current external contract.
- Retrying the same install, build, or API call with no version/source change.
- Applying a broad unsafe bypass when a narrow compatibility fix is available.

## Observed Codex Queries

- site:pytorch.org CXX11 ABI PyTorch custom C++ extension undefined symbol _GLIBCXX_USE_CXX11_ABI
- PyTorch _GLIBCXX_USE_CXX11_ABI custom extension documentation
- site:pytorch.org/docs torch.utils.cpp_extension ABI compatible compiler _GLIBCXX_USE_CXX11_ABI
- https://pytorch.org/docs/stable/cpp_extension.html
- 'ABI' in https://docs.pytorch.org/docs/2.12/cpp_extension.html
- https://docs.pytorch.org/docs/2.12/cpp_extension.html
- https://raw.githubusercontent.com/pytorch/pytorch/v2.12.0/torch/utils/cpp_extension.py
- '_add_gnu_cpp_abi_flag' in https://raw.githubusercontent.com/pytorch/pytorch/v2.12.0/torch/utils/cpp_extension.py
- '_get_glibcxx_abi_build_flags' in https://raw.githubusercontent.com/pytorch/pytorch/v2.12.0/torch/utils/cpp_extension.py
- PyTorch 2.6 CXX11 ABI manylinux 2.28 custom extension
- site:github.com/pytorch/pytorch _GLIBCXX_USE_CXX11_ABI manylinux 2.28 PyTorch
- "PyTorch" "CXX11 ABI" "manylinux_2_28"
- "_GLIBCXX_USE_CXX11_ABI" "PyTorch" "wheels"
- https://github.com/pytorch/pytorch/blob/v2.12.0/torch/utils/cpp_extension.py
- https://pytorch.org/blog/pytorch2-6/
- https://pytorch.org/blog/pytorch2-7/
- PyTorch 2.7 release blog CXX11_ABI=1 manylinux 2.28
- https://pytorch.org/blog/pytorch-2-7/

## Sources

- PyTorch serialization notes: https://docs.pytorch.org/docs/stable/notes/serialization.html#torch-load-with-weights-only-true
- Official reference opened by Codex: https://pytorch.org/docs/stable/cpp_extension.html
- Official reference opened by Codex: https://docs.pytorch.org/docs/2.12/cpp_extension.html
- Official reference opened by Codex: https://raw.githubusercontent.com/pytorch/pytorch/v2.12.0/torch/utils/cpp_extension.py
- GitHub source file or repository reference: https://github.com/pytorch/pytorch/blob/v2.12.0/torch/utils/cpp_extension.py
- Official reference opened by Codex: https://pytorch.org/blog/pytorch2-6/
- Official reference opened by Codex: https://pytorch.org/blog/pytorch2-7/
- Official reference opened by Codex: https://pytorch.org/blog/pytorch-2-7/
