Category Archives: LLM

Fedora 42 Meets CUDA 12.9: The Quest to Build vllm (InstructLab)

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:-

  1. 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.
  2. CUDA toolkit headers/libs not found
    • Although Fedora’s CUDA 12.9 RPMs were installed, CMake couldn’t locate CUDA_INCLUDE_DIRS or CUDA_CUDART_LIBRARY.
    • Fix: set CUDA_HOME=/usr/local/cuda-12.9 and passed -DCUDA_TOOLKIT_ROOT_DIR & -DCUDA_SDK_ROOT_DIR to CMake.
  3. 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.
  4. 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, exporting CC=/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.”
  5. 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 mismatched noexcept(true) on sinpi/cospi vs system headers.
    • I patched those lines (removing or adding, I forget which, the trailing noexcept(true)) so cudafe++ could preprocess happily.
  6. Missing NVToolsExt library
    • After all that, CMake could find CUDA and compile—but hit kotlinCopyEditThe link interface of target "torch::nvtoolsext" contains: CUDA::nvToolsExt but the target was not found.
    • Looking under /usr/local/cuda-12.9, there was no libnvToolsExt.so* at all—only the NVTX‐3 interop helper (libnvtx3interop.so*) lived under the extracted toolkit tree.

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.