[CUDA] ambigous symbol error (Bug #4197)
Description
9>\opencv\modules\core\include\opencv2/core/persistence.hpp(1104): error C2872: 'internal' : ambiguous symbol 9> 9> could be 'cv::internal' 9> 9> or 'cv::cuda::internal' 9> 9> \opencv\modules\core\include\opencv2/core/persistence.hpp(684) : see reference to function template instantiation 'cv::FileNodeIterator &cv::operator >><int>(cv::FileNodeIterator &,std::vector<int,std::allocator<_Ty>> &)' being compiled 9> 9> with 9> 9> [ 9> 9> _Ty=int 9> 9> ] 9> 9> \opencv\modules\core\include\opencv2/core/persistence.hpp(730) : see reference to function template instantiation 'void cv::read<int>(const cv::FileNode &,cv::Point_<int> &,const cv::Point_<int> &)' being compiled 9> 9> CMake Error at cuda_compile_generated_minmax.cu.obj.cmake:264 (message): 9> Error generating file 9> /opencv/build/modules/cudaarithm/CMakeFiles/cuda_compile.dir/src/cuda/Debug/cuda_compile_generated_minmax.cu.obj
having a german ide so messages are german.
seems to be an ambiguous symbol error, maybe due to overlapped global namespaces?
located the commit where this was introduced (!TESTED!): https://github.com/Itseez/opencv/commit/16b56e71d97e70c93fb1eb2f2758bfd004d20303
Using VS2013 and CUDA 6.5 on Windows 8.1.
Associated revisions
Merge pull request #4197 from themightyoarfish:projectPointsDocBugfix
History
Updated by Philip L about 10 years ago
Philip Laube wrote:
[...]
having a german ide so messages are german.
[...]
installed lang pack so errors now in english :P
Updated by Vladislav Vinogradov about 10 years ago
Hello Philip,
Thank you for your report! I submitted a fix for that issue (https://github.com/Itseez/opencv/pull/3701).
Could you please check this fix?
- Status changed from New to Open
- Pull request set to https://github.com/Itseez/opencv/pull/3701
Updated by Philip L about 10 years ago
Hello Vladislav,
thank you for your response.
Thank you for your work.
Unfortunately the error remains with your PR included.
exact same line and error.
Updated by Steven Puttemans about 10 years ago
I can tell that on Ubuntu 14.04 this problem does not exist. Just pulled the latest build and the 3.0 branch just builds perfectly fine without ambiguity.
Are you sure that you pulled the latest version?
Updated by Philip L about 10 years ago
yes i have the latest version of the master branch.
I also investigated which commit (see above) added this failure.
I think this is a VS2013 specific problem or maybe a problem of the combination between 6.5 with VS2013.
Unfortunately i do not have another ide to test the compilation but since prior to the commit mentioned above the compilation works there will be a problem in the future. (VS2015 also coming if VS specific)
Updated by Vladislav Vinogradov about 10 years ago
I was able to reproduce this issue with VS 2012. It seems that it is VS specific issue.
I will investigate this issue.
Updated by Can Cagman about 10 years ago
As given in the error message, cuda::internal namespace defined in
minmax.cu line:137
norm.cu line:131
reductions.cpp line:87
conflicts with the cuda::internal namespace.
Actually one should avoid using "using namespace cuda".
But for a quick solution, I gave another name for cuda::internal namespace and it worked.
Then, lines
minmax.cu line:158
norm.cu line 161
reductions.cpp line: 109 and 113
should also be changed.
Updated by Vladislav Vinogradov about 10 years ago
Yes, renaming helps. I submitted new pull request with the fix : https://github.com/Itseez/opencv/pull/3712
- Pull request changed from https://github.com/Itseez/opencv/pull/3701 to https://github.com/Itseez/opencv/pull/3712
Updated by Philip L about 10 years ago
yep this works
Updated by Philip L about 10 years ago
- Status changed from Open to Done
- % Done changed from 0 to 100