Over the past couple of weeks I’ve been wrestling with building vllm (with CUDA support) under Fedora 42. Here’s the short version of what went wrong:-
- Python version confusion
- My virtualenv was pointing at Python 3.11 but CMake kept complaining it couldn’t find “python3.11.”
- Fix: explicitly passed
-DPYTHON_EXECUTABLE=$(which python)
to CMake, which got past the Python lookup errors.
- CUDA toolkit headers/libs not found
- Although Fedora’s CUDA 12.9 RPMs were installed, CMake couldn’t locate
CUDA_INCLUDE_DIRS
orCUDA_CUDART_LIBRARY
. - Fix: set
CUDA_HOME=/usr/local/cuda-12.9
and passed-DCUDA_TOOLKIT_ROOT_DIR
&-DCUDA_SDK_ROOT_DIR
to CMake.
- Although Fedora’s CUDA 12.9 RPMs were installed, CMake couldn’t locate
- cuDNN import errors
- Pip’s PyTorch import of
libcudnn.so.9
failed during the vllm build. - Fix: reinstalled torch/cu121 via the official PyTorch Cu121 wheel index so that all the nvidia-cudnn-cu12 wheels were in place.
- Pip’s PyTorch import of
- GCC / Clang version mismatches
- CUDA 12.9’s nvcc choked on GCC 15 (“unsupported GNU version”) and later on Clang 20.
- Tried installing gcc-14 and symlinking it into
PATH
, exportingCC=/usr/bin/gcc-14
/CXX=/usr/bin/g++-14
, and even passing-DCMAKE_CUDA_HOST_COMPILER
, but CMake’s CUDA‐ID test was still failing on the Fedora header mismatch. - Ultimately we switched to Clang 20 with
--allow-unsupported-compiler
, which let us get past the version “block.”
- Math header noexcept conflicts
- CMake’s nvcc identification build then ran into four “expected a declaration” errors in CUDA’s
math_functions.h
, caused by mismatchednoexcept(true)
onsinpi
/cospi
vs system headers. - I patched those lines (removing or adding, I forget which, the trailing
noexcept(true)
) so cudafe++ could preprocess happily.
- CMake’s nvcc identification build then ran into four “expected a declaration” errors in CUDA’s
- Missing NVToolsExt library
- After all that, CMake could find CUDA and compile—but hit kotlinCopyEdit
The link interface of target "torch::nvtoolsext" contains: CUDA::nvToolsExt but the target was not found.
- Looking under
/usr/local/cuda-12.9
, there was nolibnvToolsExt.so*
at all—only the NVTX‐3 interop helper (libnvtx3interop.so*
) lived under the extracted toolkit tree.
- After all that, CMake could find CUDA and compile—but hit kotlinCopyEdit
Current hurdle
I still don’t have the core NVTX library (libnvToolsExt.so
.*) in /usr/local/cuda-12.9/…/lib
, so the CMake target CUDA::nvToolsExt
remains unavailable. This library appears to be missing from the both the Fedora cuda-nvtx
and the NVIDIA nvtx toolkit download/runfile. This appears to be a known issue with recent versions.
Work continues and a full process will be documented, once successful.