gcc-7/i386|armhf 12.1.2 FTBFS

Bug #1709396 reported by James Page on 2017-08-08
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ceph (Ubuntu)
Medium
James Page
gcc-7 (Ubuntu)
Undecided
Unassigned

Bug Description

ceph 12.1.2 fails to build with gcc-7 on 32 bit architectures (i386 or armhf):

In file included from /usr/include/boost/variant.hpp:17:0,
                 from /root/ceph/src/common/cmdparse.h:9,
                 from /root/ceph/src/common/ceph_context.h:22,
                 from /root/ceph/src/common/Mutex.h:20,
                 from /root/ceph/src/common/config.h:21,
                 from /root/ceph/src/common/dout.h:22,
                 from /root/ceph/src/include/Context.h:19,
                 from /root/ceph/src/common/Cond.h:19,
                 from /root/ceph/src/common/Timer.h:18,
                 from /root/ceph/src/tools/rbd_mirror/InstanceReplayer.cc:5:
/usr/include/boost/variant/variant.hpp: In instantiation of ‘void boost::variant<T0, TN>::convert_construct(T&, int, mpl_::false_) [with T = unsigned int; T0_ = bool; TN = {long long unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >}; mpl_::false_ = mpl_::bool_<false>]’:
/usr/include/boost/variant/variant.hpp:1777:26: required from ‘boost::variant<T0, TN>::variant(T&, typename boost::enable_if<boost::mpl::and_<boost::mpl::not_<boost::is_const<T> >, boost::mpl::not_<boost::is_same<T, boost::variant<T0, TN> > >, boost::detail::variant::is_variant_constructible_from<T&, typename boost::mpl::transform<typename boost::mpl::eval_if<boost::variant<T0, TN>::is_recursive_, boost::mpl::transform<typename boost::mpl::eval_if<boost::variant<T0, TN>::is_sequence_based_, typename boost::mpl::eval_if<boost::variant<T0, TN>::is_recursive_, T0_, boost::mpl::identity<T> >::type, boost::detail::variant::make_variant_list<typename boost::mpl::eval_if<boost::variant<T0, TN>::is_recursive_, T0_, boost::mpl::identity<T> >::type, TN ...> >::type, boost::mpl::protect<boost::detail::variant::quoted_enable_recursive<boost::variant<T0, TN> > > >, boost::mpl::identity<typename boost::mpl::eval_if<boost::variant<T0, TN>::is_sequence_based_, typename boost::mpl::eval_if<boost::variant<T0, TN>::is_recursive_, T0_, boost::mpl::identity<T> >::type, boost::detail::variant::make_variant_list<typename boost::mpl::eval_if<boost::variant<T0, TN>::is_recursive_, T0_, boost::mpl::identity<T> >::type, TN ...> >::type> >::type, boost::mpl::protect<boost::detail::make_reference_content<mpl_::void_> > >::type> > >::type*) [with T = unsigned int; T0_ = bool; TN = {long long unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >}; typename boost::enable_if<boost::mpl::and_<boost::mpl::not_<boost::is_const<T> >, boost::mpl::not_<boost::is_same<T, boost::variant<T0, TN> > >, boost::detail::variant::is_variant_constructible_from<T&, typename boost::mpl::transform<typename boost::mpl::eval_if<boost::variant<T0, TN>::is_recursive_, boost::mpl::transform<typename boost::mpl::eval_if<boost::variant<T0, TN>::is_sequence_based_, typename boost::mpl::eval_if<boost::variant<T0, TN>::is_recursive_, T0_, boost::mpl::identity<T> >::type, boost::detail::variant::make_variant_list<typename boost::mpl::eval_if<boost::variant<T0, TN>::is_recursive_, T0_, boost::mpl::identity<T> >::type, TN ...> >::type, boost::mpl::protect<boost::detail::variant::quoted_enable_recursive<boost::variant<T0, TN> > > >, boost::mpl::identity<typename boost::mpl::eval_if<boost::variant<T0, TN>::is_sequence_based_, typename boost::mpl::eval_if<boost::variant<T0, TN>::is_recursive_, T0_, boost::mpl::identity<T> >::type, boost::detail::variant::make_variant_list<typename boost::mpl::eval_if<boost::variant<T0, TN>::is_recursive_, T0_, boost::mpl::identity<T> >::type, TN ...> >::type> >::type, boost::mpl::protect<boost::detail::make_reference_content<mpl_::void_> > >::type> > >::type = void]’
/root/ceph/src/tools/rbd_mirror/InstanceReplayer.cc:355:3: required from ‘void rbd::mirror::InstanceReplayer<ImageCtxT>::start_image_replayers(int) [with ImageCtxT = librbd::ImageCtx]’
/root/ceph/src/tools/rbd_mirror/InstanceReplayer.cc:496:29: required from here
/usr/include/boost/variant/variant.hpp:1604:38: error: call of overloaded ‘initialize(void*, unsigned int&)’ is ambiguous
               initializer::initialize(
               ~~~~~~~~~~~~~~~~~~~~~~~^
                   storage_.address()
                   ~~~~~~~~~~~~~~~~~~
                 , operand
                 ~~~~~~~~~
                 )
                 ~
In file included from /usr/include/boost/variant/variant.hpp:30:0,
                 from /usr/include/boost/variant.hpp:17,
                 from /root/ceph/src/common/cmdparse.h:9,
                 from /root/ceph/src/common/ceph_context.h:22,
                 from /root/ceph/src/common/Mutex.h:20,
                 from /root/ceph/src/common/config.h:21,
                 from /root/ceph/src/common/dout.h:22,
                 from /root/ceph/src/include/Context.h:19,
                 from /root/ceph/src/common/Cond.h:19,
                 from /root/ceph/src/common/Timer.h:18,
                 from /root/ceph/src/tools/rbd_mirror/InstanceReplayer.cc:5:
/usr/include/boost/variant/detail/initializer.hpp:104:24: note: candidate: static int boost::detail::variant::make_initializer_node::apply<BaseIndexPair, Iterator>::initializer_node::initialize(void*, boost::detail::variant::make_initializer_node::apply<BaseIndexPair, Iterator>::initializer_node::param_T) [with BaseIndexPair = boost::mpl::pair<boost::detail::variant::initializer_root, mpl_::int_<0> >; Iterator = boost::mpl::l_iter<boost::mpl::list3<bool, long long unsigned int, std::__cxx11::basic_string<char> > >; boost::detail::variant::make_initializer_node::apply<BaseIndexPair, Iterator>::initializer_node::param_T = const bool&]
             static int initialize(void* dest, param_T operand)
                        ^~~~~~~~~~
/usr/include/boost/variant/detail/initializer.hpp:115:24: note: candidate: static int boost::detail::variant::make_initializer_node::apply<BaseIndexPair, Iterator>::initializer_node::initialize(void*, boost::detail::variant::make_initializer_node::apply<BaseIndexPair, Iterator>::initializer_node::param2_T) [with BaseIndexPair = boost::mpl::pair<boost::detail::variant::initializer_root, mpl_::int_<0> >; Iterator = boost::mpl::l_iter<boost::mpl::list3<bool, long long unsigned int, std::__cxx11::basic_string<char> > >; boost::detail::variant::make_initializer_node::apply<BaseIndexPair, Iterator>::initializer_node::param2_T = bool&&]
             static int initialize(void* dest, param2_T operand)
                        ^~~~~~~~~~
/usr/include/boost/variant/detail/initializer.hpp:115:24: note: candidate: static int boost::detail::variant::make_initializer_node::apply<BaseIndexPair, Iterator>::initializer_node::initialize(void*, boost::detail::variant::make_initializer_node::apply<BaseIndexPair, Iterator>::initializer_node::param2_T) [with BaseIndexPair = boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::initializer_root, mpl_::int_<0> >, boost::mpl::l_iter<boost::mpl::list3<bool, long long unsigned int, std::__cxx11::basic_string<char> > > >::initializer_node, mpl_::int_<1> >; Iterator = boost::mpl::l_iter<boost::mpl::list2<long long unsigned int, std::__cxx11::basic_string<char> > >; boost::detail::variant::make_initializer_node::apply<BaseIndexPair, Iterator>::initializer_node::param2_T = long long unsigned int&&]
/usr/include/boost/variant/detail/initializer.hpp:104:24: note: candidate: static int boost::detail::variant::make_initializer_node::apply<BaseIndexPair, Iterator>::initializer_node::initialize(void*, boost::detail::variant::make_initializer_node::apply<BaseIndexPair, Iterator>::initializer_node::param_T) [with BaseIndexPair = boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::initializer_root, mpl_::int_<0> >, boost::mpl::l_iter<boost::mpl::list3<bool, long long unsigned int, std::__cxx11::basic_string<char> > > >::initializer_node, mpl_::int_<1> >; Iterator = boost::mpl::l_iter<boost::mpl::list2<long long unsigned int, std::__cxx11::basic_string<char> > >; boost::detail::variant::make_initializer_node::apply<BaseIndexPair, Iterator>::initializer_node::param_T = const long long unsigned int&]
             static int initialize(void* dest, param_T operand)
                        ^~~~~~~~~~
src/tools/rbd_mirror/CMakeFiles/rbd_mirror_internal.dir/build.make:182: recipe for target 'src/tools/rbd_mirror/CMakeFiles/rbd_mirror_internal.dir/InstanceReplayer.cc.o' failed
make[2]: *** [src/tools/rbd_mirror/CMakeFiles/rbd_mirror_internal.dir/InstanceReplayer.cc.o] Error 1

Full log:

https://launchpadlibrarian.net/332283208/buildlog_ubuntu-artful-armhf.ceph_12.1.2-0ubuntu1_BUILDING.txt.gz

James Page (james-page) wrote :

code that's causing this ambiguity:

            static int initialize(void* dest, param_T operand)
            {
                typedef typename boost::detail::make_reference_content<
                      recursive_enabled_T
                    >::type internal_T;

                new(dest) internal_T(operand);
                return BOOST_MPL_AUX_VALUE_WKND(index)::value; // which
            }

#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
            static int initialize(void* dest, param2_T operand)
            {
                // This assert must newer trigger, because all the reference contents are
                // handled by the initilize(void* dest, param_T operand) function above
                BOOST_ASSERT(!is_reference_content_t::value);

                typedef typename boost::mpl::if_<is_reference_content_t, param2_T, recursive_enabled_T>::type value_T;
                new(dest) value_T( boost::detail::variant::move(operand) );
                return BOOST_MPL_AUX_VALUE_WKND(index)::value; // which
            }
#endif

gcc definition for this flag:

// C++0x features in 4.3.n and later
//
#if (BOOST_GCC_VERSION >= 40300) && defined(BOOST_GCC_CXX11)
// C++0x features are only enabled when -std=c++0x or -std=gnu++0x are
// passed on the command line, which in turn defines
// __GXX_EXPERIMENTAL_CXX0X__.
# define BOOST_HAS_DECLTYPE
# define BOOST_HAS_RVALUE_REFS
# define BOOST_HAS_STATIC_ASSERT
# define BOOST_HAS_VARIADIC_TMPL
#else
# define BOOST_NO_CXX11_DECLTYPE
# define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
# define BOOST_NO_CXX11_RVALUE_REFERENCES
# define BOOST_NO_CXX11_STATIC_ASSERT
#endif

and

#if defined(__GXX_EXPERIMENTAL_CXX0X__) || (__cplusplus >= 201103L)
# define BOOST_GCC_CXX11
#endif

James Page (james-page) wrote :

(that might be a red-herring)

James Page (james-page) wrote :

same issue with gcc-6

Changed in gcc-7 (Ubuntu):
status: New → Invalid
James Page (james-page) wrote :

OK I think I see the issue - size_t is ambiguous on 32-bit architectures (on 64 bit is maps to uint64_t ok)

James Page (james-page) on 2017-08-09
Changed in ceph (Ubuntu):
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → James Page (james-page)
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ceph - 12.1.2-0ubuntu2

---------------
ceph (12.1.2-0ubuntu2) artful; urgency=medium

  * d/p/rocksdb-fallthrough-i386.patch: Mark intentional fallthroughs
    for compatibility with gcc-7.
  * d/p/32bit-compat-service-daemon.patch: Fix implicit type conversion
    for Boost variant types on 32 bit architectures (LP: #1709396).

 -- James Page <email address hidden> Wed, 09 Aug 2017 16:43:46 +0100

Changed in ceph (Ubuntu):
status: In Progress → Fix Released

For the record this went upstream in https://github.com/ceph/ceph/pull/16938

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers