`error: "cuda::std::cuda" is ambiguous` when including <cuda/std>
fjrdev opened this issue · 6 comments
Im using the libcu++ library for a cuda project. Including the complex-header via #include <cuda/std/complex>
throws > 100 errors:
/usr/local/include/cuda/std/detail/libcxx/include/__utility/declval.h(33): error: "cuda::std::cuda" is ambiguous
/usr/local/include/cuda/std/detail/libcxx/include/__functional/invoke.h(348): error: "cuda::std::cuda" is ambiguous
/usr/local/include/cuda/std/detail/libcxx/include/__functional/invoke.h(348): error: expected an expression
/usr/local/include/cuda/std/detail/libcxx/include/__functional/invoke.h(348): error: "cuda::std::cuda" is ambiguous
/usr/local/include/cuda/std/detail/libcxx/include/__functional/invoke.h(348): error: expected an expression
/usr/local/include/cuda/std/detail/libcxx/include/__functional/invoke.h(348): error: "cuda::std::cuda" is ambiguous
/usr/local/include/cuda/std/detail/libcxx/include/__functional/invoke.h(348): error: expected an expression
/usr/local/include/cuda/std/detail/libcxx/include/__functional/invoke.h(348): error: pack expansion does not make use of any argument pack
/usr/local/include/cuda/std/detail/libcxx/include/__functional/invoke.h(356): error: "cuda::std::cuda" is ambiguous
/usr/local/include/cuda/std/detail/libcxx/include/__functional/invoke.h(356): error: expected an expression
/usr/local/include/cuda/std/detail/libcxx/include/__functional/invoke.h(356): error: "cuda::std::cuda" is ambiguous
/usr/local/include/cuda/std/detail/libcxx/include/__functional/invoke.h(356): error: expected an expression
/usr/local/include/cuda/std/detail/libcxx/include/__functional/invoke.h(356): error: "cuda::std::cuda" is ambiguous
/usr/local/include/cuda/std/detail/libcxx/include/__functional/invoke.h(356): error: expected an expression
/usr/local/include/cuda/std/detail/libcxx/include/__functional/invoke.h(356): error: pack expansion does not make use of any argument packs
/usr/local/include/cuda/std/detail/libcxx/include/__functional/invoke.h(357): error: function template "cuda::std::__4::__invoke(_Fp &&, _A0 &&, _Args &&...)" has already been defined
/usr/local/include/cuda/std/detail/libcxx/include/__functional/invoke.h(364): error: "cuda::std::cuda" is ambiguous
/usr/local/include/cuda/std/detail/libcxx/include/__functional/invoke.h(364): error: expected an expression
/usr/local/include/cuda/std/detail/libcxx/include/__functional/invoke.h(364): error: "cuda::std::cuda" is ambiguous
/usr/local/include/cuda/std/detail/libcxx/include/__functional/invoke.h(364): error: expected an expression
/usr/local/include/cuda/std/detail/libcxx/include/__functional/invoke.h(364): error: "cuda::std::cuda" is ambiguous
/usr/local/include/cuda/std/detail/libcxx/include/__functional/invoke.h(364): error: expected an expression
/usr/local/include/cuda/std/detail/libcxx/include/__functional/invoke.h(364): error: pack expansion does not make use of any argument packs
/usr/local/include/cuda/std/detail/libcxx/include/__functional/invoke.h(365): error: function template "cuda::std::__4::__invoke(_Fp &&, _A0 &&, _Args &&...)" has already been defined
/usr/local/include/cuda/std/detail/libcxx/include/__functional/invoke.h(374): error: "cuda::std::cuda" is ambiguous
/usr/local/include/cuda/std/detail/libcxx/include/__functional/invoke.h(374): error: expected an expression
/usr/local/include/cuda/std/detail/libcxx/include/__functional/invoke.h(374): error: "cuda::std::cuda" is ambiguous
/usr/local/include/cuda/std/detail/libcxx/include/__functional/invoke.h(374): error: expected an expression
/usr/local/include/cuda/std/detail/libcxx/include/__functional/invoke.h(382): error: "cuda::std::cuda" is ambiguous
/usr/local/include/cuda/std/detail/libcxx/include/__functional/invoke.h(382): error: expected an expression
/usr/local/include/cuda/std/detail/libcxx/include/__functional/invoke.h(382): error: "cuda::std::cuda" is ambiguous
/usr/local/include/cuda/std/detail/libcxx/include/__functional/invoke.h(382): error: expected an expression
/usr/local/include/cuda/std/detail/libcxx/include/__functional/invoke.h(383): error: function template "cuda::std::__4::__invoke(_Fp &&, _A0 &&)" has already been defined
/usr/local/include/cuda/std/detail/libcxx/include/__functional/invoke.h(390): error: "cuda::std::cuda" is ambiguous
/usr/local/include/cuda/std/detail/libcxx/include/__functional/invoke.h(390): error: expected an expression
/usr/local/include/cuda/std/detail/libcxx/include/__functional/invoke.h(390): error: "cuda::std::cuda" is ambiguous
/usr/local/include/cuda/std/detail/libcxx/include/__functional/invoke.h(390): error: expected an expression
/usr/local/include/cuda/std/detail/libcxx/include/__functional/invoke.h(391): error: function template "cuda::std::__4::__invoke(_Fp &&, _A0 &&)" has already been defined
/usr/local/include/cuda/std/detail/libcxx/include/__functional/invoke.h(399): error: "cuda::std::cuda" is ambiguous
/usr/local/include/cuda/std/detail/libcxx/include/__functional/invoke.h(399): error: expected an expression
/usr/local/include/cuda/std/detail/libcxx/include/__functional/invoke.h(399): error: "cuda::std::cuda" is ambiguous
/usr/local/include/cuda/std/detail/libcxx/include/__functional/invoke.h(399): error: expected an expression
/usr/local/include/cuda/std/detail/libcxx/include/__functional/invoke.h(399): error: pack expansion does not make use of any argument packs
/usr/local/include/cuda/std/detail/libcxx/include/__functional/invoke.h(410): error: "cuda" is ambiguous
/usr/local/include/cuda/std/detail/libcxx/include/__functional/invoke.h(410): error: "cuda" is ambiguous
/usr/local/include/cuda/std/detail/libcxx/include/__functional/invoke.h(410): error: expected an expression
/usr/local/include/cuda/std/detail/libcxx/include/__functional/invoke.h(410): error: "cuda" is ambiguous
/usr/local/include/cuda/std/detail/libcxx/include/__functional/invoke.h(410): error: expected an expression
/usr/local/include/cuda/std/detail/libcxx/include/__functional/invoke.h(410): error: pack expansion does not make use of any argument packs
/usr/local/include/cuda/std/detail/libcxx/include/__functional/invoke.h(444): error: "cuda" is ambiguous
/usr/local/include/cuda/std/detail/libcxx/include/__functional/invoke.h(444): error: "cuda" is ambiguous
/usr/local/include/cuda/std/detail/libcxx/include/__functional/invoke.h(444): error: expected an expression
/usr/local/include/cuda/std/detail/libcxx/include/__functional/invoke.h(444): error: pack expansion does not make use of any argument packs
/usr/local/include/cuda/std/detail/libcxx/include/__functional/invoke.h(451): error: "cuda" is ambiguous
/usr/local/include/cuda/std/detail/libcxx/include/__functional/invoke.h(451): error: "cuda" is ambiguous
/usr/local/include/cuda/std/detail/libcxx/include/__functional/invoke.h(451): error: expected an expression
/usr/local/include/cuda/std/detail/libcxx/include/__functional/invoke.h(451): error: "cuda" is ambiguous
/usr/local/include/cuda/std/detail/libcxx/include/__functional/invoke.h(451): error: expected an expression
/usr/local/include/cuda/std/detail/libcxx/include/__functional/invoke.h(451): error: pack expansion does not make use of any argument packs
/usr/local/include/cuda/std/detail/libcxx/include/__type_traits/is_allocator.h(34): error: "cuda::std::cuda" is ambiguous
/usr/local/include/cuda/std/detail/libcxx/include/__type_traits/is_allocator.h(34): error: expected an expression
/usr/local/include/cuda/std/detail/libcxx/include/__type_traits/is_allocator.h(34): error: expected an expression
/usr/local/include/cuda/std/detail/libcxx/include/__type_traits/is_assignable.h(44): error: "cuda::std::cuda" is ambiguous
/usr/local/include/cuda/std/detail/libcxx/include/__type_traits/is_assignable.h(44): error: expected an expression
/usr/local/include/cuda/std/detail/libcxx/include/__type_traits/is_assignable.h(44): error: "cuda::std::cuda" is ambiguous
/usr/local/include/cuda/std/detail/libcxx/include/__type_traits/is_assignable.h(44): error: expected an expression
/usr/local/include/cuda/std/detail/libcxx/include/__type_traits/is_assignable.h(53): error: "cuda" is ambiguous
/usr/local/include/cuda/std/detail/libcxx/include/__type_traits/is_assignable.h(53): error: type name is not allowed
/usr/local/include/cuda/std/detail/libcxx/include/__type_traits/is_destructible.h(56): error: "cuda" is ambiguous
/usr/local/include/cuda/std/detail/libcxx/include/__type_traits/is_destructible.h(56): error: expected an expression
/usr/local/include/cuda/std/detail/libcxx/include/__type_traits/is_destructible.h(56): error: expected an expression
/usr/local/include/cuda/std/detail/libcxx/include/__type_traits/is_constructible.h(86): error: "cuda::std::cuda" is ambiguous
/usr/local/include/cuda/std/detail/libcxx/include/__type_traits/is_constructible.h(86): error: expected an expression
/usr/local/include/cuda/std/detail/libcxx/include/__type_traits/is_constructible.h(91): error: "cuda::std::cuda" is ambiguous
/usr/local/include/cuda/std/detail/libcxx/include/__type_traits/is_constructible.h(91): error: expected an expression
/usr/local/include/cuda/std/detail/libcxx/include/__type_traits/is_constructible.h(103): error: "cuda::std::cuda" is ambiguous
/usr/local/include/cuda/std/detail/libcxx/include/__type_traits/is_constructible.h(103): error: expected an expression
/usr/local/include/cuda/std/detail/libcxx/include/__type_traits/is_constructible.h(103): error: pack expansion does not make use of any argument packs
/usr/local/include/cuda/std/detail/libcxx/include/__type_traits/is_constructible.h(110): error: "cuda::std::cuda" is ambiguous
/usr/local/include/cuda/std/detail/libcxx/include/__type_traits/is_constructible.h(110): error: expected an expression
/usr/local/include/cuda/std/detail/libcxx/include/__type_traits/is_convertible.h(52): error: "cuda::std::cuda" is ambiguous
/usr/local/include/cuda/std/detail/libcxx/include/__type_traits/is_convertible.h(52): error: "cuda::std::cuda" is ambiguous
/usr/local/include/cuda/std/detail/libcxx/include/__type_traits/is_convertible.h(52): error: expected an expression
/usr/local/include/cuda/std/detail/libcxx/include/__type_traits/is_nothrow_assignable.h(50): error: "cuda" is ambiguous
/usr/local/include/cuda/std/detail/libcxx/include/__type_traits/is_nothrow_assignable.h(50): error: expected an expression
/usr/local/include/cuda/std/detail/libcxx/include/__type_traits/is_nothrow_assignable.h(50): error: "cuda" is ambiguous
/usr/local/include/cuda/std/detail/libcxx/include/__type_traits/is_nothrow_assignable.h(50): error: expected an expression
/usr/local/include/cuda/std/detail/libcxx/include/__type_traits/is_nothrow_constructible.h(48): error: "cuda" is ambiguous
/usr/local/include/cuda/std/detail/libcxx/include/__type_traits/is_nothrow_constructible.h(48): error: expected an expression
/usr/local/include/cuda/std/detail/libcxx/include/__type_traits/is_nothrow_constructible.h(48): error: pack expansion does not make use of any argument packs
/usr/local/include/cuda/std/detail/libcxx/include/__type_traits/is_nothrow_constructible.h(57): error: "cuda" is ambiguous
/usr/local/include/cuda/std/detail/libcxx/include/__type_traits/is_nothrow_constructible.h(57): error: expected an expression
/usr/local/include/cuda/std/detail/libcxx/include/__type_traits/is_nothrow_destructible.h(51): error: "cuda" is ambiguous
/usr/local/include/cuda/std/detail/libcxx/include/__type_traits/is_nothrow_destructible.h(51): error: expected an expression
/usr/local/include/cuda/std/detail/libcxx/include/__type_traits/is_valid_expansion.h(31): error: "cuda" is ambiguous
/usr/local/include/cuda/std/detail/libcxx/include/__type_traits/is_valid_expansion.h(31): error: type name is not allowed
/usr/local/include/cuda/std/detail/libcxx/include/__type_traits/is_valid_expansion.h(31): error: expected a ")"
/usr/local/include/cuda/std/detail/libcxx/include/__type_traits/is_valid_expansion.h(31): error: parameter pack "_Args" was referenced but not expanded
/usr/local/include/cuda/std/detail/libcxx/include/__type_traits/is_swappable.h(68): error: "cuda" is ambiguous
/usr/local/include/cuda/std/detail/libcxx/include/__type_traits/is_swappable.h(68): error: expected an expression
Error limit reached.
I have cloned libcu++ into my project and build it without errors. Im not quite sure what causes these types of errors and I could not find anything comparable online.
Hm, this sounds like some namespace shenanigans.
Are you doing anything like using namespace cuda
or opening namespace cuda{
yourself somewhere?
@jrhemstad No, im not opening or using a cuda namespace in this project
I tried to replicate the error in a less complex project. These errors just appear when #include <cuda/std/complex>
or #include <cuda/std/ccomplex>
. Everything else seems to work fine.
Is there a link to the project or a minimal reproducer you could share?
I could identify the source of the error. A file I was including used the cv namespace somewhere...
Thanks @jrhemstad and @miscco for the help and for your time!
I'm glad you got it figured out! Don't hesitate to reach out again in the future with any issues or questions you have.