gpt4 book ai didi

opencv - 无法在Fedora 19上使用CUDA 5.5编译OpenCV 2.4.6

转载 作者:行者123 更新时间:2023-12-02 17:52:10 27 4
gpt4 key购买 nike

OpenCV 2.4.6添加了对CUDA 5.5的支持,但是尝试构建它失败。 CUDA是从Fedora 18的存储库中安装的。在没有CUDA支持的情况下,OpenCV本身也运行良好。

[  1%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/gpumat.cpp.o
/home/lucky/programming/sphinx/build/3rdparty/opencv/opencv-2.4.6.1/modules/core/src/gpumat.cpp:288:52: error: 'bool cv::gpu::deviceSupports(cv::gpu::FeatureSet)' should have been declared inside 'cv::gpu'
bool cv::gpu::deviceSupports(FeatureSet feature_set)
^
/home/lucky/programming/sphinx/build/3rdparty/opencv/opencv-2.4.6.1/modules/core/src/gpumat.cpp: In function 'bool cv::gpu::deviceSupports(cv::gpu::FeatureSet)':
/home/lucky/programming/sphinx/build/3rdparty/opencv/opencv-2.4.6.1/modules/core/src/gpumat.cpp:288:6: warning: no previous declaration for 'bool cv::gpu::deviceSupports(cv::gpu::FeatureSet)' [-Wmissing-declarations]
bool cv::gpu::deviceSupports(FeatureSet feature_set)
^
/home/lucky/programming/sphinx/build/3rdparty/opencv/opencv-2.4.6.1/modules/core/src/gpumat.cpp: At global scope:
/home/lucky/programming/sphinx/build/3rdparty/opencv/opencv-2.4.6.1/modules/core/src/gpumat.cpp:359:49: error: no 'size_t cv::gpu::DeviceInfo::sharedMemPerBlock() const' member function declared in class 'cv::gpu::DeviceInfo'
size_t cv::gpu::DeviceInfo::sharedMemPerBlock() const
^
/home/lucky/programming/sphinx/build/3rdparty/opencv/opencv-2.4.6.1/modules/core/src/gpumat.cpp: In function 'void cv::gpu::createContinuous(int, int, int, cv::gpu::GpuMat&)':
/home/lucky/programming/sphinx/build/3rdparty/opencv/opencv-2.4.6.1/modules/core/src/gpumat.cpp:794:6: error: redefinition of 'void cv::gpu::createContinuous(int, int, int, cv::gpu::GpuMat&)'
void cv::gpu::createContinuous(int rows, int cols, int type, GpuMat& m)
^
In file included from /home/lucky/programming/sphinx/build/3rdparty/opencv/opencv-2.4.6.1/modules/core/src/gpumat.cpp:44:0:
/home/lucky/programming/sphinx/build/output/include/opencv2/core/gpumat.hpp:551:17: error: 'void cv::gpu::createContinuous(int, int, int, cv::gpu::GpuMat&)' previously defined here
inline void createContinuous(int rows, int cols, int type, GpuMat& m)
^
/home/lucky/programming/sphinx/build/3rdparty/opencv/opencv-2.4.6.1/modules/core/src/gpumat.cpp: In function 'void cv::gpu::ensureSizeIsEnough(int, int, int, cv::gpu::GpuMat&)':
/home/lucky/programming/sphinx/build/3rdparty/opencv/opencv-2.4.6.1/modules/core/src/gpumat.cpp:806:6: error: redefinition of 'void cv::gpu::ensureSizeIsEnough(int, int, int, cv::gpu::GpuMat&)'
void cv::gpu::ensureSizeIsEnough(int rows, int cols, int type, GpuMat& m)
^
In file included from /home/lucky/programming/sphinx/build/3rdparty/opencv/opencv-2.4.6.1/modules/core/src/gpumat.cpp:44:0:
/home/lucky/programming/sphinx/build/output/include/opencv2/core/gpumat.hpp:559:17: error: 'void cv::gpu::ensureSizeIsEnough(int, int, int, cv::gpu::GpuMat&)' previously defined here
inline void ensureSizeIsEnough(int rows, int cols, int type, GpuMat& m)
^
/home/lucky/programming/sphinx/build/3rdparty/opencv/opencv-2.4.6.1/modules/core/src/gpumat.cpp: In function 'cv::gpu::GpuMat cv::gpu::allocMatFromBuf(int, int, int, cv::gpu::GpuMat&)':
/home/lucky/programming/sphinx/build/3rdparty/opencv/opencv-2.4.6.1/modules/core/src/gpumat.cpp:831:8: error: redefinition of 'cv::gpu::GpuMat cv::gpu::allocMatFromBuf(int, int, int, cv::gpu::GpuMat&)'
GpuMat cv::gpu::allocMatFromBuf(int rows, int cols, int type, GpuMat &mat)
^
In file included from /home/lucky/programming/sphinx/build/3rdparty/opencv/opencv-2.4.6.1/modules/core/src/gpumat.cpp:44:0:
/home/lucky/programming/sphinx/build/output/include/opencv2/core/gpumat.hpp:567:19: error: 'cv::gpu::GpuMat cv::gpu::allocMatFromBuf(int, int, int, cv::gpu::GpuMat&)' previously defined here
inline GpuMat allocMatFromBuf(int rows, int cols, int type, GpuMat &mat)
^
At global scope:
cc1plus: warning: unrecognized command line option "-Wno-unnamed-type-template-args" [enabled by default]
make[2]: *** [modules/core/CMakeFiles/opencv_core.dir/src/gpumat.cpp.o] Error 1
make[1]: *** [modules/core/CMakeFiles/opencv_core.dir/all] Error 2
make: *** [all] Error 2

有办法解决问题吗?还是GCC的新版本有问题吗?

最佳答案

看来@ jet47已选择不对评论中的我的请求进行回复,所以我要发布此答案,以便我们可以将此问题称为已回答(显然已在评论中。)

如果遇到这样的问题,请确保仅安装一个OpenCV版本。如果找到了除已安装版本以外的其他已安装版本,请将其删除。

关于opencv - 无法在Fedora 19上使用CUDA 5.5编译OpenCV 2.4.6,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17987413/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com