Bug #23417
openBuilding Ceph on armhf fails due to a bunch of errors
0%
Description
Hi all,
I'm fighting hard to get the actual git repo running through the build process on an Odroid HC2 (armhf) with a full SATA-Port.
I'm using the latest ubuntu (bionic) with gcc 7.3.
At this point I have to excuse me for maybe bad, ugly or even funny ideas I used to get the compilation over the found problems.
I do have absolute no idea of c++ programming and nearly every found workaround is due to pure luck and looking at the surrounding code.
Some of the problems I have asked on #ceph-devel irc and got a "You can try ... this" ... for that "THANK YOU all" for helping a one-eyed.
So ... this means ... I had done changes to the source-code of an application without knowledge of what I have done ... uhhh this sounds very bad, if I want to use this ceph for storing my data.
So I beg you to review the changes I have done and put them on the right road. Maybe this will help to make ceph easy to compile on a nice device for homeuse or testlabs.
Here comes the beginning of my odyssey ... last break in compilationn was at 41 %
First there where some substitution errors ... I didn't note the original error (this was because of my thinking, this will be easy going :) )
Error in BlueFS.cc:
Errortext:
no matching function for call to ‘min(long unsigned int&, unsigned int&)
Changes in code to get the compiler go on:
uint64_t l = std::min(p->length - x_off, len); uint64_t l = std::min((long)p->length - (long)x_off, (long)len);
Error in in BlueStore.cc
Errortext:
no matching function for call to ‘min(long unsigned int&, unsigned int&)
Changes in code to get the compiler go on:
size_t pos = max(e.first / granularity, prev_pos); size_t pos = max((long)e.first / (long)granularity, (long)prev_pos);
Error in OSDMonitor.cc
Errortext:
no matching function for call to ‘min(long unsigned int&, unsigned int&)
Changes in code to get the compiler go on:
int n = std::min(max - pending_creatings.pgs.size(), p->second.end - p->second.start); int n = std::min((long)max - (long)pending_creatings.pgs.size(), (long)p->second.end - (long)p->second.start);
Error in rgw_op.h
Errortext:
static assertion failed: boost::variant does not contain specified type U, call to boost::get<U>(const boost::variant<T...>&) will always throw boost::bad_get exception
Changes in code to get the compiler go on:
const size_t max_attr_name_len = \ cct->_conf->get_val<size_t>("rgw_max_attr_name_len"); const size_t max_attr_name_len = \ cct->_conf->get_val<Option::size_t>("rgw_max_attr_name_len");
and
const auto rgw_max_attrs_num_in_req = \ cct->_conf->get_val<size_t>("rgw_max_attrs_num_in_req"); const auto rgw_max_attrs_num_in_req = \ cct->_conf->get_val<Option::size_t>("rgw_max_attrs_num_in_req");
Error in rgw_sync_log_trim.cc
Errortext:
/mnt/ceph-src/ceph/src/rgw/rgw_sync_log_trim.cc:354:60: error: conversion from 'boost::optional<long unsigned int>' to non-scalar type 'boost::optional<unsigned int>' requested boost::optional<size_t> num_shards = boost::make_optional(false, 0UL);
Changes in code to get the compiler go on:
boost::optional<size_t> num_shards = boost::make_optional(false, 0UL); boost::optional<size_t> num_shards = boost::none;
and
if (!num_shards ) { if (num_shards == boost::none) {
Error in rgw_rest_swift.cc:
Errortext:
/mnt/ceph-src/ceph/src/rgw/rgw_rest_swift.cc:720:68: required from here /mnt/ceph-src/ceph/build/boost/include/boost/variant/get.hpp:289:5: error: static assertion failed: boost::variant does not contain specified type U, call to boost::get<U>(const boost::variant<T...>&) will always throw boost::bad_get exception
Changes in code to get the compiler go on:
% s->cct->_conf->get_val<size_t>("rgw_max_attrs_num_in_req")); % s->cct->_conf->get_val<Option::size_t>("rgw_max_attrs_num_in_req"));
and
g_conf->get_val<size_t>("rgw_max_attr_name_len"); g_conf->get_val<Option::size_t>("rgw_max_attr_name_len");
and
g_conf->get_val<size_t>("rgw_max_attrs_num_in_req"); g_conf->get_val<Option::size_t>("rgw_max_attrs_num_in_req");
after I reached this point I ran into the bug reported under https://tracker.ceph.com/issues/23387
Solution presented by Daniel worked -> disable option "-g" and it will go on
Next stop is in ImageCtx.cc
Errortext:
/mnt/ceph-src/ceph/src/librbd/ImageCtx.cc:914:35: required from here /mnt/ceph-src/ceph/src/common/ceph_context.h:153:5: error: static assertion failed: Please increase largest singleton. static_assert(sizeof(T) <= largest_singleton,
At the moment the little HC2 tries this suggested solution from IRC:
Changes in ceph_context.h:
static constexpr std::size_t largest_singleton = sizeof(void*) * 72; static constexpr std::size_t largest_singleton = sizeof(void*) * 128;
... still running ... this is not the fastest device for compiling big projects :)
I will continue to report ...