Hi,
I seem to be unable to build the latest master of Qpid C++ broker. It seems
to complain about the round function not being in std (the complete output
is below). It seems to be related to QPID-7666 / commit 34cfb7f.
I'm compiling it on CentOS 7 with g++ version 4.8.5, Make version 3.82 and
cmake 2.8.12.2. Is this some bug in the code? Or do I need some newer
compiler / some newer libraries?
Thanks & Regards
Jakub
[ 79%] Building CXX object
src/CMakeFiles/linearstore.dir/qpid/linearstore/MessageStoreImpl.cpp.o
/qpid-cpp/src/qpid/linearstore/MessageStoreImpl.cpp: In static member
function 'static uint32_t
qpid::linearstore::MessageStoreImpl::chkJrnlWrPageCacheSize(uint32_t, const
string&)':
/qpid-cpp/src/qpid/linearstore/MessageStoreImpl.cpp:85:25: error: 'round'
is not a member of 'std'
p = std::pow(2, std::round(std::log2(p)));
^
/qpid-cpp/src/qpid/linearstore/MessageStoreImpl.cpp:85:25: note: suggested
alternatives:
In file included from /usr/include/features.h:375:0,
from
/usr/include/c++/4.8.2/x86_64-redhat-linux/bits/os_defines.h:39,
from
/usr/include/c++/4.8.2/x86_64-redhat-linux/bits/c++config.h:2097,
from /usr/include/c++/4.8.2/string:38,
from /qpid-cpp/src/qpid/broker/PersistableExchange.h:25,
from /qpid-cpp/src/qpid/broker/MessageStore.h:24,
from /qpid-cpp/src/qpid/linearstore/MessageStoreImpl.h:25,
from
/qpid-cpp/src/qpid/linearstore/MessageStoreImpl.cpp:22:
/usr/include/bits/mathcalls.h:310:1: note: 'round'
__MATHCALLX (round,, (_Mdouble_ __x), (__const__));
^
In file included from /usr/include/boost/math/tools/config.hpp:25:0,
from /usr/include/boost/math/special_functions/sign.hpp:16,
from /usr/include/boost/lexical_cast.hpp:167,
from /qpid-cpp/src/qpid/Options.h:33,
from /qpid-cpp/src/qpid/linearstore/MessageStoreImpl.h:27,
from
/qpid-cpp/src/qpid/linearstore/MessageStoreImpl.cpp:22:
/usr/include/boost/math/special_functions/detail/round_fwd.hpp:43:6: note:
'boost::math::round'
T round(const T& v);
^
/qpid-cpp/src/qpid/linearstore/MessageStoreImpl.cpp:85:36: error: 'log2' is
not a member of 'std'
p = std::pow(2, std::round(std::log2(p)));
^
/qpid-cpp/src/qpid/linearstore/MessageStoreImpl.cpp:85:36: note: suggested
alternative:
In file included from /usr/include/features.h:375:0,
from
/usr/include/c++/4.8.2/x86_64-redhat-linux/bits/os_defines.h:39,
from
/usr/include/c++/4.8.2/x86_64-redhat-linux/bits/c++config.h:2097,
from /usr/include/c++/4.8.2/string:38,
from /qpid-cpp/src/qpid/broker/PersistableExchange.h:25,
from /qpid-cpp/src/qpid/broker/MessageStore.h:24,
from /qpid-cpp/src/qpid/linearstore/MessageStoreImpl.h:25,
from
/qpid-cpp/src/qpid/linearstore/MessageStoreImpl.cpp:22:
/usr/include/bits/mathcalls.h:145:1: note: 'log2'
__MATHCALL (log2,, (_Mdouble_ __x));
^
make[2]: ***
[src/CMakeFiles/linearstore.dir/qpid/linearstore/MessageStoreImpl.cpp.o]
Error 1
make[1]: *** [src/CMakeFiles/linearstore.dir/all] Error 2
make: *** [all] Error 2