Skip to content

Build failure with CUDA 12.9: nppGetStreamContext() removed from headers #27289

@ruisv

Description

@ruisv

System Information

OpenCV version: 4.11.0
Operating System / Platform: Fedora 30 / x86_64
Compiler & compiler version: GCC 12
CUDA Toolkit version: 12.9.0

Detailed description

When building OpenCV with CUDA 12.9, the build fails due to the removal of nppGetStreamContext() from the public headers by NVIDIA. This API is still used in modules/core/include/opencv2/core/private.cuda.hpp.

Error log excerpt:
Image

✅ Proposed Fix (already submitted in PR)
https://github.com/opencv/opencv/pull/27288
In the affected file private.cuda.hpp, add a version guard and manually construct NppStreamContext for CUDA 12.9+

Steps to reproduce

Issue submission checklist

  • I report the issue, it's not a question
  • I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
  • I updated to the latest OpenCV version and the issue is still there
  • There is reproducer code and related data files (videos, images, onnx, etc)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions