danieljoos / libkafka-asio

C++ Kafka Client Library using Boost Asio
MIT License
76 stars 40 forks source link

compiler errors - help! #32

Closed kashif68 closed 4 years ago

kashif68 commented 4 years ago

/usr/local/include/libkafka_asio/detail/connection_service.h: In member function ‘void libkafka_asio::detail::BasicConnectionService::construct(libkafka_asio::detail::BasicConnectionService::implementation_type&)’: [build] /usr/local/include/libkafka_asio/detail/connection_service.h:52:28: error: there are no arguments to ‘get_io_service’ that depend on a template parameter, so a declaration of ‘get_io_service’ must be available [-fpermissive] [build] 52 | impl.reset(new Service(get_io_service())); [build] | ^~~~~~ [build] /usr/local/include/libkafka_asio/detail/connection_service.h:52:28: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated) [build] In file included from /usr/local/include/boost/detail/endian.hpp:9, [build] from /usr/local/include/libkafka_asio/detail/endian.h:15, [build] from /usr/local/include/libkafka_asio/detail/impl/request_write.h:13, [build] from /usr/local/include/libkafka_asio/detail/request_write.h:104, [build] from /usr/local/include/libkafka_asio/detail/impl/connection_service.h:16, [build] from /usr/local/include/libkafka_asio/detail/connection_service.h:250, [build] from /usr/local/include/libkafka_asio/connection.h:14, [build] from /usr/local/include/libkafka_asio/libkafka_asio.h:17,

[build] /usr/local/include/boost/predef/detail/endian_compat.h: At global scope: [build] /usr/local/include/boost/predef/detail/endiancompat.h:11:161: note: #pragma message: The use of BOOST_ENDIAN and BOOST_BYTE_ORDER is deprecated. Please include <boost/predef/other/endian.h> and use BOOSTENDIANBYTE instead [build] 11 | #pragma message("The use of BOOST_ENDIAN and BOOST_BYTE_ORDER is deprecated. Please include <boost/predef/other/endian.h> and use BOOSTENDIAN_BYTE instead") [build] |

kashif68 commented 4 years ago

These errors were the result of using the latest Boost libraries 1.72.0 that has deprecated get_io_service must now by get_io_context. get_io_service is not available in 1.70 and onwards.

Similarly the ENDIAN warning was a result of deprecated in boost. Replaced with what it proposed in the #pragma message and it worked.

I made changes to my local lib and not sure yet to propose a change to main lib.