Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CPP20] [CUDA] Error: function "std::__detail::__variant::_Variadic_union<_First, _Rest...>::~_Variadic_union()" is deleted #42624

Closed
iarspider opened this issue Aug 22, 2023 · 4 comments · Fixed by #42755

Comments

@iarspider
Copy link
Contributor

iarspider commented Aug 22, 2023

During compilation of DataFormats/HcalDigi package, the following errors is emitted:

/data/cmsbld/jenkins/workspace/build-any-ib/w/el8_amd64_gcc12/external/gcc/12.3.1-40d504be6370b5a30e3947a6e575ca28/include/c++/12.3.1/variant(479): error: function "std::__detail::__variant::_Variadic_union<_First, _Rest...>::~_Variadic_union() [with _First=unsigned int, _Rest=<edm::detail::GetThinnedKeyFromExceptionFactory, std::monostate>]" (declared at line 400) cannot be referenced -- it is a deleted function
        ~_Variant_storage()
        ^
          detected during:
            instantiation of "std::__detail::__variant::_Variant_storage<false, _Types...>::~_Variant_storage() [with _Types=<unsigned int, edm::detail::GetThinnedKeyFromExceptionFactory, std::monostate>]" at line 136 of /data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/bde6290197b40a7abece5e0ce6f36880/opt/cmssw/el8_amd64_gcc12/cms/cmssw/CMSSW_13_3_CPP20_X_2023-08-21-1100/src/DataFormats/Common/interface/RefItemGet.h
            implicit generation of "std::__detail::__variant::_Copy_ctor_base<<unnamed>, _Types...>::~_Copy_ctor_base() noexcept [with <unnamed>=false, _Types=<unsigned int, edm::detail::GetThinnedKeyFromExceptionFactory, std::monostate>]" at line 136 of /data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/bde6290197b40a7abece5e0ce6f36880/opt/cmssw/el8_amd64_gcc12/cms/cmssw/CMSSW_13_3_CPP20_X_2023-08-21-1100/src/DataFormats/Common/interface/RefItemGet.h
            instantiation of class "std::__detail::__variant::_Copy_ctor_base<<unnamed>, _Types...> [with <unnamed>=false, _Types=<unsigned int, edm::detail::GetThinnedKeyFromExceptionFactory, std::monostate>]" at line 136 of /data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/bde6290197b40a7abece5e0ce6f36880/opt/cmssw/el8_amd64_gcc12/cms/cmssw/CMSSW_13_3_CPP20_X_2023-08-21-1100/src/DataFormats/Common/interface/RefItemGet.h
            implicit generation of "std::__detail::__variant::_Move_ctor_base<<unnamed>, _Types...>::~_Move_ctor_base() noexcept [with <unnamed>=false, _Types=<unsigned int, edm::detail::GetThinnedKeyFromExceptionFactory, std::monostate>]" at line 136 of /data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/bde6290197b40a7abece5e0ce6f36880/opt/cmssw/el8_amd64_gcc12/cms/cmssw/CMSSW_13_3_CPP20_X_2023-08-21-1100/src/DataFormats/Common/interface/RefItemGet.h
            instantiation of class "std::__detail::__variant::_Move_ctor_base<<unnamed>, _Types...> [with <unnamed>=false, _Types=<unsigned int, edm::detail::GetThinnedKeyFromExceptionFactory, std::monostate>]" at line 136 of /data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/bde6290197b40a7abece5e0ce6f36880/opt/cmssw/el8_amd64_gcc12/cms/cmssw/CMSSW_13_3_CPP20_X_2023-08-21-1100/src/DataFormats/Common/interface/RefItemGet.h
            [ 2 instantiation contexts not shown ]
            implicit generation of "std::__detail::__variant::_Move_assign_base<<unnamed>, _Types...>::~_Move_assign_base() noexcept [with <unnamed>=false, _Types=<unsigned int, edm::detail::GetThinnedKeyFromExceptionFactory, std::monostate>]" at line 136 of /data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/bde6290197b40a7abece5e0ce6f36880/opt/cmssw/el8_amd64_gcc12/cms/cmssw/CMSSW_13_3_CPP20_X_2023-08-21-1100/src/DataFormats/Common/interface/RefItemGet.h
            instantiation of class "std::__detail::__variant::_Move_assign_base<<unnamed>, _Types...> [with <unnamed>=false, _Types=<unsigned int, edm::detail::GetThinnedKeyFromExceptionFactory, std::monostate>]" at line 136 of /data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/bde6290197b40a7abece5e0ce6f36880/opt/cmssw/el8_amd64_gcc12/cms/cmssw/CMSSW_13_3_CPP20_X_2023-08-21-1100/src/DataFormats/Common/interface/RefItemGet.h
            implicit generation of "std::__detail::__variant::_Variant_base<_Types...>::~_Variant_base() noexcept [with _Types=<unsigned int, edm::detail::GetThinnedKeyFromExceptionFactory, std::monostate>]" at line 136 of /data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/bde6290197b40a7abece5e0ce6f36880/opt/cmssw/el8_amd64_gcc12/cms/cmssw/CMSSW_13_3_CPP20_X_2023-08-21-1100/src/DataFormats/Common/interface/RefItemGet.h
            instantiation of class "std::__detail::__variant::_Variant_base<_Types...> [with _Types=<unsigned int, edm::detail::GetThinnedKeyFromExceptionFactory, std::monostate>]" at line 136 of /data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/bde6290197b40a7abece5e0ce6f36880/opt/cmssw/el8_amd64_gcc12/cms/cmssw/CMSSW_13_3_CPP20_X_2023-08-21-1100/src/DataFormats/Common/interface/RefItemGet.h
            instantiation of class "std::variant<_Types...> [with _Types=<unsigned int, edm::detail::GetThinnedKeyFromExceptionFactory, std::monostate>]" at line 136 of /data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/bde6290197b40a7abece5e0ce6f36880/opt/cmssw/el8_amd64_gcc12/cms/cmssw/CMSSW_13_3_CPP20_X_2023-08-21-1100/src/DataFormats/Common/interface/RefItemGet.h

1 error detected in the compilation of "/data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/bde6290197b40a7abece5e0ce6f36880/opt/cmssw/el8_amd64_gcc12/cms/cmssw/CMSSW_13_3_CPP20_X_2023-08-21-1100/src/DataFormats/HcalDigi/test/test_hcal_digi.cu".

Full log: 1, 2 - the compilation fails for the same file

@cmsbuild
Copy link
Contributor

A new Issue was created by @iarspider .

@Dr15Jones, @perrotta, @dpiparo, @rappoccio, @makortel, @smuzaffar, @antoniovilela can you please review it and eventually sign/assign? Thanks.

cms-bot commands are listed here

@iarspider iarspider changed the title [CPP20] Error: function "std::__detail::__variant::_Variadic_union<_First, _Rest...>::~_Variadic_union()" is deleted [CPP20] [CUDA] Error: function "std::__detail::__variant::_Variadic_union<_First, _Rest...>::~_Variadic_union()" is deleted Aug 22, 2023
@iarspider
Copy link
Contributor Author

assign heterogeneous

@cmsbuild
Copy link
Contributor

New categories assigned: heterogeneous

@fwyzard,@makortel you have been requested to review this Pull request/Issue and eventually sign? Thanks

@makortel
Copy link
Contributor

So the error is coming from nvcc. The edm::Ref stuff gets included via

#include "DataFormats/HcalDigi/interface/HcalDigiCollections.h"

#include "DataFormats/Common/interface/SortedCollection.h"

#include "DataFormats/Common/interface/Ref.h"

Thinking a workaround, on quick look it seems to me the #include of Ref.h in SortedCollection.h might not be necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants