Hi Alan, Thanks for your help. The -std=c++11 flag indeed helps to work around the problem.
Thanks & Regards Jakub On Mon, Feb 13, 2017 at 3:42 PM, Alan Conway <acon...@redhat.com> wrote: > On Fri, 2017-02-10 at 22:46 +0100, Jakub Scholz wrote: > > 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? > > This should build if you do: > cmake -DCMAKE_CXX_FLAGS=-std=c++11 > > However qpid-cpp has always been buildable with c++03 so I think this > is a regression that should be fixed. Kim, this was introduced in your > commit: > > 34cfb7f0 QPID-7666: Added wcache-num-pages (and tpl-wcache-num-pages) > to linearstore. Changed defaults for regular queues to wcache-page- > size=16 (kiB) and set wcache-num-pages default to 16. Added wcache- > page-size and wcache-num-pages to qpid-config. > > Can you fix that and make sure we compile with -std=c++03? FYI > cppreference.com is a good reference for checking which version of > C/C++ things were introduced in - anything that doesn't have an > annotation like "(since C++11)" is safely c++03 or before. > > Cheers, > Alan. > > > 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 > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org > For additional commands, e-mail: users-h...@qpid.apache.org > >