This is the same bug as https://bugs.gentoo.org/show_bug.cgi?id=418157, but updated for CUDA 4.2. CUDA is now is OK with gcc 4.6.x, but not anything newer. I don't know how maintainers find these bugs so I'll tag: OpenCV Reproducible: Always
Please don't CC random people on bug reports.
Sorry, it wasn't meant to be a random person, but the person that the related ticket was assigned to (and to whom now this ticket is assigned to, although I'm probably reading that wrong)
(In reply to comment #0) > This is the same bug as https://bugs.gentoo.org/show_bug.cgi?id=418157, but > updated for CUDA 4.2. CUDA is now is OK with gcc 4.6.x, but not anything > newer. > Sounds good... is there some documentation anywhere on the required gcc versions? I cant find it and cant test it myself right now...
I'm pretty sure I saw it somewhere on the NVidia site, but now I can't find it. The only relevant information I'm seeing is from the Ubuntu package: https://launchpad.net/ubuntu/+source/nvidia-cuda-toolkit/4.2.9-1/ FWIW, I've compiled it with gcc 4.6.3, and compiled and ran the sample program below successfully (it didn't work pre-GPU compilation, with a message saying GPU component wasn't compiled). #include <iostream> #include "opencv2/opencv.hpp" #include "opencv2/gpu/gpu.hpp" int main (int argc, char* argv[]) { try { cv::Mat src_host = cv::imread("file.png", CV_LOAD_IMAGE_GRAYSCALE); cv::gpu::GpuMat dst, src; src.upload(src_host); cv::gpu::threshold(src, dst, 128.0, 255.0, CV_THRESH_BINARY); cv::Mat result_host; dst.download(result_host); cv::imshow("Result", result_host); cv::waitKey(); } catch(const cv::Exception& ex) { std::cout << "Error: " << ex.what() << std::endl; } return 0; }
OK thanks, bumped the dependency in opencv-2.4.2 and allowed gcc-4.6 with cuda.