Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error when 'make' #934

Closed
HINEOWAKEUP opened this issue May 7, 2022 · 22 comments
Closed

error when 'make' #934

HINEOWAKEUP opened this issue May 7, 2022 · 22 comments

Comments

@HINEOWAKEUP
Copy link

[ 0%] Building CXX object test/system/CMakeFiles/st_async_pubsub_1.dir/st_async_pubsub_1.cpp.o
In file included from /home/admin/mqtt_cpp/include/mqtt/broker/broker.hpp:28,
from /home/admin/mqtt_cpp/test/system/combi_test.hpp:14,
from /home/admin/mqtt_cpp/test/system/st_async_pubsub_1.cpp:8:
/home/admin/mqtt_cpp/include/mqtt/broker/uuid.hpp: In function ‘std::cxx11::string mqtt::broker::create_uuid_string()’:
/home/admin/mqtt_cpp/include/mqtt/broker/uuid.hpp:22:60: error: use of deleted function ‘boost::uuids::random_generator_pure::random_generator_pure(boost::uuids::random_generator_pure&&)’
thread_local auto gen = boost::uuids::random_generator();
^
In file included from /usr/include/boost/uuid/uuid_generators.hpp:17,
from /home/admin/mqtt_cpp/include/mqtt/broker/uuid.hpp:13,
from /home/admin/mqtt_cpp/include/mqtt/broker/broker.hpp:28,
from /home/admin/mqtt_cpp/test/system/combi_test.hpp:14,
from /home/admin/mqtt_cpp/test/system/st_async_pubsub_1.cpp:8:
/usr/include/boost/uuid/random_generator.hpp:149:7: note: ‘boost::uuids::random_generator_pure::random_generator_pure(boost::uuids::random_generator_pure&&)’ is implicitly deleted because the default definition would be ill-formed:
class random_generator_pure
^~~~~~~~~~~~~~~~~~~~~
/usr/include/boost/uuid/random_generator.hpp:149:7: error: use of deleted function ‘boost::uuids::detail::random_provider::random_provider(boost::uuids::detail::random_provider&&)’
In file included from /usr/include/boost/uuid/random_generator.hpp:20,
from /usr/include/boost/uuid/uuid_generators.hpp:17,
from /home/admin/mqtt_cpp/include/mqtt/broker/uuid.hpp:13,
from /home/admin/mqtt_cpp/include/mqtt/broker/broker.hpp:28,
from /home/admin/mqtt_cpp/test/system/combi_test.hpp:14,
from /home/admin/mqtt_cpp/test/system/st_async_pubsub_1.cpp:8:
/usr/include/boost/uuid/detail/random_provider.hpp:41:7: note: ‘boost::uuids::detail::random_provider::random_provider(boost::uuids::detail::random_provider&&)’ is implicitly deleted because the default definition would be ill-formed:
class random_provider
^~~~~~~~~~~~~~~
/usr/include/boost/uuid/detail/random_provider.hpp:41:7: error: use of deleted function ‘boost::noncopyable
::noncopyable::noncopyable(const boost::noncopyable
::noncopyable&)’
In file included from /usr/include/boost/utility.hpp:22,
from /usr/include/boost/range/size.hpp:25,
from /usr/include/boost/range/functions.hpp:20,
from /usr/include/boost/range/iterator_range_core.hpp:38,
from /usr/include/boost/lexical_cast.hpp:30,
from /home/admin/mqtt_cpp/include/mqtt/broker/broker.hpp:14,
from /home/admin/mqtt_cpp/test/system/combi_test.hpp:14,
from /home/admin/mqtt_cpp/test/system/st_async_pubsub_1.cpp:8:
/usr/include/boost/core/noncopyable.hpp:34:7: note: declared here
noncopyable( const noncopyable& ) = delete;
^~~~~~~~~~~
virtual memory exhausted: Cannot allocate memory
make[2]: *** [test/system/CMakeFiles/st_async_pubsub_1.dir/build.make:63: test/system/CMakeFiles/st_async_pubsub_1.dir/st_async_pubsub_1.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:256: test/system/CMakeFiles/st_async_pubsub_1.dir/all] Error 2
make: *** [Makefile:141: all] Error 2

@HINEOWAKEUP
Copy link
Author

os=debian 10
dependancy install by apt-get:
boost=1.67
gcc=gcc (Debian 8.3.0-6) 8.3.0
cmake=3.13.4

@HINEOWAKEUP
Copy link
Author

before building I do:
apt-get install build-essential

@HINEOWAKEUP
Copy link
Author

I 'git clone' your source from a brand new cloud debian 10 on AWS

@HINEOWAKEUP
Copy link
Author

Thank you!

Regards,
Lian

@redboltz
Copy link
Owner

redboltz commented May 8, 2022

Thank you for reporting the issue.

Could you try replacing

thread_local auto gen = boost::uuids::random_generator();

with

    thread_local boost::uuids::random_generator gen;

Please let me know what happens.

@HINEOWAKEUP
Copy link
Author

thank you for instruction. just let you know what I did , added '#define MQTT_BROKER_UUID_HPP' to resole this issue:

// Copyright Takatoshi Kondo 2021
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#if !defined(MQTT_BROKER_UUID_HPP)
#define MQTT_BROKER_UUID_HPP
#define BOOST_UUID_RANDOM_GENERATOR_COMPAT

@HINEOWAKEUP
Copy link
Author

now , I have new issues:admin@ip-172-31-80-21:/mqtt_cpp/build$ cmake ..
-- Setting minimum C++ standard to C++14
-- TLS disabled
-- WebSocket disabled
-- Always send reason code enabled
-- UTF8String check enabled
-- Using boost::variant instead of std::variant
-- Using boost::optional instead of std::optional
-- Using boost::string_view instead of std::string_view
-- Using boost::any instead of std::any
-- Using boost::shared_ptr<char []> instead of std::shared_ptr<char []>
-- std::tuplestd::any workaround for libstdc++ enabled
-- Using Networking TS-style executors instead of standard executors
-- Dynamically linking with Boost
-- Dynamically linking with Openssl
-- Logging disabled
-- Boost version: 1.67.0
-- Found the following Boost libraries:
-- system
-- date_time
-- program_options
-- Tests enabled
-- Boost version: 1.67.0
-- Found the following Boost libraries:
-- unit_test_framework
-- Boost version: 1.67.0
-- Found the following Boost libraries:
-- unit_test_framework
-- Examples enabled
-- Boost version: 1.67.0
-- Found the following Boost libraries:
-- program_options
-- Configuring done
-- Generating done
-- Build files have been written to: /home/admin/mqtt_cpp/build
admin@ip-172-31-80-21:
/mqtt_cpp/build$ make
[ 0%] Building CXX object test/system/CMakeFiles/st_async_pubsub_1.dir/st_async_pubsub_1.cpp.o
[ 1%] Linking CXX executable st_async_pubsub_1
[ 1%] Built target st_async_pubsub_1
[ 1%] Building CXX object test/system/CMakeFiles/st_as_buffer_async_pubsub_1.dir/st_as_buffer_async_pubsub_1.cpp.o
[ 3%] Linking CXX executable st_as_buffer_async_pubsub_1
[ 3%] Built target st_as_buffer_async_pubsub_1
[ 5%] Building CXX object test/system/CMakeFiles/st_multi_sub.dir/st_multi_sub.cpp.o
[ 5%] Linking CXX executable st_multi_sub
[ 5%] Built target st_multi_sub
[ 7%] Building CXX object test/system/CMakeFiles/st_pubsub_no_strand.dir/st_pubsub_no_strand.cpp.o
[ 7%] Linking CXX executable st_pubsub_no_strand
[ 7%] Built target st_pubsub_no_strand
[ 7%] Building CXX object test/system/CMakeFiles/st_sub.dir/st_sub.cpp.o
[ 8%] Linking CXX executable st_sub
[ 8%] Built target st_sub
[ 10%] Building CXX object test/system/CMakeFiles/st_pubsub_2.dir/st_pubsub_2.cpp.o
[ 10%] Linking CXX executable st_pubsub_2
[ 10%] Built target st_pubsub_2
[ 12%] Building CXX object test/system/CMakeFiles/st_receive_maximum.dir/st_receive_maximum.cpp.o
In file included from /home/admin/mqtt_cpp/test/system/st_receive_maximum.cpp:10:
/home/admin/mqtt_cpp/test/system/st_receive_maximum.cpp: In instantiation of ‘st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)> [with auto:142 = std::vector<std::shared_ptr<mqtt::callable_overlay<mqtt::sync_client<mqtt::tcp_endpoint<boost::asio::basic_stream_socketboost::asio::ip::tcp, boost::asio::io_context::strand> > > >, std::allocator<std::shared_ptr<mqtt::callable_overlay<mqtt::sync_client<mqtt::tcp_endpoint<boost::asio::basic_stream_socketboost::asio::ip::tcp, boost::asio::io_context::strand> > > > > >; auto:143 = do_test(const ClientCreator&, const Test&, std::size_t, boost::optionalmqtt::protocol_version) [with ClientCreator = do_combi_test_sync(const Test&, std::size_t) [with Test = st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)>; std::size_t = long unsigned int]::<lambda(auto:134&& ...)>; Test = st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)>; std::size_t = long unsigned int]::<lambda()>; auto:144 = mqtt::broker::broker_t]’:
/home/admin/mqtt_cpp/test/system/combi_test.hpp:73:9: required from ‘void do_test(const ClientCreator&, const Test&, std::size_t, boost::optionalmqtt::protocol_version) [with ClientCreator = do_combi_test_sync(const Test&, std::size_t) [with Test = st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)>; std::size_t = long unsigned int]::<lambda(auto:134&& ...)>; Test = st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)>; std::size_t = long unsigned int]’
/home/admin/mqtt_cpp/test/system/combi_test.hpp:342:12: required from ‘void do_combi_test_sync(const Test&, std::size_t) [with Test = st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)>; std::size_t = long unsigned int]’
/home/admin/mqtt_cpp/test/system/st_receive_maximum.cpp:153:28: required from here
/home/admin/mqtt_cpp/test/system/st_receive_maximum.cpp:104:46: error: ‘class boost::optional’ has no member named ‘has_value’; did you mean ‘value’?
BOOST_TEST(packet_id.has_value());
~~~~~~~~~~^~~~~~~~~
/home/admin/mqtt_cpp/test/system/ordered_caller.hpp:46:45: note: in definition of macro ‘MQTT_ORDERED’
make_ordered_caller(FILE, LINE, VA_ARGS)
^~~~~~~~~~~
/home/admin/mqtt_cpp/test/system/st_receive_maximum.cpp:113:46: error: ‘class boost::optional’ has no member named ‘has_value’; did you mean ‘value’?
BOOST_TEST(packet_id.has_value());
~~~~~~~~~~^~~~~~~~~
/home/admin/mqtt_cpp/test/system/ordered_caller.hpp:46:45: note: in definition of macro ‘MQTT_ORDERED’
make_ordered_caller(FILE, LINE, VA_ARGS)
^~~~~~~~~~~
/home/admin/mqtt_cpp/test/system/st_receive_maximum.cpp:122:46: error: ‘class boost::optional’ has no member named ‘has_value’; did you mean ‘value’?
BOOST_TEST(packet_id.has_value());
~~~~~~~~~~^~~~~~~~~
/home/admin/mqtt_cpp/test/system/ordered_caller.hpp:46:45: note: in definition of macro ‘MQTT_ORDERED’
make_ordered_caller(FILE, LINE, VA_ARGS)
^~~~~~~~~~~
/home/admin/mqtt_cpp/test/system/st_receive_maximum.cpp: In instantiation of ‘st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)> [with auto:142 = std::vector<std::shared_ptr<mqtt::callable_overlay<mqtt::sync_client<mqtt::tcp_endpoint<boost::asio::basic_stream_socketboost::asio::ip::tcp, boost::asio::io_context::strand> > > >, std::allocator<std::shared_ptr<mqtt::callable_overlay<mqtt::sync_client<mqtt::tcp_endpoint<boost::asio::basic_stream_socketboost::asio::ip::tcp, boost::asio::io_context::strand> > > > > >; auto:143 = do_test(const ClientCreator&, const Test&, std::size_t, boost::optionalmqtt::protocol_version) [with ClientCreator = do_combi_test_sync(const Test&, std::size_t) [with Test = st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)>; std::size_t = long unsigned int]::<lambda(auto:135&& ...)>; Test = st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)>; std::size_t = long unsigned int]::<lambda()>; auto:144 = mqtt::broker::broker_t]’:
/home/admin/mqtt_cpp/test/system/combi_test.hpp:73:9: required from ‘void do_test(const ClientCreator&, const Test&, std::size_t, boost::optionalmqtt::protocol_version) [with ClientCreator = do_combi_test_sync(const Test&, std::size_t) [with Test = st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)>; std::size_t = long unsigned int]::<lambda(auto:135&& ...)>; Test = st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)>; std::size_t = long unsigned int]’
/home/admin/mqtt_cpp/test/system/combi_test.hpp:347:12: required from ‘void do_combi_test_sync(const Test&, std::size_t) [with Test = st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)>; std::size_t = long unsigned int]’
/home/admin/mqtt_cpp/test/system/st_receive_maximum.cpp:153:28: required from here
/home/admin/mqtt_cpp/test/system/st_receive_maximum.cpp:104:46: error: ‘class boost::optional’ has no member named ‘has_value’; did you mean ‘value’?
BOOST_TEST(packet_id.has_value());
~~~~~~~~~~^~~~~~~~~
/home/admin/mqtt_cpp/test/system/ordered_caller.hpp:46:45: note: in definition of macro ‘MQTT_ORDERED’
make_ordered_caller(FILE, LINE, VA_ARGS)
^~~~~~~~~~~
/home/admin/mqtt_cpp/test/system/st_receive_maximum.cpp:113:46: error: ‘class boost::optional’ has no member named ‘has_value’; did you mean ‘value’?
BOOST_TEST(packet_id.has_value());
~~~~~~~~~~^~~~~~~~~
/home/admin/mqtt_cpp/test/system/ordered_caller.hpp:46:45: note: in definition of macro ‘MQTT_ORDERED’
make_ordered_caller(FILE, LINE, VA_ARGS)
^~~~~~~~~~~
/home/admin/mqtt_cpp/test/system/st_receive_maximum.cpp:122:46: error: ‘class boost::optional’ has no member named ‘has_value’; did you mean ‘value’?
BOOST_TEST(packet_id.has_value());
~~~~~~~~~~^~~~~~~~~
/home/admin/mqtt_cpp/test/system/ordered_caller.hpp:46:45: note: in definition of macro ‘MQTT_ORDERED’
make_ordered_caller(FILE, LINE, VA_ARGS)
^~~~~~~~~~~
/home/admin/mqtt_cpp/test/system/ordered_caller.hpp:16:5: error: ‘ordered_caller::ordered_caller(std::size_t&, Funcs&& ...) [with Funcs = {st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)> [with auto:142 = std::vector<std::shared_ptr<mqtt::callable_overlay<mqtt::sync_client<mqtt::tcp_endpoint<boost::asio::basic_stream_socketboost::asio::ip::tcp, boost::asio::io_context::strand> > > >, std::allocator<std::shared_ptr<mqtt::callable_overlay<mqtt::sync_client<mqtt::tcp_endpoint<boost::asio::basic_stream_socketboost::asio::ip::tcp, boost::asio::io_context::strand> > > > > >; auto:143 = do_test(const ClientCreator&, const Test&, std::size_t, boost::optionalmqtt::protocol_version) [with ClientCreator = do_combi_test_sync(const Test&, std::size_t) [with Test = st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)>; std::size_t = long unsigned int]::<lambda(auto:134&& ...)>; Test = st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)>; std::size_t = long unsigned int]::<lambda()>; auto:144 = mqtt::broker::broker_t]::<lambda(boost::optional, mqtt::publish_options, mqtt::buffer, mqtt::buffer, mqtt::v5::properties)>::<lambda()>, st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)> [with auto:142 = std::vector<std::shared_ptr<mqtt::callable_overlay<mqtt::sync_client<mqtt::tcp_endpoint<boost::asio::basic_stream_socketboost::asio::ip::tcp, boost::asio::io_context::strand> > > >, std::allocator<std::shared_ptr<mqtt::callable_overlay<mqtt::sync_client<mqtt::tcp_endpoint<boost::asio::basic_stream_socketboost::asio::ip::tcp, boost::asio::io_context::strand> > > > > >; auto:143 = do_test(const ClientCreator&, const Test&, std::size_t, boost::optionalmqtt::protocol_version) [with ClientCreator = do_combi_test_sync(const Test&, std::size_t) [with Test = st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)>; std::size_t = long unsigned int]::<lambda(auto:134&& ...)>; Test = st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)>; std::size_t = long unsigned int]::<lambda()>; auto:144 = mqtt::broker::broker_t]::<lambda(boost::optional, mqtt::publish_options, mqtt::buffer, mqtt::buffer, mqtt::v5::properties)>::<lambda()>, st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)> [with auto:142 = std::vector<std::shared_ptr<mqtt::callable_overlay<mqtt::sync_client<mqtt::tcp_endpoint<boost::asio::basic_stream_socketboost::asio::ip::tcp, boost::asio::io_context::strand> > > >, std::allocator<std::shared_ptr<mqtt::callable_overlay<mqtt::sync_client<mqtt::tcp_endpoint<boost::asio::basic_stream_socketboost::asio::ip::tcp, boost::asio::io_context::strand> > > > > >; auto:143 = do_test(const ClientCreator&, const Test&, std::size_t, boost::optionalmqtt::protocol_version) [with ClientCreator = do_combi_test_sync(const Test&, std::size_t) [with Test = st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)>; std::size_t = long unsigned int]::<lambda(auto:134&& ...)>; Test = st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)>; std::size_t = long unsigned int]::<lambda()>; auto:144 = mqtt::broker::broker_t]::<lambda(boost::optional, mqtt::publish_options, mqtt::buffer, mqtt::buffer, mqtt::v5::properties)>::<lambda()>}; std::size_t = long unsigned int]’, declared using local type ‘st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)> [with auto:142 = std::vector<std::shared_ptr<mqtt::callable_overlay<mqtt::sync_client<mqtt::tcp_endpoint<boost::asio::basic_stream_socketboost::asio::ip::tcp, boost::asio::io_context::strand> > > >, std::allocator<std::shared_ptr<mqtt::callable_overlay<mqtt::sync_client<mqtt::tcp_endpoint<boost::asio::basic_stream_socketboost::asio::ip::tcp, boost::asio::io_context::strand> > > > > >; auto:143 = do_test(const ClientCreator&, const Test&, std::size_t, boost::optionalmqtt::protocol_version) [with ClientCreator = do_combi_test_sync(const Test&, std::size_t) [with Test = st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)>; std::size_t = long unsigned int]::<lambda(auto:134&& ...)>; Test = st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)>; std::size_t = long unsigned int]::<lambda()>; auto:144 = mqtt::broker::broker_t]::<lambda(boost::optional, mqtt::publish_options, mqtt::buffer, mqtt::buffer, mqtt::v5::properties)>::<lambda()>’, is used but never defined [-fpermissive]
ordered_caller(std::size_t& index, Funcs&&... funcs)
^~~~~~~~~~~~~~
In file included from /usr/include/c++/8/functional:59,
from /usr/include/boost/smart_ptr/detail/shared_count.hpp:38,
from /usr/include/boost/smart_ptr/shared_ptr.hpp:28,
from /usr/include/boost/shared_ptr.hpp:17,
from /usr/include/boost/test/tools/assertion_result.hpp:21,
from /usr/include/boost/test/tools/old/impl.hpp:20,
from /usr/include/boost/test/test_tools.hpp:46,
from /usr/include/boost/test/unit_test.hpp:18,
from /home/admin/mqtt_cpp/test/system/../common/test_main.hpp:13,
from /home/admin/mqtt_cpp/test/system/st_receive_maximum.cpp:7:
/usr/include/c++/8/bits/std_function.h:666:7: error: ‘std::function<_Res(_ArgTypes ...)>::function(_Functor) [with _Functor = st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)> [with auto:142 = std::vector<std::shared_ptr<mqtt::callable_overlay<mqtt::sync_client<mqtt::tcp_endpoint<boost::asio::basic_stream_socketboost::asio::ip::tcp, boost::asio::io_context::strand> > > >, std::allocator<std::shared_ptr<mqtt::callable_overlay<mqtt::sync_client<mqtt::tcp_endpoint<boost::asio::basic_stream_socketboost::asio::ip::tcp, boost::asio::io_context::strand> > > > > >; auto:143 = do_test(const ClientCreator&, const Test&, std::size_t, boost::optionalmqtt::protocol_version) [with ClientCreator = do_combi_test_sync(const Test&, std::size_t) [with Test = st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)>; std::size_t = long unsigned int]::<lambda(auto:134&& ...)>; Test = st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)>; std::size_t = long unsigned int]::<lambda()>; auto:144 = mqtt::broker::broker_t]::<lambda(boost::optional, mqtt::publish_options, mqtt::buffer, mqtt::buffer, mqtt::v5::properties)>; = void; = void; _Res = bool; _ArgTypes = {boost::optional, mqtt::publish_options, mqtt::buffer, mqtt::buffer, std::vector<boost::variant<mqtt::v5::property::payload_format_indicator, mqtt::v5::property::message_expiry_interval, mqtt::v5::property::content_type, mqtt::v5::property::response_topic, mqtt::v5::property::correlation_data, mqtt::v5::property::subscription_identifier, mqtt::v5::property::session_expiry_interval, mqtt::v5::property::assigned_client_identifier, mqtt::v5::property::server_keep_alive, mqtt::v5::property::authentication_method, mqtt::v5::property::authentication_data, mqtt::v5::property::request_problem_information, mqtt::v5::property::will_delay_interval, mqtt::v5::property::request_response_information, mqtt::v5::property::response_information, mqtt::v5::property::server_reference, mqtt::v5::property::reason_string, mqtt::v5::property::receive_maximum, mqtt::v5::property::topic_alias_maximum, mqtt::v5::property::topic_alias, mqtt::v5::property::maximum_qos, mqtt::v5::property::retain_available, mqtt::v5::property::user_property, mqtt::v5::property::maximum_packet_size, mqtt::v5::property::wildcard_subscription_available, mqtt::v5::property::subscription_identifier_available, mqtt::v5::property::shared_subscription_available>, std::allocator<boost::variant<mqtt::v5::property::payload_format_indicator, mqtt::v5::property::message_expiry_interval, mqtt::v5::property::content_type, mqtt::v5::property::response_topic, mqtt::v5::property::correlation_data, mqtt::v5::property::subscription_identifier, mqtt::v5::property::session_expiry_interval, mqtt::v5::property::assigned_client_identifier, mqtt::v5::property::server_keep_alive, mqtt::v5::property::authentication_method, mqtt::v5::property::authentication_data, mqtt::v5::property::request_problem_information, mqtt::v5::property::will_delay_interval, mqtt::v5::property::request_response_information, mqtt::v5::property::response_information, mqtt::v5::property::server_reference, mqtt::v5::property::reason_string, mqtt::v5::property::receive_maximum, mqtt::v5::property::topic_alias_maximum, mqtt::v5::property::topic_alias, mqtt::v5::property::maximum_qos, mqtt::v5::property::retain_available, mqtt::v5::property::user_property, mqtt::v5::property::maximum_packet_size, mqtt::v5::property::wildcard_subscription_available, mqtt::v5::property::subscription_identifier_available, mqtt::v5::property::shared_subscription_available> > >}]’, declared using local type ‘st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)> [with auto:142 = std::vector<std::shared_ptr<mqtt::callable_overlay<mqtt::sync_client<mqtt::tcp_endpoint<boost::asio::basic_stream_socketboost::asio::ip::tcp, boost::asio::io_context::strand> > > >, std::allocator<std::shared_ptr<mqtt::callable_overlay<mqtt::sync_client<mqtt::tcp_endpoint<boost::asio::basic_stream_socketboost::asio::ip::tcp, boost::asio::io_context::strand> > > > > >; auto:143 = do_test(const ClientCreator&, const Test&, std::size_t, boost::optionalmqtt::protocol_version) [with ClientCreator = do_combi_test_sync(const Test&, std::size_t) [with Test = st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)>; std::size_t = long unsigned int]::<lambda(auto:134&& ...)>; Test = st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)>; std::size_t = long unsigned int]::<lambda()>; auto:144 = mqtt::broker::broker_t]::<lambda(boost::optional, mqtt::publish_options, mqtt::buffer, mqtt::buffer, mqtt::v5::properties)>’, is used but never defined [-fpermissive]
function<_Res(_ArgTypes...)>::
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/std_function.h:666:7: error: ‘std::function<_Res(_ArgTypes ...)>::function(_Functor) [with _Functor = st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)> [with auto:142 = std::vector<std::shared_ptr<mqtt::callable_overlay<mqtt::sync_client<mqtt::tcp_endpoint<boost::asio::basic_stream_socketboost::asio::ip::tcp, boost::asio::io_context::strand> > > >, std::allocator<std::shared_ptr<mqtt::callable_overlay<mqtt::sync_client<mqtt::tcp_endpoint<boost::asio::basic_stream_socketboost::asio::ip::tcp, boost::asio::io_context::strand> > > > > >; auto:143 = do_test(const ClientCreator&, const Test&, std::size_t, boost::optionalmqtt::protocol_version) [with ClientCreator = do_combi_test_sync(const Test&, std::size_t) [with Test = st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)>; std::size_t = long unsigned int]::<lambda(auto:134&& ...)>; Test = st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)>; std::size_t = long unsigned int]::<lambda()>; auto:144 = mqtt::broker::broker_t]::<lambda(packet_id_t, mqtt::v5::puback_reason_code, mqtt::v5::properties)>; = void; = void; _Res = bool; _ArgTypes = {short unsigned int, mqtt::v5::puback_reason_code, std::vector<boost::variant<mqtt::v5::property::payload_format_indicator, mqtt::v5::property::message_expiry_interval, mqtt::v5::property::content_type, mqtt::v5::property::response_topic, mqtt::v5::property::correlation_data, mqtt::v5::property::subscription_identifier, mqtt::v5::property::session_expiry_interval, mqtt::v5::property::assigned_client_identifier, mqtt::v5::property::server_keep_alive, mqtt::v5::property::authentication_method, mqtt::v5::property::authentication_data, mqtt::v5::property::request_problem_information, mqtt::v5::property::will_delay_interval, mqtt::v5::property::request_response_information, mqtt::v5::property::response_information, mqtt::v5::property::server_reference, mqtt::v5::property::reason_string, mqtt::v5::property::receive_maximum, mqtt::v5::property::topic_alias_maximum, mqtt::v5::property::topic_alias, mqtt::v5::property::maximum_qos, mqtt::v5::property::retain_available, mqtt::v5::property::user_property, mqtt::v5::property::maximum_packet_size, mqtt::v5::property::wildcard_subscription_available, mqtt::v5::property::subscription_identifier_available, mqtt::v5::property::shared_subscription_available>, std::allocator<boost::variant<mqtt::v5::property::payload_format_indicator, mqtt::v5::property::message_expiry_interval, mqtt::v5::property::content_type, mqtt::v5::property::response_topic, mqtt::v5::property::correlation_data, mqtt::v5::property::subscription_identifier, mqtt::v5::property::session_expiry_interval, mqtt::v5::property::assigned_client_identifier, mqtt::v5::property::server_keep_alive, mqtt::v5::property::authentication_method, mqtt::v5::property::authentication_data, mqtt::v5::property::request_problem_information, mqtt::v5::property::will_delay_interval, mqtt::v5::property::request_response_information, mqtt::v5::property::response_information, mqtt::v5::property::server_reference, mqtt::v5::property::reason_string, mqtt::v5::property::receive_maximum, mqtt::v5::property::topic_alias_maximum, mqtt::v5::property::topic_alias, mqtt::v5::property::maximum_qos, mqtt::v5::property::retain_available, mqtt::v5::property::user_property, mqtt::v5::property::maximum_packet_size, mqtt::v5::property::wildcard_subscription_available, mqtt::v5::property::subscription_identifier_available, mqtt::v5::property::shared_subscription_available> > >}]’, declared using local type ‘st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)> [with auto:142 = std::vector<std::shared_ptr<mqtt::callable_overlay<mqtt::sync_client<mqtt::tcp_endpoint<boost::asio::basic_stream_socketboost::asio::ip::tcp, boost::asio::io_context::strand> > > >, std::allocator<std::shared_ptr<mqtt::callable_overlay<mqtt::sync_client<mqtt::tcp_endpoint<boost::asio::basic_stream_socketboost::asio::ip::tcp, boost::asio::io_context::strand> > > > > >; auto:143 = do_test(const ClientCreator&, const Test&, std::size_t, boost::optionalmqtt::protocol_version) [with ClientCreator = do_combi_test_sync(const Test&, std::size_t) [with Test = st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)>; std::size_t = long unsigned int]::<lambda(auto:134&& ...)>; Test = st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)>; std::size_t = long unsigned int]::<lambda()>; auto:144 = mqtt::broker::broker_t]::<lambda(packet_id_t, mqtt::v5::puback_reason_code, mqtt::v5::properties)>’, is used but never defined [-fpermissive]
/usr/include/c++/8/bits/std_function.h:666:7: error: ‘std::function<_Res(_ArgTypes ...)>::function(_Functor) [with _Functor = st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)> [with auto:142 = std::vector<std::shared_ptr<mqtt::callable_overlay<mqtt::sync_client<mqtt::tcp_endpoint<boost::asio::basic_stream_socketboost::asio::ip::tcp, boost::asio::io_context::strand> > > >, std::allocator<std::shared_ptr<mqtt::callable_overlay<mqtt::sync_client<mqtt::tcp_endpoint<boost::asio::basic_stream_socketboost::asio::ip::tcp, boost::asio::io_context::strand> > > > > >; auto:143 = do_test(const ClientCreator&, const Test&, std::size_t, boost::optionalmqtt::protocol_version) [with ClientCreator = do_combi_test_sync(const Test&, std::size_t) [with Test = st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)>; std::size_t = long unsigned int]::<lambda(auto:134&& ...)>; Test = st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)>; std::size_t = long unsigned int]::<lambda()>; auto:144 = mqtt::broker::broker_t]::<lambda()>; = void; = void; _Res = void; _ArgTypes = {}]’, declared using local type ‘st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)> [with auto:142 = std::vector<std::shared_ptr<mqtt::callable_overlay<mqtt::sync_client<mqtt::tcp_endpoint<boost::asio::basic_stream_socketboost::asio::ip::tcp, boost::asio::io_context::strand> > > >, std::allocator<std::shared_ptr<mqtt::callable_overlay<mqtt::sync_client<mqtt::tcp_endpoint<boost::asio::basic_stream_socketboost::asio::ip::tcp, boost::asio::io_context::strand> > > > > >; auto:143 = do_test(const ClientCreator&, const Test&, std::size_t, boost::optionalmqtt::protocol_version) [with ClientCreator = do_combi_test_sync(const Test&, std::size_t) [with Test = st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)>; std::size_t = long unsigned int]::<lambda(auto:134&& ...)>; Test = st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)>; std::size_t = long unsigned int]::<lambda()>; auto:144 = mqtt::broker::broker_t]::<lambda()>’, is used but never defined [-fpermissive]
/usr/include/c++/8/bits/std_function.h:666:7: error: ‘std::function<_Res(_ArgTypes ...)>::function(_Functor) [with _Functor = st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)> [with auto:142 = std::vector<std::shared_ptr<mqtt::callable_overlay<mqtt::sync_client<mqtt::tcp_endpoint<boost::asio::basic_stream_socketboost::asio::ip::tcp, boost::asio::io_context::strand> > > >, std::allocator<std::shared_ptr<mqtt::callable_overlay<mqtt::sync_client<mqtt::tcp_endpoint<boost::asio::basic_stream_socketboost::asio::ip::tcp, boost::asio::io_context::strand> > > > > >; auto:143 = do_test(const ClientCreator&, const Test&, std::size_t, boost::optionalmqtt::protocol_version) [with ClientCreator = do_combi_test_sync(const Test&, std::size_t) [with Test = st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)>; std::size_t = long unsigned int]::<lambda(auto:134&& ...)>; Test = st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)>; std::size_t = long unsigned int]::<lambda()>; auto:144 = mqtt::broker::broker_t]::<lambda(mqtt::error_code)>; = void; = void; _Res = void; _ArgTypes = {boost::system::error_code}]’, declared using local type ‘st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)> [with auto:142 = std::vector<std::shared_ptr<mqtt::callable_overlay<mqtt::sync_client<mqtt::tcp_endpoint<boost::asio::basic_stream_socketboost::asio::ip::tcp, boost::asio::io_context::strand> > > >, std::allocator<std::shared_ptr<mqtt::callable_overlay<mqtt::sync_client<mqtt::tcp_endpoint<boost::asio::basic_stream_socketboost::asio::ip::tcp, boost::asio::io_context::strand> > > > > >; auto:143 = do_test(const ClientCreator&, const Test&, std::size_t, boost::optionalmqtt::protocol_version) [with ClientCreator = do_combi_test_sync(const Test&, std::size_t) [with Test = st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)>; std::size_t = long unsigned int]::<lambda(auto:134&& ...)>; Test = st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)>; std::size_t = long unsigned int]::<lambda()>; auto:144 = mqtt::broker::broker_t]::<lambda(mqtt::error_code)>’, is used but never defined [-fpermissive]
In file included from /home/admin/mqtt_cpp/test/system/st_receive_maximum.cpp:10:
/home/admin/mqtt_cpp/test/system/ordered_caller.hpp:16:5: error: ‘ordered_caller::ordered_caller(std::size_t&, Funcs&& ...) [with Funcs = {st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)> [with auto:142 = std::vector<std::shared_ptr<mqtt::callable_overlay<mqtt::sync_client<mqtt::tcp_endpoint<boost::asio::basic_stream_socketboost::asio::ip::tcp, boost::asio::io_context::strand> > > >, std::allocator<std::shared_ptr<mqtt::callable_overlay<mqtt::sync_client<mqtt::tcp_endpoint<boost::asio::basic_stream_socketboost::asio::ip::tcp, boost::asio::io_context::strand> > > > > >; auto:143 = do_test(const ClientCreator&, const Test&, std::size_t, boost::optionalmqtt::protocol_version) [with ClientCreator = do_combi_test_sync(const Test&, std::size_t) [with Test = st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)>; std::size_t = long unsigned int]::<lambda(auto:135&& ...)>; Test = st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)>; std::size_t = long unsigned int]::<lambda()>; auto:144 = mqtt::broker::broker_t]::<lambda(boost::optional, mqtt::publish_options, mqtt::buffer, mqtt::buffer, mqtt::v5::properties)>::<lambda()>, st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)> [with auto:142 = std::vector<std::shared_ptr<mqtt::callable_overlay<mqtt::sync_client<mqtt::tcp_endpoint<boost::asio::basic_stream_socketboost::asio::ip::tcp, boost::asio::io_context::strand> > > >, std::allocator<std::shared_ptr<mqtt::callable_overlay<mqtt::sync_client<mqtt::tcp_endpoint<boost::asio::basic_stream_socketboost::asio::ip::tcp, boost::asio::io_context::strand> > > > > >; auto:143 = do_test(const ClientCreator&, const Test&, std::size_t, boost::optionalmqtt::protocol_version) [with ClientCreator = do_combi_test_sync(const Test&, std::size_t) [with Test = st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)>; std::size_t = long unsigned int]::<lambda(auto:135&& ...)>; Test = st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)>; std::size_t = long unsigned int]::<lambda()>; auto:144 = mqtt::broker::broker_t]::<lambda(boost::optional, mqtt::publish_options, mqtt::buffer, mqtt::buffer, mqtt::v5::properties)>::<lambda()>, st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)> [with auto:142 = std::vector<std::shared_ptr<mqtt::callable_overlay<mqtt::sync_client<mqtt::tcp_endpoint<boost::asio::basic_stream_socketboost::asio::ip::tcp, boost::asio::io_context::strand> > > >, std::allocator<std::shared_ptr<mqtt::callable_overlay<mqtt::sync_client<mqtt::tcp_endpoint<boost::asio::basic_stream_socketboost::asio::ip::tcp, boost::asio::io_context::strand> > > > > >; auto:143 = do_test(const ClientCreator&, const Test&, std::size_t, boost::optionalmqtt::protocol_version) [with ClientCreator = do_combi_test_sync(const Test&, std::size_t) [with Test = st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)>; std::size_t = long unsigned int]::<lambda(auto:135&& ...)>; Test = st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)>; std::size_t = long unsigned int]::<lambda()>; auto:144 = mqtt::broker::broker_t]::<lambda(boost::optional, mqtt::publish_options, mqtt::buffer, mqtt::buffer, mqtt::v5::properties)>::<lambda()>}; std::size_t = long unsigned int]’, declared using local type ‘st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)> [with auto:142 = std::vector<std::shared_ptr<mqtt::callable_overlay<mqtt::sync_client<mqtt::tcp_endpoint<boost::asio::basic_stream_socketboost::asio::ip::tcp, boost::asio::io_context::strand> > > >, std::allocator<std::shared_ptr<mqtt::callable_overlay<mqtt::sync_client<mqtt::tcp_endpoint<boost::asio::basic_stream_socketboost::asio::ip::tcp, boost::asio::io_context::strand> > > > > >; auto:143 = do_test(const ClientCreator&, const Test&, std::size_t, boost::optionalmqtt::protocol_version) [with ClientCreator = do_combi_test_sync(const Test&, std::size_t) [with Test = st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)>; std::size_t = long unsigned int]::<lambda(auto:135&& ...)>; Test = st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)>; std::size_t = long unsigned int]::<lambda()>; auto:144 = mqtt::broker::broker_t]::<lambda(boost::optional, mqtt::publish_options, mqtt::buffer, mqtt::buffer, mqtt::v5::properties)>::<lambda()>’, is used but never defined [-fpermissive]
ordered_caller(std::size_t& index, Funcs&&... funcs)
^~~~~~~~~~~~~~
In file included from /usr/include/c++/8/functional:59,
from /usr/include/boost/smart_ptr/detail/shared_count.hpp:38,
from /usr/include/boost/smart_ptr/shared_ptr.hpp:28,
from /usr/include/boost/shared_ptr.hpp:17,
from /usr/include/boost/test/tools/assertion_result.hpp:21,
from /usr/include/boost/test/tools/old/impl.hpp:20,
from /usr/include/boost/test/test_tools.hpp:46,
from /usr/include/boost/test/unit_test.hpp:18,
from /home/admin/mqtt_cpp/test/system/../common/test_main.hpp:13,
from /home/admin/mqtt_cpp/test/system/st_receive_maximum.cpp:7:
/usr/include/c++/8/bits/std_function.h:666:7: error: ‘std::function<_Res(_ArgTypes ...)>::function(_Functor) [with _Functor = st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)> [with auto:142 = std::vector<std::shared_ptr<mqtt::callable_overlay<mqtt::sync_client<mqtt::tcp_endpoint<boost::asio::basic_stream_socketboost::asio::ip::tcp, boost::asio::io_context::strand> > > >, std::allocator<std::shared_ptr<mqtt::callable_overlay<mqtt::sync_client<mqtt::tcp_endpoint<boost::asio::basic_stream_socketboost::asio::ip::tcp, boost::asio::io_context::strand> > > > > >; auto:143 = do_test(const ClientCreator&, const Test&, std::size_t, boost::optionalmqtt::protocol_version) [with ClientCreator = do_combi_test_sync(const Test&, std::size_t) [with Test = st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)>; std::size_t = long unsigned int]::<lambda(auto:135&& ...)>; Test = st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)>; std::size_t = long unsigned int]::<lambda()>; auto:144 = mqtt::broker::broker_t]::<lambda(boost::optional, mqtt::publish_options, mqtt::buffer, mqtt::buffer, mqtt::v5::properties)>; = void; = void; _Res = bool; _ArgTypes = {boost::optional, mqtt::publish_options, mqtt::buffer, mqtt::buffer, std::vector<boost::variant<mqtt::v5::property::payload_format_indicator, mqtt::v5::property::message_expiry_interval, mqtt::v5::property::content_type, mqtt::v5::property::response_topic, mqtt::v5::property::correlation_data, mqtt::v5::property::subscription_identifier, mqtt::v5::property::session_expiry_interval, mqtt::v5::property::assigned_client_identifier, mqtt::v5::property::server_keep_alive, mqtt::v5::property::authentication_method, mqtt::v5::property::authentication_data, mqtt::v5::property::request_problem_information, mqtt::v5::property::will_delay_interval, mqtt::v5::property::request_response_information, mqtt::v5::property::response_information, mqtt::v5::property::server_reference, mqtt::v5::property::reason_string, mqtt::v5::property::receive_maximum, mqtt::v5::property::topic_alias_maximum, mqtt::v5::property::topic_alias, mqtt::v5::property::maximum_qos, mqtt::v5::property::retain_available, mqtt::v5::property::user_property, mqtt::v5::property::maximum_packet_size, mqtt::v5::property::wildcard_subscription_available, mqtt::v5::property::subscription_identifier_available, mqtt::v5::property::shared_subscription_available>, std::allocator<boost::variant<mqtt::v5::property::payload_format_indicator, mqtt::v5::property::message_expiry_interval, mqtt::v5::property::content_type, mqtt::v5::property::response_topic, mqtt::v5::property::correlation_data, mqtt::v5::property::subscription_identifier, mqtt::v5::property::session_expiry_interval, mqtt::v5::property::assigned_client_identifier, mqtt::v5::property::server_keep_alive, mqtt::v5::property::authentication_method, mqtt::v5::property::authentication_data, mqtt::v5::property::request_problem_information, mqtt::v5::property::will_delay_interval, mqtt::v5::property::request_response_information, mqtt::v5::property::response_information, mqtt::v5::property::server_reference, mqtt::v5::property::reason_string, mqtt::v5::property::receive_maximum, mqtt::v5::property::topic_alias_maximum, mqtt::v5::property::topic_alias, mqtt::v5::property::maximum_qos, mqtt::v5::property::retain_available, mqtt::v5::property::user_property, mqtt::v5::property::maximum_packet_size, mqtt::v5::property::wildcard_subscription_available, mqtt::v5::property::subscription_identifier_available, mqtt::v5::property::shared_subscription_available> > >}]’, declared using local type ‘st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)> [with auto:142 = std::vector<std::shared_ptr<mqtt::callable_overlay<mqtt::sync_client<mqtt::tcp_endpoint<boost::asio::basic_stream_socketboost::asio::ip::tcp, boost::asio::io_context::strand> > > >, std::allocator<std::shared_ptr<mqtt::callable_overlay<mqtt::sync_client<mqtt::tcp_endpoint<boost::asio::basic_stream_socketboost::asio::ip::tcp, boost::asio::io_context::strand> > > > > >; auto:143 = do_test(const ClientCreator&, const Test&, std::size_t, boost::optionalmqtt::protocol_version) [with ClientCreator = do_combi_test_sync(const Test&, std::size_t) [with Test = st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)>; std::size_t = long unsigned int]::<lambda(auto:135&& ...)>; Test = st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)>; std::size_t = long unsigned int]::<lambda()>; auto:144 = mqtt::broker::broker_t]::<lambda(boost::optional, mqtt::publish_options, mqtt::buffer, mqtt::buffer, mqtt::v5::properties)>’, is used but never defined [-fpermissive]
function<_Res(_ArgTypes...)>::
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/std_function.h:666:7: error: ‘std::function<_Res(_ArgTypes ...)>::function(_Functor) [with _Functor = st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)> [with auto:142 = std::vector<std::shared_ptr<mqtt::callable_overlay<mqtt::sync_client<mqtt::tcp_endpoint<boost::asio::basic_stream_socketboost::asio::ip::tcp, boost::asio::io_context::strand> > > >, std::allocator<std::shared_ptr<mqtt::callable_overlay<mqtt::sync_client<mqtt::tcp_endpoint<boost::asio::basic_stream_socketboost::asio::ip::tcp, boost::asio::io_context::strand> > > > > >; auto:143 = do_test(const ClientCreator&, const Test&, std::size_t, boost::optionalmqtt::protocol_version) [with ClientCreator = do_combi_test_sync(const Test&, std::size_t) [with Test = st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)>; std::size_t = long unsigned int]::<lambda(auto:135&& ...)>; Test = st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)>; std::size_t = long unsigned int]::<lambda()>; auto:144 = mqtt::broker::broker_t]::<lambda(packet_id_t, mqtt::v5::puback_reason_code, mqtt::v5::properties)>; = void; = void; _Res = bool; _ArgTypes = {short unsigned int, mqtt::v5::puback_reason_code, std::vector<boost::variant<mqtt::v5::property::payload_format_indicator, mqtt::v5::property::message_expiry_interval, mqtt::v5::property::content_type, mqtt::v5::property::response_topic, mqtt::v5::property::correlation_data, mqtt::v5::property::subscription_identifier, mqtt::v5::property::session_expiry_interval, mqtt::v5::property::assigned_client_identifier, mqtt::v5::property::server_keep_alive, mqtt::v5::property::authentication_method, mqtt::v5::property::authentication_data, mqtt::v5::property::request_problem_information, mqtt::v5::property::will_delay_interval, mqtt::v5::property::request_response_information, mqtt::v5::property::response_information, mqtt::v5::property::server_reference, mqtt::v5::property::reason_string, mqtt::v5::property::receive_maximum, mqtt::v5::property::topic_alias_maximum, mqtt::v5::property::topic_alias, mqtt::v5::property::maximum_qos, mqtt::v5::property::retain_available, mqtt::v5::property::user_property, mqtt::v5::property::maximum_packet_size, mqtt::v5::property::wildcard_subscription_available, mqtt::v5::property::subscription_identifier_available, mqtt::v5::property::shared_subscription_available>, std::allocator<boost::variant<mqtt::v5::property::payload_format_indicator, mqtt::v5::property::message_expiry_interval, mqtt::v5::property::content_type, mqtt::v5::property::response_topic, mqtt::v5::property::correlation_data, mqtt::v5::property::subscription_identifier, mqtt::v5::property::session_expiry_interval, mqtt::v5::property::assigned_client_identifier, mqtt::v5::property::server_keep_alive, mqtt::v5::property::authentication_method, mqtt::v5::property::authentication_data, mqtt::v5::property::request_problem_information, mqtt::v5::property::will_delay_interval, mqtt::v5::property::request_response_information, mqtt::v5::property::response_information, mqtt::v5::property::server_reference, mqtt::v5::property::reason_string, mqtt::v5::property::receive_maximum, mqtt::v5::property::topic_alias_maximum, mqtt::v5::property::topic_alias, mqtt::v5::property::maximum_qos, mqtt::v5::property::retain_available, mqtt::v5::property::user_property, mqtt::v5::property::maximum_packet_size, mqtt::v5::property::wildcard_subscription_available, mqtt::v5::property::subscription_identifier_available, mqtt::v5::property::shared_subscription_available> > >}]’, declared using local type ‘st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)> [with auto:142 = std::vector<std::shared_ptr<mqtt::callable_overlay<mqtt::sync_client<mqtt::tcp_endpoint<boost::asio::basic_stream_socketboost::asio::ip::tcp, boost::asio::io_context::strand> > > >, std::allocator<std::shared_ptr<mqtt::callable_overlay<mqtt::sync_client<mqtt::tcp_endpoint<boost::asio::basic_stream_socketboost::asio::ip::tcp, boost::asio::io_context::strand> > > > > >; auto:143 = do_test(const ClientCreator&, const Test&, std::size_t, boost::optionalmqtt::protocol_version) [with ClientCreator = do_combi_test_sync(const Test&, std::size_t) [with Test = st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)>; std::size_t = long unsigned int]::<lambda(auto:135&& ...)>; Test = st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)>; std::size_t = long unsigned int]::<lambda()>; auto:144 = mqtt::broker::broker_t]::<lambda(packet_id_t, mqtt::v5::puback_reason_code, mqtt::v5::properties)>’, is used but never defined [-fpermissive]
/usr/include/c++/8/bits/std_function.h:666:7: error: ‘std::function<_Res(_ArgTypes ...)>::function(_Functor) [with _Functor = st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)> [with auto:142 = std::vector<std::shared_ptr<mqtt::callable_overlay<mqtt::sync_client<mqtt::tcp_endpoint<boost::asio::basic_stream_socketboost::asio::ip::tcp, boost::asio::io_context::strand> > > >, std::allocator<std::shared_ptr<mqtt::callable_overlay<mqtt::sync_client<mqtt::tcp_endpoint<boost::asio::basic_stream_socketboost::asio::ip::tcp, boost::asio::io_context::strand> > > > > >; auto:143 = do_test(const ClientCreator&, const Test&, std::size_t, boost::optionalmqtt::protocol_version) [with ClientCreator = do_combi_test_sync(const Test&, std::size_t) [with Test = st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)>; std::size_t = long unsigned int]::<lambda(auto:135&& ...)>; Test = st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)>; std::size_t = long unsigned int]::<lambda()>; auto:144 = mqtt::broker::broker_t]::<lambda()>; = void; = void; _Res = void; _ArgTypes = {}]’, declared using local type ‘st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)> [with auto:142 = std::vector<std::shared_ptr<mqtt::callable_overlay<mqtt::sync_client<mqtt::tcp_endpoint<boost::asio::basic_stream_socketboost::asio::ip::tcp, boost::asio::io_context::strand> > > >, std::allocator<std::shared_ptr<mqtt::callable_overlay<mqtt::sync_client<mqtt::tcp_endpoint<boost::asio::basic_stream_socketboost::asio::ip::tcp, boost::asio::io_context::strand> > > > > >; auto:143 = do_test(const ClientCreator&, const Test&, std::size_t, boost::optionalmqtt::protocol_version) [with ClientCreator = do_combi_test_sync(const Test&, std::size_t) [with Test = st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)>; std::size_t = long unsigned int]::<lambda(auto:135&& ...)>; Test = st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)>; std::size_t = long unsigned int]::<lambda()>; auto:144 = mqtt::broker::broker_t]::<lambda()>’, is used but never defined [-fpermissive]
/usr/include/c++/8/bits/std_function.h:666:7: error: ‘std::function<_Res(_ArgTypes ...)>::function(_Functor) [with _Functor = st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)> [with auto:142 = std::vector<std::shared_ptr<mqtt::callable_overlay<mqtt::sync_client<mqtt::tcp_endpoint<boost::asio::basic_stream_socketboost::asio::ip::tcp, boost::asio::io_context::strand> > > >, std::allocator<std::shared_ptr<mqtt::callable_overlay<mqtt::sync_client<mqtt::tcp_endpoint<boost::asio::basic_stream_socketboost::asio::ip::tcp, boost::asio::io_context::strand> > > > > >; auto:143 = do_test(const ClientCreator&, const Test&, std::size_t, boost::optionalmqtt::protocol_version) [with ClientCreator = do_combi_test_sync(const Test&, std::size_t) [with Test = st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)>; std::size_t = long unsigned int]::<lambda(auto:135&& ...)>; Test = st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)>; std::size_t = long unsigned int]::<lambda()>; auto:144 = mqtt::broker::broker_t]::<lambda(mqtt::error_code)>; = void; = void; _Res = void; _ArgTypes = {boost::system::error_code}]’, declared using local type ‘st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)> [with auto:142 = std::vector<std::shared_ptr<mqtt::callable_overlay<mqtt::sync_client<mqtt::tcp_endpoint<boost::asio::basic_stream_socketboost::asio::ip::tcp, boost::asio::io_context::strand> > > >, std::allocator<std::shared_ptr<mqtt::callable_overlay<mqtt::sync_client<mqtt::tcp_endpoint<boost::asio::basic_stream_socketboost::asio::ip::tcp, boost::asio::io_context::strand> > > > > >; auto:143 = do_test(const ClientCreator&, const Test&, std::size_t, boost::optionalmqtt::protocol_version) [with ClientCreator = do_combi_test_sync(const Test&, std::size_t) [with Test = st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)>; std::size_t = long unsigned int]::<lambda(auto:135&& ...)>; Test = st_receive_maximum::sync::test_method()::<lambda(boost::asio::io_context&, auto:142&, auto:143, auto:144&)>; std::size_t = long unsigned int]::<lambda()>; auto:144 = mqtt::broker::broker_t]::<lambda(mqtt::error_code)>’, is used but never defined [-fpermissive]
make[2]: *** [test/system/CMakeFiles/st_receive_maximum.dir/build.make:63: test/system/CMakeFiles/st_receive_maximum.dir/st_receive_maximum.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:478: test/system/CMakeFiles/st_receive_maximum.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
admin@ip-172-31-80-21:~/mqtt_cpp/build$

@HINEOWAKEUP
Copy link
Author

admin@ip-172-31-80-21:~/mqtt_cpp/build$ cat /usr/include/boost/version.hpp
// Boost version.hpp configuration header file ------------------------------//

// (C) Copyright John maddock 1999. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

// See http://www.boost.org/libs/config for documentation

#ifndef BOOST_VERSION_HPP
#define BOOST_VERSION_HPP

//
// Caution: this is the only Boost header that is guaranteed
// to change with every Boost release. Including this header
// will cause a recompile every time a new Boost version is
// used.
//
// BOOST_VERSION % 100 is the patch level
// BOOST_VERSION / 100 % 1000 is the minor version
// BOOST_VERSION / 100000 is the major version

#define BOOST_VERSION 106700

//
// BOOST_LIB_VERSION must be defined to be the same as BOOST_VERSION
// but as a string in the form "x_y[_z]" where x is the major version
// number, y is the minor version number, and z is the patch level if not 0.
// This is used by <config/auto_link.hpp> to select which library version to link to.

#define BOOST_LIB_VERSION "1_67"

#endif
admin@ip-172-31-80-21:~/mqtt_cpp/build$

@HINEOWAKEUP
Copy link
Author

ok, just change '.has_value' to '.value' then make keeps going...
so,I bet it is boost version issue.

@HINEOWAKEUP
Copy link
Author

Ok. let me keep going... then I got this:
[ 77%] Building CXX object test/unit/CMakeFiles/ut_broker_security.dir/ut_broker_security.cpp.o
/home/admin/mqtt_cpp/test/unit/ut_broker_security.cpp: In member function ‘void ut_broker_security::check_publish_any::test_method()’:
/home/admin/mqtt_cpp/test/unit/ut_broker_security.cpp:386:14: error: ‘cout’ is not a member of ‘std’
std::cout << e.what() << std::endl;
^~~~
/home/admin/mqtt_cpp/test/unit/ut_broker_security.cpp:386:14: note: ‘std::cout’ is defined in header ‘’; did you forget to ‘#include ’?
/home/admin/mqtt_cpp/test/unit/ut_broker_security.cpp:11:1:
+#include

/home/admin/mqtt_cpp/test/unit/ut_broker_security.cpp:386:14:
std::cout << e.what() << std::endl;
^~~~
make[2]: *** [test/unit/CMakeFiles/ut_broker_security.dir/build.make:63: test/unit/CMakeFiles/ut_broker_security.dir/ut_broker_security.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1965: test/unit/CMakeFiles/ut_broker_security.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
admin@ip-172-31-80-21:~/mqtt_cpp/build$

redboltz added a commit that referenced this issue May 9, 2022
Removed assignment operator from uuid construction.
Removed boost::optional::has_value().
It doesn't exist in Boost 1.67.0.
Removed `std::cout` from test code.
@redboltz
Copy link
Owner

redboltz commented May 9, 2022

It seems that BOOST_UUID_RANDOM_GENERATOR_COMPAT is for backward compatibility.
Copy notation (acutually construct) is not mandatory so I use my solution.

Boost 1.67.0 doesn't have optional::has_value. So I replace simple bool conversion.
However, boost::optional is not output streamable. BOOST_TEST require it.
So I use BOOST_CHECK.
NOTE: optional::value() is not appropriate. It gets contained value. If it is converted to false, then test is failed.

std::cout shouldn't exist in the test code. So I replace it to MQTT_LOG().

I fixed them. Could you try #935 ?

@HINEOWAKEUP
Copy link
Author

Thank you very much!
I cloned from fix_934 and then compiled it, I got the same issue as the compiling result based on I updated from my end yesterday.

Here is still some incompatible things from boost 1.67:

[ 85%] Built target no_tls_server
[ 87%] Building CXX object example/CMakeFiles/client_cli.dir/client_cli.cpp.o
In file included from /usr/include/boost/variant/variant.hpp:31,
from /usr/include/boost/variant.hpp:17,
from /home/admin/mqtt_cpp/include/mqtt/variant.hpp:39,
from /home/admin/mqtt_cpp/include/mqtt/client.hpp:10,
from /home/admin/mqtt_cpp/include/mqtt_client_cpp.hpp:8,
from /home/admin/mqtt_cpp/example/client_cli.cpp:14:
/usr/include/boost/variant/detail/make_variant_list.hpp: In instantiation of ‘struct boost::detail::variant::make_variant_list<mqtt::v5::property::payload_format_indicator, mqtt::v5::property::message_expiry_interval, mqtt::v5::property::content_type, mqtt::v5::property::response_topic, mqtt::v5::property::correlation_data, mqtt::v5::property::subscription_identifier, mqtt::v5::property::session_expiry_interval, mqtt::v5::property::assigned_client_identifier, mqtt::v5::property::server_keep_alive, mqtt::v5::property::authentication_method, mqtt::v5::property::authentication_data, mqtt::v5::property::request_problem_information, mqtt::v5::property::will_delay_interval, mqtt::v5::property::request_response_information, mqtt::v5::property::response_information, mqtt::v5::property::server_reference, mqtt::v5::property::reason_string, mqtt::v5::property::receive_maximum, mqtt::v5::property::topic_alias_maximum, mqtt::v5::property::topic_alias, mqtt::v5::property::maximum_qos, mqtt::v5::property::retain_available, mqtt::v5::property::user_property, mqtt::v5::property::maximum_packet_size, mqtt::v5::property::wildcard_subscription_available, mqtt::v5::property::subscription_identifier_available, mqtt::v5::property::shared_subscription_available>’:
/usr/include/boost/mpl/eval_if.hpp:38:31: required from ‘struct boost::mpl::eval_if<boost::variant<mqtt::v5::property::payload_format_indicator, mqtt::v5::property::message_expiry_interval, mqtt::v5::property::content_type, mqtt::v5::property::response_topic, mqtt::v5::property::correlation_data, mqtt::v5::property::subscription_identifier, mqtt::v5::property::session_expiry_interval, mqtt::v5::property::assigned_client_identifier, mqtt::v5::property::server_keep_alive, mqtt::v5::property::authentication_method, mqtt::v5::property::authentication_data, mqtt::v5::property::request_problem_information, mqtt::v5::property::will_delay_interval, mqtt::v5::property::request_response_information, mqtt::v5::property::response_information, mqtt::v5::property::server_reference, mqtt::v5::property::reason_string, mqtt::v5::property::receive_maximum, mqtt::v5::property::topic_alias_maximum, mqtt::v5::property::topic_alias, mqtt::v5::property::maximum_qos, mqtt::v5::property::retain_available, mqtt::v5::property::user_property, mqtt::v5::property::maximum_packet_size, mqtt::v5::property::wildcard_subscription_available, mqtt::v5::property::subscription_identifier_available, mqtt::v5::property::shared_subscription_available>::is_sequence_based_, mqtt::v5::property::payload_format_indicator, boost::detail::variant::make_variant_list<mqtt::v5::property::payload_format_indicator, mqtt::v5::property::message_expiry_interval, mqtt::v5::property::content_type, mqtt::v5::property::response_topic, mqtt::v5::property::correlation_data, mqtt::v5::property::subscription_identifier, mqtt::v5::property::session_expiry_interval, mqtt::v5::property::assigned_client_identifier, mqtt::v5::property::server_keep_alive, mqtt::v5::property::authentication_method, mqtt::v5::property::authentication_data, mqtt::v5::property::request_problem_information, mqtt::v5::property::will_delay_interval, mqtt::v5::property::request_response_information, mqtt::v5::property::response_information, mqtt::v5::property::server_reference, mqtt::v5::property::reason_string, mqtt::v5::property::receive_maximum, mqtt::v5::property::topic_alias_maximum, mqtt::v5::property::topic_alias, mqtt::v5::property::maximum_qos, mqtt::v5::property::retain_available, mqtt::v5::property::user_property, mqtt::v5::property::maximum_packet_size, mqtt::v5::property::wildcard_subscription_available, mqtt::v5::property::subscription_identifier_available, mqtt::v5::property::shared_subscription_available> >’
/usr/include/boost/variant/variant.hpp:1247:17: required from ‘class boost::variant<mqtt::v5::property::payload_format_indicator, mqtt::v5::property::message_expiry_interval, mqtt::v5::property::content_type, mqtt::v5::property::response_topic, mqtt::v5::property::correlation_data, mqtt::v5::property::subscription_identifier, mqtt::v5::property::session_expiry_interval, mqtt::v5::property::assigned_client_identifier, mqtt::v5::property::server_keep_alive, mqtt::v5::property::authentication_method, mqtt::v5::property::authentication_data, mqtt::v5::property::request_problem_information, mqtt::v5::property::will_delay_interval, mqtt::v5::property::request_response_information, mqtt::v5::property::response_information, mqtt::v5::property::server_reference, mqtt::v5::property::reason_string, mqtt::v5::property::receive_maximum, mqtt::v5::property::topic_alias_maximum, mqtt::v5::property::topic_alias, mqtt::v5::property::maximum_qos, mqtt::v5::property::retain_available, mqtt::v5::property::user_property, mqtt::v5::property::maximum_packet_size, mqtt::v5::property::wildcard_subscription_available, mqtt::v5::property::subscription_identifier_available, mqtt::v5::property::shared_subscription_available>’
/usr/include/boost/variant/detail/apply_visitor_unary.hpp:118:53: required from ‘struct boost::detail::variant::result_multideduce1<mqtt::v5::property::detail::add_const_buffer_sequence_visitor, const boost::variant<mqtt::v5::property::payload_format_indicator, mqtt::v5::property::message_expiry_interval, mqtt::v5::property::content_type, mqtt::v5::property::response_topic, mqtt::v5::property::correlation_data, mqtt::v5::property::subscription_identifier, mqtt::v5::property::session_expiry_interval, mqtt::v5::property::assigned_client_identifier, mqtt::v5::property::server_keep_alive, mqtt::v5::property::authentication_method, mqtt::v5::property::authentication_data, mqtt::v5::property::request_problem_information, mqtt::v5::property::will_delay_interval, mqtt::v5::property::request_response_information, mqtt::v5::property::response_information, mqtt::v5::property::server_reference, mqtt::v5::property::reason_string, mqtt::v5::property::receive_maximum, mqtt::v5::property::topic_alias_maximum, mqtt::v5::property::topic_alias, mqtt::v5::property::maximum_qos, mqtt::v5::property::retain_available, mqtt::v5::property::user_property, mqtt::v5::property::maximum_packet_size, mqtt::v5::property::wildcard_subscription_available, mqtt::v5::property::subscription_identifier_available, mqtt::v5::property::shared_subscription_available> >’
/usr/include/boost/variant/detail/apply_visitor_unary.hpp:156:67: required from ‘struct boost::detail::variant::result_wrapper1<mqtt::v5::property::detail::add_const_buffer_sequence_visitor, const boost::variant<mqtt::v5::property::payload_format_indicator, mqtt::v5::property::message_expiry_interval, mqtt::v5::property::content_type, mqtt::v5::property::response_topic, mqtt::v5::property::correlation_data, mqtt::v5::property::subscription_identifier, mqtt::v5::property::session_expiry_interval, mqtt::v5::property::assigned_client_identifier, mqtt::v5::property::server_keep_alive, mqtt::v5::property::authentication_method, mqtt::v5::property::authentication_data, mqtt::v5::property::request_problem_information, mqtt::v5::property::will_delay_interval, mqtt::v5::property::request_response_information, mqtt::v5::property::response_information, mqtt::v5::property::server_reference, mqtt::v5::property::reason_string, mqtt::v5::property::receive_maximum, mqtt::v5::property::topic_alias_maximum, mqtt::v5::property::topic_alias, mqtt::v5::property::maximum_qos, mqtt::v5::property::retain_available, mqtt::v5::property::user_property, mqtt::v5::property::maximum_packet_size, mqtt::v5::property::wildcard_subscription_available, mqtt::v5::property::subscription_identifier_available, mqtt::v5::property::shared_subscription_available> >’
/usr/include/boost/variant/detail/apply_visitor_unary.hpp:177:98: required from ‘decltype(auto) boost::apply_visitor(Visitor&&, Visitable&&, typename boost::disable_if<boost::detail::variant::has_result_type >::type*) [with Visitor = mqtt::v5::property::detail::add_const_buffer_sequence_visitor; Visitable = const boost::variant<mqtt::v5::property::payload_format_indicator, mqtt::v5::property::message_expiry_interval, mqtt::v5::property::content_type, mqtt::v5::property::response_topic, mqtt::v5::property::correlation_data, mqtt::v5::property::subscription_identifier, mqtt::v5::property::session_expiry_interval, mqtt::v5::property::assigned_client_identifier, mqtt::v5::property::server_keep_alive, mqtt::v5::property::authentication_method, mqtt::v5::property::authentication_data, mqtt::v5::property::request_problem_information, mqtt::v5::property::will_delay_interval, mqtt::v5::property::request_response_information, mqtt::v5::property::response_information, mqtt::v5::property::server_reference, mqtt::v5::property::reason_string, mqtt::v5::property::receive_maximum, mqtt::v5::property::topic_alias_maximum, mqtt::v5::property::topic_alias, mqtt::v5::property::maximum_qos, mqtt::v5::property::retain_available, mqtt::v5::property::user_property, mqtt::v5::property::maximum_packet_size, mqtt::v5::property::wildcard_subscription_available, mqtt::v5::property::subscription_identifier_available, mqtt::v5::property::shared_subscription_available>&; typename boost::disable_if<boost::detail::variant::has_result_type >::type = void]’
/home/admin/mqtt_cpp/include/mqtt/variant.hpp:62:32: required from ‘constexpr decltype(auto) mqtt::visit(Visitor&&, Variants&& ...) [with Visitor = mqtt::v5::property::detail::add_const_buffer_sequence_visitor; Variants = {const boost::variant<mqtt::v5::property::payload_format_indicator, mqtt::v5::property::message_expiry_interval, mqtt::v5::property::content_type, mqtt::v5::property::response_topic, mqtt::v5::property::correlation_data, mqtt::v5::property::subscription_identifier, mqtt::v5::property::session_expiry_interval, mqtt::v5::property::assigned_client_identifier, mqtt::v5::property::server_keep_alive, mqtt::v5::property::authentication_method, mqtt::v5::property::authentication_data, mqtt::v5::property::request_problem_information, mqtt::v5::property::will_delay_interval, mqtt::v5::property::request_response_information, mqtt::v5::property::response_information, mqtt::v5::property::server_reference, mqtt::v5::property::reason_string, mqtt::v5::property::receive_maximum, mqtt::v5::property::topic_alias_maximum, mqtt::v5::property::topic_alias, mqtt::v5::property::maximum_qos, mqtt::v5::property::retain_available, mqtt::v5::property::user_property, mqtt::v5::property::maximum_packet_size, mqtt::v5::property::wildcard_subscription_available, mqtt::v5::property::subscription_identifier_available, mqtt::v5::property::shared_subscription_available>&}]’
/home/admin/mqtt_cpp/include/mqtt/property_variant.hpp:111:78: required from here
/usr/include/boost/variant/detail/make_variant_list.hpp:40:46: error: wrong number of template arguments (27, should be at least 0)
typedef typename mpl::list< T... >::type type;
^~~~
In file included from /usr/include/boost/mpl/aux_/include_preprocessed.hpp:37,
from /usr/include/boost/mpl/list.hpp:46,
from /usr/include/boost/math/policies/policy.hpp:9,
from /usr/include/boost/math/special_functions/math_fwd.hpp:29,
from /usr/include/boost/math/special_functions/sign.hpp:17,
from /usr/include/boost/lexical_cast/detail/inf_nan.hpp:34,
from /usr/include/boost/lexical_cast/detail/converter_lexical_streams.hpp:63,
from /usr/include/boost/lexical_cast/detail/converter_lexical.hpp:54,
from /usr/include/boost/lexical_cast/try_lexical_convert.hpp:42,
from /usr/include/boost/lexical_cast.hpp:32,
from /usr/include/boost/program_options/value_semantic.hpp:14,
from /usr/include/boost/program_options/options_description.hpp:13,
from /usr/include/boost/program_options.hpp:15,
from /home/admin/mqtt_cpp/example/client_cli.cpp:11:
/usr/include/boost/mpl/aux_/preprocessed/gcc/list.hpp:22:8: note: provided for ‘template<class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19> struct boost::mpl::list’
struct list;
^~~~
In file included from /home/admin/mqtt_cpp/include/mqtt/will.hpp:17,
from /home/admin/mqtt_cpp/include/mqtt/endpoint.hpp:43,
from /home/admin/mqtt_cpp/include/mqtt/client.hpp:23,
from /home/admin/mqtt_cpp/include/mqtt_client_cpp.hpp:8,
from /home/admin/mqtt_cpp/example/client_cli.cpp:14:
/home/admin/mqtt_cpp/include/mqtt/property_variant.hpp: In function ‘mqtt::v5::property::id mqtt::v5::id(const property_variant&)’:
/home/admin/mqtt_cpp/include/mqtt/property_variant.hpp:115:61: error: void value not ignored as it ought to be
return MQTT_NS::visit(property::detail::id_visitor(), pv);
^
/home/admin/mqtt_cpp/include/mqtt/property_variant.hpp: In function ‘std::size_t mqtt::v5::size(const property_variant&)’:
/home/admin/mqtt_cpp/include/mqtt/property_variant.hpp:119:63: error: void value not ignored as it ought to be
return MQTT_NS::visit(property::detail::size_visitor(), pv);
^
/home/admin/mqtt_cpp/include/mqtt/property_variant.hpp: In function ‘std::size_t mqtt::v5::num_of_const_buffer_sequence(const property_variant&)’:
/home/admin/mqtt_cpp/include/mqtt/property_variant.hpp:123:87: error: void value not ignored as it ought to be
return MQTT_NS::visit(property::detail::num_of_const_buffer_sequence_visitor(), pv);

@redboltz
Copy link
Owner

redboltz commented May 9, 2022

Oh, client_cli doesn't include mqtt/config.hpp on the top of file.

See https://github.com/redboltz/mqtt_cpp#overview

If you use boost::variant, you need to include mqtt/config.hpp prior to the boost headers inclusion becausse it defines boost configuration macros. When you use mqtt_client_cpp.hpp and/or mqtt_server_cpp.hpp, they include mqtt/config.hpp internally.

I fixed it. Please update fix_934 and try again.

@HINEOWAKEUP
Copy link
Author

Thank you! It almost there!
The following is probably the last issue for boost 1.67:

Scanning dependencies of target broker
[ 98%] Building CXX object example/CMakeFiles/broker.dir/broker.cpp.o
[ 98%] Built target v5_no_tls_client
Scanning dependencies of target bench
[ 98%] Building CXX object example/CMakeFiles/bench.dir/bench.cpp.o
In file included from /usr/include/x86_64-linux-gnu/c++/8/bits/c++allocator.h:33,
from /usr/include/c++/8/bits/allocator.h:46,
from /usr/include/c++/8/string:41,
from /usr/include/c++/8/bits/locale_classes.h:40,
from /usr/include/c++/8/bits/ios_base.h:41,
from /usr/include/c++/8/ios:42,
from /usr/include/c++/8/ostream:38,
from /home/admin/mqtt_cpp4/mqtt_cpp/include/mqtt/log.hpp:11,
from /home/admin/mqtt_cpp4/mqtt_cpp/include/mqtt/setup_log.hpp:18,
from /home/admin/mqtt_cpp4/mqtt_cpp/example/bench.cpp:8:
/usr/include/c++/8/ext/new_allocator.h: In instantiation of ‘void __gnu_cxx::new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = boost::asio::basic_waitable_timerstd::chrono::_V2::steady_clock; _Args = {boost::asio::executor&}; _Tp = boost::asio::basic_waitable_timerstd::chrono::_V2::steady_clock]’:
/usr/include/c++/8/bits/alloc_traits.h:475:4: required from ‘static void std::allocator_traits<std::allocator<_CharT> >::construct(std::allocator_traits<std::allocator<_CharT> >::allocator_type&, _Up*, _Args&& ...) [with _Up = boost::asio::basic_waitable_timerstd::chrono::_V2::steady_clock; _Args = {boost::asio::executor&}; _Tp = boost::asio::basic_waitable_timerstd::chrono::_V2::steady_clock; std::allocator_traits<std::allocator<_CharT> >::allocator_type = std::allocator<boost::asio::basic_waitable_timerstd::chrono::_V2::steady_clock >]’
/usr/include/c++/8/bits/shared_ptr_base.h:545:39: required from ‘std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::_Sp_counted_ptr_inplace(_Alloc, _Args&& ...) [with _Args = {boost::asio::executor&}; _Tp = boost::asio::basic_waitable_timerstd::chrono::_V2::steady_clock; _Alloc = std::allocator<boost::asio::basic_waitable_timerstd::chrono::_V2::steady_clock >; __gnu_cxx::_Lock_policy _Lp = (__gnu_cxx::_Lock_policy)2]’
/usr/include/c++/8/bits/shared_ptr_base.h:677:16: required from ‘std::__shared_count<_Lp>::__shared_count(_Tp*&, std::_Sp_alloc_shared_tag<_Alloc>, _Args&& ...) [with _Tp = boost::asio::basic_waitable_timerstd::chrono::_V2::steady_clock; _Alloc = std::allocator<boost::asio::basic_waitable_timerstd::chrono::_V2::steady_clock >; _Args = {boost::asio::executor&}; __gnu_cxx::_Lock_policy _Lp = (__gnu_cxx::_Lock_policy)2]’
/usr/include/c++/8/bits/shared_ptr_base.h:1342:71: required from ‘std::__shared_ptr<_Tp, _Lp>::__shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<boost::asio::basic_waitable_timerstd::chrono::_V2::steady_clock >; _Args = {boost::asio::executor&}; _Tp = boost::asio::basic_waitable_timerstd::chrono::_V2::steady_clock; __gnu_cxx::_Lock_policy _Lp = (__gnu_cxx::_Lock_policy)2]’
/usr/include/c++/8/bits/shared_ptr.h:359:59: required from ‘std::shared_ptr<_Tp>::shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<boost::asio::basic_waitable_timerstd::chrono::_V2::steady_clock >; _Args = {boost::asio::executor&}; _Tp = boost::asio::basic_waitable_timerstd::chrono::_V2::steady_clock]’
/usr/include/c++/8/bits/shared_ptr.h:705:14: required from ‘std::shared_ptr<_Tp> std::allocate_shared(const _Alloc&, _Args&& ...) [with _Tp = boost::asio::basic_waitable_timerstd::chrono::_V2::steady_clock; _Alloc = std::allocator<boost::asio::basic_waitable_timerstd::chrono::_V2::steady_clock >; _Args = {boost::asio::executor&}]’
/usr/include/c++/8/bits/shared_ptr.h:721:39: required from ‘std::shared_ptr<_Tp> std::make_shared(_Args&& ...) [with _Tp = boost::asio::basic_waitable_timerstd::chrono::_V2::steady_clock; _Args = {boost::asio::executor&}]’
/home/admin/mqtt_cpp4/mqtt_cpp/example/bench.cpp:1016:61: required from here
/usr/include/c++/8/ext/new_allocator.h:136:4: error: no matching function for call to ‘boost::asio::basic_waitable_timerstd::chrono::_V2::steady_clock::basic_waitable_timer(boost::asio::executor&)’
{ ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/boost/asio/steady_timer.hpp:22,
from /usr/include/boost/asio/basic_socket_streambuf.hpp:44,
from /usr/include/boost/asio/basic_socket_iostream.hpp:24,
from /usr/include/boost/asio.hpp:31,
from /home/admin/mqtt_cpp4/mqtt_cpp/include/mqtt/client.hpp:21,
from /home/admin/mqtt_cpp4/mqtt_cpp/include/mqtt/async_client.hpp:11,
from /home/admin/mqtt_cpp4/mqtt_cpp/example/bench.cpp:9:
/usr/include/boost/asio/basic_waitable_timer.hpp:232:3: note: candidate: ‘boost::asio::basic_waitable_timer<Clock, WaitTraits>::basic_waitable_timer(boost::asio::basic_waitable_timer<Clock, WaitTraits>&&) [with Clock = std::chrono::_V2::steady_clock; WaitTraits = boost::asio::wait_traitsstd::chrono::_V2::steady_clock]’
basic_waitable_timer(basic_waitable_timer&& other)
^~~~~~~~~~~~~~~~~~~~
/usr/include/boost/asio/basic_waitable_timer.hpp:232:3: note: no known conversion for argument 1 from ‘boost::asio::executor’ to ‘boost::asio::basic_waitable_timerstd::chrono::_V2::steady_clock&&’
/usr/include/boost/asio/basic_waitable_timer.hpp:211:3: note: candidate: ‘boost::asio::basic_waitable_timer<Clock, WaitTraits>::basic_waitable_timer(boost::asio::io_context&, const duration&) [with Clock = std::chrono::_V2::steady_clock; WaitTraits = boost::asio::wait_traitsstd::chrono::_V2::steady_clock; boost::asio::basic_waitable_timer<Clock, WaitTraits>::duration = std::chrono::duration<long int, std::ratio<1, 1000000000> >]’
basic_waitable_timer(boost::asio::io_context& io_context,
^~~~~~~~~~~~~~~~~~~~
/usr/include/boost/asio/basic_waitable_timer.hpp:211:3: note: candidate expects 2 arguments, 1 provided
/usr/include/boost/asio/basic_waitable_timer.hpp:192:3: note: candidate: ‘boost::asio::basic_waitable_timer<Clock, WaitTraits>::basic_waitable_timer(boost::asio::io_context&, const time_point&) [with Clock = std::chrono::_V2::steady_clock; WaitTraits = boost::asio::wait_traitsstd::chrono::_V2::steady_clock; boost::asio::basic_waitable_timer<Clock, WaitTraits>::time_point = std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >]’
basic_waitable_timer(boost::asio::io_context& io_context,
^~~~~~~~~~~~~~~~~~~~
/usr/include/boost/asio/basic_waitable_timer.hpp:192:3: note: candidate expects 2 arguments, 1 provided
/usr/include/boost/asio/basic_waitable_timer.hpp:177:12: note: candidate: ‘boost::asio::basic_waitable_timer<Clock, WaitTraits>::basic_waitable_timer(boost::asio::io_context&) [with Clock = std::chrono::_V2::steady_clock; WaitTraits = boost::asio::wait_traitsstd::chrono::_V2::steady_clock]’
explicit basic_waitable_timer(boost::asio::io_context& io_context)
^~~~~~~~~~~~~~~~~~~~
/usr/include/boost/asio/basic_waitable_timer.hpp:177:12: note: no known conversion for argument 1 from ‘boost::asio::executor’ to ‘boost::asio::io_context&’
make[2]: *** [example/CMakeFiles/bench.dir/build.make:63: example/CMakeFiles/bench.dir/bench.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:2527: example/CMakeFiles/bench.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[100%] Linking CXX executable redirect
[100%] Built target redirect
[100%] Linking CXX executable broker
[100%] Built target broker
make: *** [Makefile:141: all] Error 2
admin@ip-172-31-30-50:~/mqtt_cpp4/mqtt_cpp/build$

@HINEOWAKEUP
Copy link
Author

Do you know which file/code can let me study how the mqtt server keep/save the active client request session and send the subscribed topic message to the client as soon as the message is available? Where can I study the latency/interval between the time of the topic message saved into broker and the time the broker start to pass the message data to the active session object for sending action? Thank you!

@redboltz
Copy link
Owner

The error isn't reproduced on my environment.
I use Boost.1.67.0 explicitly.
I directly compile and link bench.cpp as follows:

clang++ -std=c++14 bench.cpp -I/home/kondo/work/mqtt_cpp/include/ -I/home/kondo/dl/boost_1_67_0/boost/ -pthread -lboost_program_options

g++ -std=c++14 bench.cpp -I/home/kondo/work/mqtt_cpp/include/ -I/home/kondo/dl/boost_1_67_0/boost/ -pthread -lboost_program_options

clang++ and g++ report no errors.

clang++ --version                                                                                                                                                                                       clang version 13.0.1
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin

g++ --version                                                                                                                                                                                           g++ (GCC) 11.2.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

@redboltz
Copy link
Owner

Do you know which file/code can let me study how the mqtt server keep/save the active client request session and send the subscribed topic message to the client as soon as the message is available? Where can I study the latency/interval between the time of the topic message saved into broker and the time the broker start to pass the message data to the active session object for sending action? Thank you!

Simple server example is here:
https://github.com/redboltz/mqtt_cpp/blob/master/example/no_tls_server.cpp

High performance (almost) full spec broker example is here
https://github.com/redboltz/mqtt_cpp/tree/master/include/mqtt/broker
https://github.com/redboltz/mqtt_cpp/blob/master/example/broker.cpp

@redboltz
Copy link
Owner

The error isn't reproduced on my environment. I use Boost.1.67.0 explicitly. I directly compile and link bench.cpp as follows:

clang++ -std=c++14 bench.cpp -I/home/kondo/work/mqtt_cpp/include/ -I/home/kondo/dl/boost_1_67_0/boost/ -pthread -lboost_program_options

g++ -std=c++14 bench.cpp -I/home/kondo/work/mqtt_cpp/include/ -I/home/kondo/dl/boost_1_67_0/boost/ -pthread -lboost_program_options

clang++ and g++ report no errors.

clang++ --version                                                                                                                                                                                       clang version 13.0.1
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin

g++ --version                                                                                                                                                                                           g++ (GCC) 11.2.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Please ignore it. I added BOOST_VERSION priting code then got 1.78.0.

@redboltz
Copy link
Owner

redboltz commented May 11, 2022

I noticed that -I/home/kondo/dl/boost_1_67_0/boost/ should be -I/home/kondo/dl/boost_1_67_0/.
And got the error.

@redboltz
Copy link
Owner

Updated.
bench.cpp requires Boost 1.70.0. I tried to find altanative way but I couldn't find it.
So cmake exclude bench.cpp if Boost version is less than 1.70.0.

@redboltz
Copy link
Owner

redboltz commented May 14, 2022

Finally I updated fix_934.
Unfortunately, I decided minimum boost requirement is updated to 1.74.0 from 1.67.0.
During many improvements, the current master code no longer works with boost 1.67.0 silently.
I tried to fix the current code to work well with 1.67.0. But bench, broker, websockets, etc prevent it.
It required very hard work. Finally I gave up it. It is not productive work for me.
My priority is more future oriented work.

1.74.0 was released about 1 year and 9 months ago. I believe that it is acceptable time.
Debian stable support 1.74.0. https://packages.debian.org/stable/libs/

redboltz added a commit that referenced this issue May 14, 2022
@HINEOWAKEUP
Copy link
Author

HINEOWAKEUP commented May 15, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants