QualityControl not compiling under gcc9

Dear experts,

There is a problem compiling QualityControl under gcc9 (see below). I recall there was a similar problem in O2 (framework), but this seems to have been solved. Could this fix please ported also to QualityControl?

Thanks in advance!

Cheers

Markus

/software/markus/alice/sw/BUILD/7ed4bed81e955447132bd6079fa4bb580717e856/QualityControl/Framework/G__QualityControl_rdict.pcm /software/markus/alice/sw/BUILD/7ed4bed81e955447132bd6079fa4bb580717e856/QualityControl/lib/G__QualityControl_rdict.pcm
In file included from input_line_11:68:
In file included from /software/markus/alice/sw/ubuntu1804_x86-64/O2/aliceo2-1/include/Framework/DataProcessorSpec.h:13:
In file included from /software/markus/alice/sw/ubuntu1804_x86-64/O2/aliceo2-1/include/Framework/AlgorithmSpec.h:13:
In file included from /software/markus/alice/sw/ubuntu1804_x86-64/O2/aliceo2-1/include/Framework/ProcessingContext.h:13:
In file included from /software/markus/alice/sw/ubuntu1804_x86-64/O2/aliceo2-1/include/Framework/InputRecord.h:14:
In file included from /software/markus/alice/sw/ubuntu1804_x86-64/O2/aliceo2-1/include/Framework/DataRefUtils.h:16:
In file included from /software/markus/alice/sw/ubuntu1804_x86-64/O2/aliceo2-1/include/Framework/DataSpecUtils.h:13:
In file included from /software/markus/alice/sw/ubuntu1804_x86-64/O2/aliceo2-1/include/Framework/OutputSpec.h:17:
/usr/include/c++/9/variant:156:13: error: cannot cast private base class 'std::__detail::__variant::_Variant_storage<false, unsigned int, unsigned long, std::__cxx11::basic_string<char>, o2::framework::data_matcher::None>' to 'std::variant<unsigned int, unsigned long, std::__cxx11::basic_string<char>, o2::framework::data_matcher::None>'
            return static_cast<variant<_Types...>&>(__rhs);
                   ^
/usr/include/c++/9/variant:392:7: note: in instantiation of function template specialization 'std::__variant_cast<unsigned int, unsigned long, std::__cxx11::basic_string<char>, o2::framework::data_matcher::None, std::__detail::__variant::_Variant_storage<false, unsigned int, unsigned long, std::__cxx11::basic_string<char>, o2::framework::data_matcher::None> &>' requested here
          }, __variant_cast<_Types...>(*this));
             ^
/usr/include/c++/9/variant:397:2: note: in instantiation of member function 'std::__detail::__variant::_Variant_storage<false, unsigned int, unsigned long, std::__cxx11::basic_string<char>, o2::framework::data_matcher::None>::_M_reset_impl' requested here
        _M_reset_impl();
        ^
/usr/include/c++/9/variant:402:9: note: in instantiation of member function 'std::__detail::__variant::_Variant_storage<false, unsigned int, unsigned long, std::__cxx11::basic_string<char>, o2::framework::data_matcher::None>::_M_reset' requested here
      { _M_reset(); }
        ^
/usr/include/c++/9/variant:492:20: note: in instantiation of member function 'std::__detail::__variant::_Variant_storage<false, unsigned int, unsigned long, std::__cxx11::basic_string<char>, o2::framework::data_matcher::None>::~_Variant_storage' requested here
      using _Base::_Base;
                   ^
/usr/include/c++/9/variant:1220:7: note: constrained by private inheritance here
    : private __detail::__variant::_Variant_base<_Types...>,
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/9/variant:154:13: error: cannot cast private base class 'const std::__detail::__variant::_Copy_ctor_base<false, o2::framework::ConcreteDataMatcher, o2::framework::data_matcher::DataDescriptorMatcher>' to 'const std::variant<o2::framework::ConcreteDataMatcher, o2::framework::data_matcher::DataDescriptorMatcher>'
            return static_cast<const variant<_Types...>&>(__rhs);
                   ^
/usr/include/c++/9/variant:482:5: note: in instantiation of function template specialization 'std::__variant_cast<o2::framework::ConcreteDataMatcher, o2::framework::data_matcher::DataDescriptorMatcher, const std::__detail::__variant::_Copy_ctor_base<false, o2::framework::ConcreteDataMatcher, o2::framework::data_matcher::DataDescriptorMatcher> &>' requested here
        }, __variant_cast<_Types...>(std::forward<_Up>(__rhs)));
           ^
/usr/include/c++/9/variant:497:2: note: in instantiation of function template specialization 'std::__detail::__variant::__variant_construct<o2::framework::ConcreteDataMatcher, o2::framework::data_matcher::DataDescriptorMatcher, std::__detail::__variant::_Copy_ctor_base<false, o2::framework::ConcreteDataMatcher, o2::framework::data_matcher::DataDescriptorMatcher> &, const std::__detail::__variant::_Copy_ctor_base<false, o2::framework::ConcreteDataMatcher, o2::framework::data_matcher::DataDescriptorMatcher> &>' requested here
        __variant_construct<_Types...>(*this, __rhs);
        ^
/usr/include/c++/9/variant:544:7: note: in instantiation of member function 'std::__detail::__variant::_Copy_ctor_base<false, o2::framework::ConcreteDataMatcher, o2::framework::data_matcher::DataDescriptorMatcher>::_Copy_ctor_base' requested here
      _Move_ctor_base(const _Move_ctor_base&) = default;
      ^
/usr/include/c++/9/bits/stl_uninitialized.h:83:8: note: in instantiation of function template specialization 'std::_Construct<o2::framework::InputSpec, const o2::framework::InputSpec &>' requested here
                std::_Construct(std::__addressof(*__cur), *__first);
                     ^
/usr/include/c++/9/bits/stl_uninitialized.h:140:2: note: in instantiation of function template specialization 'std::__uninitialized_copy<false>::__uninit_copy<__gnu_cxx::__normal_iterator<const o2::framework::InputSpec *, std::vector<o2::framework::InputSpec, std::allocator<o2::framework::InputSpec> > >, o2::framework::InputSpec *>' requested here
        __uninit_copy(__first, __last, __result);
        ^
/usr/include/c++/9/bits/stl_uninitialized.h:307:19: note: in instantiation of function template specialization 'std::uninitialized_copy<__gnu_cxx::__normal_iterator<const o2::framework::InputSpec *, std::vector<o2::framework::InputSpec, std::allocator<o2::framework::InputSpec> > >, o2::framework::InputSpec *>' requested here
    { return std::uninitialized_copy(__first, __last, __result); }
                  ^
/usr/include/c++/9/bits/stl_vector.h:555:9: note: in instantiation of function template specialization 'std::__uninitialized_copy_a<__gnu_cxx::__normal_iterator<const o2::framework::InputSpec *, std::vector<o2::framework::InputSpec, std::allocator<o2::framework::InputSpec> > >, o2::framework::InputSpec *, o2::framework::InputSpec>' requested here
          std::__uninitialized_copy_a(__x.begin(), __x.end(),
               ^
input_line_11:123:52: note: in instantiation of member function 'std::vector<o2::framework::InputSpec, std::allocator<o2::framework::InputSpec> >::vector' requested here
  o2::framework::Inputs getInputs() const { return mInputs; };
                                                   ^
/usr/include/c++/9/variant:1220:7: note: constrained by private inheritance here
    : private __detail::__variant::_Variant_base<_Types...>,
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/9/variant:156:13: error: cannot cast private base class 'std::__detail::__variant::_Variant_storage<false, o2::framework::ConcreteDataMatcher, o2::framework::data_matcher::DataDescriptorMatcher>' to 'std::variant<o2::framework::ConcreteDataMatcher, o2::framework::data_matcher::DataDescriptorMatcher>'
            return static_cast<variant<_Types...>&>(__rhs);
                   ^
/usr/include/c++/9/variant:392:7: note: in instantiation of function template specialization 'std::__variant_cast<o2::framework::ConcreteDataMatcher, o2::framework::data_matcher::DataDescriptorMatcher, std::__detail::__variant::_Variant_storage<false, o2::framework::ConcreteDataMatcher, o2::framework::data_matcher::DataDescriptorMatcher> &>' requested here
          }, __variant_cast<_Types...>(*this));
             ^
/usr/include/c++/9/variant:397:2: note: in instantiation of member function 'std::__detail::__variant::_Variant_storage<false, o2::framework::ConcreteDataMatcher, o2::framework::data_matcher::DataDescriptorMatcher>::_M_reset_impl' requested here
        _M_reset_impl();
        ^
/usr/include/c++/9/variant:402:9: note: in instantiation of member function 'std::__detail::__variant::_Variant_storage<false, o2::framework::ConcreteDataMatcher, o2::framework::data_matcher::DataDescriptorMatcher>::_M_reset' requested here
      { _M_reset(); }
        ^
/usr/include/c++/9/variant:489:12: note: in instantiation of member function 'std::__detail::__variant::_Variant_storage<false, o2::framework::ConcreteDataMatcher, o2::framework::data_matcher::DataDescriptorMatcher>::~_Variant_storage' requested here
    struct _Copy_ctor_base : _Variant_storage_alias<_Types...>
           ^
/usr/include/c++/9/bits/stl_uninitialized.h:83:8: note: in instantiation of function template specialization 'std::_Construct<o2::framework::InputSpec, const o2::framework::InputSpec &>' requested here
                std::_Construct(std::__addressof(*__cur), *__first);
                     ^
/usr/include/c++/9/bits/stl_uninitialized.h:140:2: note: in instantiation of function template specialization 'std::__uninitialized_copy<false>::__uninit_copy<__gnu_cxx::__normal_iterator<const o2::framework::InputSpec *, std::vector<o2::framework::InputSpec, std::allocator<o2::framework::InputSpec> > >, o2::framework::InputSpec *>' requested here
        __uninit_copy(__first, __last, __result);
        ^
/usr/include/c++/9/bits/stl_uninitialized.h:307:19: note: in instantiation of function template specialization 'std::uninitialized_copy<__gnu_cxx::__normal_iterator<const o2::framework::InputSpec *, std::vector<o2::framework::InputSpec, std::allocator<o2::framework::InputSpec> > >, o2::framework::InputSpec *>' requested here
    { return std::uninitialized_copy(__first, __last, __result); }
                  ^
/usr/include/c++/9/bits/stl_vector.h:555:9: note: in instantiation of function template specialization 'std::__uninitialized_copy_a<__gnu_cxx::__normal_iterator<const o2::framework::InputSpec *, std::vector<o2::framework::InputSpec, std::allocator<o2::framework::InputSpec> > >, o2::framework::InputSpec *, o2::framework::InputSpec>' requested here
          std::__uninitialized_copy_a(__x.begin(), __x.end(),
               ^
input_line_11:123:52: note: in instantiation of member function 'std::vector<o2::framework::InputSpec, std::allocator<o2::framework::InputSpec> >::vector' requested here
  o2::framework::Inputs getInputs() const { return mInputs; };
                                                   ^
/usr/include/c++/9/variant:1220:7: note: constrained by private inheritance here
    : private __detail::__variant::_Variant_base<_Types...>,
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/9/variant:156:13: error: cannot cast private base class 'std::__detail::__variant::_Variant_storage<false, o2::framework::data_matcher::OriginValueMatcher, o2::framework::data_matcher::DescriptionValueMatcher, o2::framework::data_matcher::SubSpecificationTypeValueMatcher, std::unique_ptr<o2::framework::data_matcher::DataDescriptorMatcher, std::default_delete<o2::framework::data_matcher::DataDescriptorMatcher> >, o2::framework::data_matcher::ConstantValueMatcher, o2::framework::data_matcher::StartTimeValueMatcher>' to 'std::variant<o2::framework::data_matcher::OriginValueMatcher, o2::framework::data_matcher::DescriptionValueMatcher, o2::framework::data_matcher::SubSpecificationTypeValueMatcher, std::unique_ptr<o2::framework::data_matcher::DataDescriptorMatcher, std::default_delete<o2::framework::data_matcher::DataDescriptorMatcher> >, o2::framework::data_matcher::ConstantValueMatcher, o2::framework::data_matcher::StartTimeValueMatcher>'
            return static_cast<variant<_Types...>&>(__rhs);
                   ^
/usr/include/c++/9/variant:392:7: note: in instantiation of function template specialization 'std::__variant_cast<o2::framework::data_matcher::OriginValueMatcher, o2::framework::data_matcher::DescriptionValueMatcher, o2::framework::data_matcher::SubSpecificationTypeValueMatcher, std::unique_ptr<o2::framework::data_matcher::DataDescriptorMatcher, std::default_delete<o2::framework::data_matcher::DataDescriptorMatcher> >, o2::framework::data_matcher::ConstantValueMatcher, o2::framework::data_matcher::StartTimeValueMatcher, std::__detail::__variant::_Variant_storage<false, o2::framework::data_matcher::OriginValueMatcher, o2::framework::data_matcher::DescriptionValueMatcher, o2::framework::data_matcher::SubSpecificationTypeValueMatcher, std::unique_ptr<o2::framework::data_matcher::DataDescriptorMatcher, std::default_delete<o2::framework::data_matcher::DataDescriptorMatcher> >, o2::framework::data_matcher::ConstantValueMatcher, o2::framework::data_matcher::StartTimeValueMatcher> &>' requested here
          }, __variant_cast<_Types...>(*this));
             ^
/usr/include/c++/9/variant:397:2: note: in instantiation of member function 'std::__detail::__variant::_Variant_storage<false, o2::framework::data_matcher::OriginValueMatcher, o2::framework::data_matcher::DescriptionValueMatcher, o2::framework::data_matcher::SubSpecificationTypeValueMatcher, std::unique_ptr<o2::framework::data_matcher::DataDescriptorMatcher, std::default_delete<o2::framework::data_matcher::DataDescriptorMatcher> >, o2::framework::data_matcher::ConstantValueMatcher, o2::framework::data_matcher::StartTimeValueMatcher>::_M_reset_impl' requested here
        _M_reset_impl();
        ^
/usr/include/c++/9/variant:402:9: note: in instantiation of member function 'std::__detail::__variant::_Variant_storage<false, o2::framework::data_matcher::OriginValueMatcher, o2::framework::data_matcher::DescriptionValueMatcher, o2::framework::data_matcher::SubSpecificationTypeValueMatcher, std::unique_ptr<o2::framework::data_matcher::DataDescriptorMatcher, std::default_delete<o2::framework::data_matcher::DataDescriptorMatcher> >, o2::framework::data_matcher::ConstantValueMatcher, o2::framework::data_matcher::StartTimeValueMatcher>::_M_reset' requested here
      { _M_reset(); }
        ^
/usr/include/c++/9/variant:489:12: note: in instantiation of member function 'std::__detail::__variant::_Variant_storage<false, o2::framework::data_matcher::OriginValueMatcher, o2::framework::data_matcher::DescriptionValueMatcher, o2::framework::data_matcher::SubSpecificationTypeValueMatcher, std::unique_ptr<o2::framework::data_matcher::DataDescriptorMatcher, std::default_delete<o2::framework::data_matcher::DataDescriptorMatcher> >, o2::framework::data_matcher::ConstantValueMatcher, o2::framework::data_matcher::StartTimeValueMatcher>::~_Variant_storage' requested here
    struct _Copy_ctor_base : _Variant_storage_alias<_Types...>
           ^
/usr/include/c++/9/variant:390:13: note: in instantiation of function template specialization 'std::_Destroy<o2::framework::data_matcher::DataDescriptorMatcher>' requested here
              std::_Destroy(std::__addressof(__this_mem));
                   ^
/usr/include/c++/9/bits/invoke.h:60:14: note: (skipping 15 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all)
    { return std::forward<_Fn>(__f)(std::forward<_Args>(__args)...); }
             ^
/usr/include/c++/9/bits/stl_uninitialized.h:83:8: note: in instantiation of function template specialization 'std::_Construct<o2::framework::InputSpec, const o2::framework::InputSpec &>' requested here
                std::_Construct(std::__addressof(*__cur), *__first);
                     ^
/usr/include/c++/9/bits/stl_uninitialized.h:140:2: note: in instantiation of function template specialization 'std::__uninitialized_copy<false>::__uninit_copy<__gnu_cxx::__normal_iterator<const o2::framework::InputSpec *, std::vector<o2::framework::InputSpec, std::allocator<o2::framework::InputSpec> > >, o2::framework::InputSpec *>' requested here
        __uninit_copy(__first, __last, __result);
        ^
/usr/include/c++/9/bits/stl_uninitialized.h:307:19: note: in instantiation of function template specialization 'std::uninitialized_copy<__gnu_cxx::__normal_iterator<const o2::framework::InputSpec *, std::vector<o2::framework::InputSpec, std::allocator<o2::framework::InputSpec> > >, o2::framework::InputSpec *>' requested here
    { return std::uninitialized_copy(__first, __last, __result); }
                  ^
/usr/include/c++/9/bits/stl_vector.h:555:9: note: in instantiation of function template specialization 'std::__uninitialized_copy_a<__gnu_cxx::__normal_iterator<const o2::framework::InputSpec *, std::vector<o2::framework::InputSpec, std::allocator<o2::framework::InputSpec> > >, o2::framework::InputSpec *, o2::framework::InputSpec>' requested here
          std::__uninitialized_copy_a(__x.begin(), __x.end(),
               ^
input_line_11:123:52: note: in instantiation of member function 'std::vector<o2::framework::InputSpec, std::allocator<o2::framework::InputSpec> >::vector' requested here
  o2::framework::Inputs getInputs() const { return mInputs; };
                                                   ^
/usr/include/c++/9/variant:1220:7: note: constrained by private inheritance here
    : private __detail::__variant::_Variant_base<_Types...>,
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/9/variant:156:13: error: cannot cast private base class 'std::__detail::__variant::_Variant_storage<false, std::__cxx11::basic_string<char>, o2::framework::data_matcher::ContextRef>' to 'std::variant<std::__cxx11::basic_string<char>, o2::framework::data_matcher::ContextRef>'
            return static_cast<variant<_Types...>&>(__rhs);
                   ^
/usr/include/c++/9/variant:392:7: note: in instantiation of function template specialization 'std::__variant_cast<std::__cxx11::basic_string<char>, o2::framework::data_matcher::ContextRef, std::__detail::__variant::_Variant_storage<false, std::__cxx11::basic_string<char>, o2::framework::data_matcher::ContextRef> &>' requested here
          }, __variant_cast<_Types...>(*this));
             ^
/usr/include/c++/9/variant:397:2: note: in instantiation of member function 'std::__detail::__variant::_Variant_storage<false, std::__cxx11::basic_string<char>, o2::framework::data_matcher::ContextRef>::_M_reset_impl' requested here
        _M_reset_impl();
        ^
/usr/include/c++/9/variant:402:9: note: in instantiation of member function 'std::__detail::__variant::_Variant_storage<false, std::__cxx11::basic_string<char>, o2::framework::data_matcher::ContextRef>::_M_reset' requested here
      { _M_reset(); }
        ^
/usr/include/c++/9/variant:489:12: note: in instantiation of member function 'std::__detail::__variant::_Variant_storage<false, std::__cxx11::basic_string<char>, o2::framework::data_matcher::ContextRef>::~_Variant_storage' requested here
    struct _Copy_ctor_base : _Variant_storage_alias<_Types...>
           ^
/usr/include/c++/9/variant:390:13: note: in instantiation of function template specialization 'std::_Destroy<o2::framework::data_matcher::DescriptionValueMatcher>' requested here
              std::_Destroy(std::__addressof(__this_mem));
                   ^
/usr/include/c++/9/bits/invoke.h:60:14: note: (skipping 31 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all)
    { return std::forward<_Fn>(__f)(std::forward<_Args>(__args)...); }
             ^
/usr/include/c++/9/bits/stl_uninitialized.h:83:8: note: in instantiation of function template specialization 'std::_Construct<o2::framework::InputSpec, const o2::framework::InputSpec &>' requested here
                std::_Construct(std::__addressof(*__cur), *__first);
                     ^
/usr/include/c++/9/bits/stl_uninitialized.h:140:2: note: in instantiation of function template specialization 'std::__uninitialized_copy<false>::__uninit_copy<__gnu_cxx::__normal_iterator<const o2::framework::InputSpec *, std::vector<o2::framework::InputSpec, std::allocator<o2::framework::InputSpec> > >, o2::framework::InputSpec *>' requested here
        __uninit_copy(__first, __last, __result);
        ^
/usr/include/c++/9/bits/stl_uninitialized.h:307:19: note: in instantiation of function template specialization 'std::uninitialized_copy<__gnu_cxx::__normal_iterator<const o2::framework::InputSpec *, std::vector<o2::framework::InputSpec, std::allocator<o2::framework::InputSpec> > >, o2::framework::InputSpec *>' requested here
    { return std::uninitialized_copy(__first, __last, __result); }
                  ^
/usr/include/c++/9/bits/stl_vector.h:555:9: note: in instantiation of function template specialization 'std::__uninitialized_copy_a<__gnu_cxx::__normal_iterator<const o2::framework::InputSpec *, std::vector<o2::framework::InputSpec, std::allocator<o2::framework::InputSpec> > >, o2::framework::InputSpec *, o2::framework::InputSpec>' requested here
          std::__uninitialized_copy_a(__x.begin(), __x.end(),
               ^
input_line_11:123:52: note: in instantiation of member function 'std::vector<o2::framework::InputSpec, std::allocator<o2::framework::InputSpec> >::vector' requested here
  o2::framework::Inputs getInputs() const { return mInputs; };
                                                   ^
/usr/include/c++/9/variant:1220:7: note: constrained by private inheritance here
    : private __detail::__variant::_Variant_base<_Types...>,
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: /software/markus/alice/sw/ubuntu1804_x86-64/ROOT/v6-20-02-alice7-1/bin/rootcling: compilation failure (/software/markus/alice/sw/BUILD/7ed4bed81e955447132bd6079fa4bb580717e856/QualityControl/Framework/G__QualityControl2160ae8220_dictUmbrella.h)
Error copying file (if different) from "/software/markus/alice/sw/BUILD/7ed4bed81e955447132bd6079fa4bb580717e856/QualityControl/Framework/G__QualityControl_rdict.pcm" to "/software/markus/alice/sw/BUILD/7ed4bed81e955447132bd6079fa4bb580717e856/QualityControl/lib/G__QualityControl_rdict.pcm".
ninja: build stopped: subcommand failed.

Hi Markus,

what I did is hack the header of variant and chanage private to public.

Cheers,
Jens

Hi,

I had logged this ticket following a report from David Rohr : https://alice.its.cern.ch/jira/browse/QC-277

I thought it was only a warning and thus the priority was low.

I can raise the priority now but I won’t have time probably to do it before the week of the 13th.

Could you try out the proposal of Jens ?
@eulisse any idea of what we should do to avoid that ?

Cheers,
Barth

@wiechula You mean hacking the header from gcc? I could try this locally but in general a would avoid such hacks. Also other which install the software on systems with gcc9 will have the same problem.

Could you tell me how you installed gcc9 and on which system?

@mfasel, yes I hacked the gcc header. Since the I used gcc9 only locally anx it is anyhow not the version in alidist but from my system I didn’t care. Now I’m at gcc10 where this problem disappeared. But others popped up…

@bvonhall The operating system is Ubuntu 18.04, and the compiler is installed via the standard ubuntu backport archive (ubuntu-r-toolchain). Note that gcc9 is the default compiler on Ubuntu 20.04 LTS. I did not yet dare to go to gcc10 unless it becomes default on any prominent distribution.