Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 431808 - media-libs/opencv-2.4.2 GCC version check for CUDA is outdated
Summary: media-libs/opencv-2.4.2 GCC version check for CUDA is outdated
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] KDE (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Andreas K. Hüttel
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-18 03:27 UTC by Alejandro Dubrovsky
Modified: 2012-08-23 11:06 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alejandro Dubrovsky 2012-08-18 03:27:26 UTC
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
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2012-08-18 15:38:12 UTC
Please don't CC random people on bug reports.
Comment 2 Alejandro Dubrovsky 2012-08-18 16:08:27 UTC
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)
Comment 3 Andreas K. Hüttel archtester gentoo-dev 2012-08-19 20:02:53 UTC
(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...
Comment 4 Alejandro Dubrovsky 2012-08-20 09:52:43 UTC
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;
}
Comment 5 Andreas K. Hüttel archtester gentoo-dev 2012-08-23 11:06:55 UTC
OK thanks, bumped the dependency in opencv-2.4.2 and allowed gcc-4.6 with cuda.