SimpleAmqpClient icon indicating copy to clipboard operation
SimpleAmqpClient copied to clipboard

required boost version is not sufficient

Open kived opened this issue 4 years ago • 1 comments

The library currently requires boost 1.47 or greater according to CMakeLists.txt. I wanted to build this library on CentOS 7 (required platform, not my choice) which has boost 1.53 available by default. However, building under this version results in many errors of the form:

[5/12] Building CXX object CMakeFiles/SimpleAmqpClient.dir/src/BasicMessage.cpp.o
FAILED: CMakeFiles/SimpleAmqpClient.dir/src/BasicMessage.cpp.o 
/opt/rh/devtoolset-8/root/usr/bin/c++  -DSAC_SSL_SUPPORT_ENABLED -DSimpleAmqpClient_EXPORTS -I. -I../src -Wall -Wextra -O2 -DNDEBUG -fPIC   -std=c++98 -MD -MT CMakeFiles/SimpleAmqpClient.dir/src/BasicMessage.cpp.o -MF CMakeFiles/SimpleAmqpClient.dir/src/BasicMessage.cpp.o.d -o CMakeFiles/SimpleAmqpClient.dir/src/BasicMessage.cpp.o -c ../src/BasicMessage.cpp
../src/BasicMessage.cpp: In member function 'const string& AmqpClient::BasicMessage::ContentType() const':
../src/BasicMessage.cpp:77:33: error: 'class boost::optional<std::basic_string<char> >' has no member named 'value'
     return m_impl->content_type.value();

I was able to build with boost 1.69 instead which is available in EPEL (boost169*). I'm not sure when the c++17 compatible interface used here was added to boost but it should be somewhere between those two versions 1.53 and 1.69.

kived avatar Sep 15 '21 17:09 kived

On Boost 1.55, the method optional.value() doesn't exist. On Boost 1.56, it does... but we haven't gone that far to entirely test on 1.56.

woshilapin avatar Sep 12 '22 14:09 woshilapin