RUNLOCALAIv38
→WILL IT RUNBEST GPUCOMPARETROUBLESHOOTSTARTPULSEMODELSHARDWARETOOLSBENCH
RUNLOCALAI

Operator-grade instrument for local-AI hardware intelligence. Hand-written verdicts. Real benchmarks. Reproducible commands.

OP·Fredoline Eruo
DIR
  • Models
  • Hardware
  • Tools
  • Benchmarks
  • Will it run?
GUIDES
  • Best GPU
  • Best laptop
  • Best Mac
  • Best used GPU
  • Best budget GPU
  • Best GPU for Ollama
  • Best GPU for SD
  • AI PC build $2K
  • CUDA vs ROCm
  • 16 vs 24 GB
  • Compare hardware
  • Custom compare
REF
  • Systems
  • Ecosystem maps
  • Pillar guides
  • Methodology
  • Glossary
  • Errors KB
  • Troubleshooting
  • Resources
  • Public API
EDITOR
  • About
  • About the author
  • Changelog
  • Latest
  • Updates
  • Submit benchmark
  • Send feedback
  • Trust
  • Editorial policy
  • How we make money
  • Contact
LEGAL
  • Privacy
  • Terms
  • Sitemap
MAIL · MONTHLY DIGEST
Get monthly local AI changes
Monthly recap. No spam.
DISCLOSURE

Some links on this site are affiliate links (Amazon Associates and other first-class retailers). When you buy through them, we earn a small commission at no extra cost to you. Affiliate links do not influence our verdicts — there are cards we rate highly that we don't have affiliate relationships with, and cards that sell well that we refuse to recommend. Read more →

SYS · ONLINEUPTIME · 100%2026 · operator-owned
RUNLOCALAI · v38
Errors / Build / compile failures / llama.cpp CUDA build: unsupported GNU version! gcc versions later than X are not supported
Build / compile failures

llama.cpp CUDA build: unsupported GNU version! gcc versions later than X are not supported

error: unsupported GNU version! gcc versions later than 13 are not supported
By Fredoline Eruo · Last verified May 8, 2026

Cause

Each CUDA toolkit version supports a bounded range of host compilers. CUDA 12.4 supports gcc up to 13; CUDA 12.6 supports up to 14. Modern distros (Ubuntu 24.04, Fedora 40) ship gcc 14 by default, which fails against an older CUDA toolkit.

Solution

1. Install a supported gcc version side-by-side:

# Ubuntu
sudo apt install gcc-12 g++-12

# Fedora
sudo dnf install gcc-toolset-12

2. Point the build at it:

# CMake
cmake -B build -DGGML_CUDA=ON \
  -DCMAKE_C_COMPILER=gcc-12 \
  -DCMAKE_CXX_COMPILER=g++-12 \
  -DCMAKE_CUDA_HOST_COMPILER=g++-12

# Make
make GGML_CUDA=1 \
  CC=gcc-12 CXX=g++-12 \
  NVCCFLAGS="-ccbin g++-12" -j

3. Or update CUDA to a newer toolkit that supports your default gcc. CUDA 12.6+ supports gcc 14.

4. Quick override if you don't want to change the system gcc:

export NVCC_PREPEND_FLAGS='-allow-unsupported-compiler'

This is a hack — works often, fails on subtle ABI incompatibilities. Prefer a real fix.

Related errors

  • llama.cpp build fails: nvcc not found
  • llama.cpp build fails: nvcc not found / CUDA toolkit missing
  • exllamav2 ImportError: cannot import name 'ExLlamaV2' / undefined symbol
  • flash-attn install fails on Windows / no precompiled wheel

Did this fix it?

If your case was different, email support@runlocalai.co with what you saw and we'll update the page. If it worked but took different commands on your platform, we want to know that too.