chriskohlhoff / asio

Asio C++ Library
http://think-async.com/Asio
4.81k stars 1.2k forks source link

boost asio 1.82.0 breaks dev_poll #1289

Closed jperkin closed 1 year ago

jperkin commented 1 year ago

The commit https://github.com/boostorg/asio/commit/6550b831d3edcdbdf92cfbf24b5803ea73bed1ce refactored some code and introduced epoll implementation details into dev_poll support.

This breaks illumos (and likely Solaris) builds with:

./boost/asio/detail/dev_poll_reactor.hpp: In member function 'void boost::asio::detail::dev_poll_reactor::start_op(int, boost::asio::detail::socket_type, per_descriptor_data&, boost::asio::detail::reactor_op*, bool, bool)':
./boost/asio/detail/dev_poll_reactor.hpp:112:10: error: 'epoll_reactor' has not been declared
  112 |         &epoll_reactor::call_post_immediate_completion, this);
      |          ^~~~~~~~~~~~~
grobian commented 1 year ago

OpenIndianaHipster:

gcc.compile.c++ bin.v2/libs/log/build/gcc-12.2/gentoorelease/pch-off/threadapi-pthread/threading-multi/visibility-hidden/syslog_backend.o

    "x86_64-pc-solaris2.11-g++"  -ftemplate-depth-1024 -fvisibility-inlines-hidden  -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE  -O2 -pipe -std=c++17 -fPIC -m64 -pthreads -finline-functions -Wno-inline -Wall -fvisibility=hidden -fno-strict-aliasing -DBOOST_ALL_NO_LIB=1 -DBOOST_ATOMIC_DYN_LINK=1 -DBOOST_CHRONO_DYN_LINK=1 -DBOOST_FILESYSTEM_DYN_LINK=1 -DBOOST_LOG_BUILDING_THE_LIB=1 -DBOOST_LOG_DLL -DBOOST_LOG_HAS_PTHREAD_MUTEX_ROBUST -DBOOST_LOG_USE_AVX2 -DBOOST_LOG_USE_NATIVE_SYSLOG -DBOOST_LOG_USE_SSSE3 -DBOOST_LOG_WITHOUT_DEBUG_OUTPUT -DBOOST_LOG_WITHOUT_EVENT_LOG -DBOOST_SPIRIT_USE_PHOENIX_V3=1 -DBOOST_THREAD_BUILD_DLL=1 -DBOOST_THREAD_DONT_USE_CHRONO=1 -DBOOST_THREAD_POSIX -DBOOST_THREAD_USE_DLL=1 -DNDEBUG -D_XOPEN_SOURCE=600 -D__EXTENSIONS__ -D__STDC_CONSTANT_MACROS  -I"." -I"libs/log/src"  -c -o "bin.v2/libs/log/build/gcc-12.2/gentoorelease/pch-off/threadapi-pthread/threading-multi/visibility-hidden/syslog_backend.o" "libs/log/src/syslog_backend.cpp"

In file included from ./boost/asio/detail/reactor.hpp:29,
                 from ./boost/asio/detail/impl/scheduler.ipp:30,
                 from ./boost/asio/detail/scheduler.hpp:240,
                 from ./boost/asio/io_context.hpp:44,
                 from libs/log/src/syslog_backend.cpp:33:
./boost/asio/detail/dev_poll_reactor.hpp: In member function ‘void boost::asio::detail::dev_poll_reactor::start_op(int, boost::asio::detail::socket_type, per_descriptor_data&, boost::asio::detail::reactor_op*, bool, bool)’:
In file included from ./boost/asio/detail/reactor.hpp:29,
                 from ./boost/asio/detail/impl/scheduler.ipp:30,
                 from ./boost/asio/detail/scheduler.hpp:240,
                 from ./boost/asio/io_context.hpp:44,
                 from libs/log/src/syslog_backend.cpp:33:
./boost/asio/detail/dev_poll_reactor.hpp: In member function ‘void boost::asio::
detail::dev_poll_reactor::start_op(int, boost::asio::detail::socket_type, per_de
scriptor_data&, boost::asio::detail::reactor_op*, bool, bool)’:
./boost/asio/detail/dev_poll_reactor.hpp:112:10: error: ‘epoll_reactor’ has not been declared
  112 |         &epoll_reactor::call_post_immediate_completion, this);
      |          ^~~~~~~~~~~~~

There is no epoll here.

jperkin commented 1 year ago

This turns out to be a duplicate of https://github.com/chriskohlhoff/asio/pull/1282. But is this the wrong repository to file issues/PR's against, as there hasn't been any acknowledgement of either this issue or the PR since they were raised?

We're currently having to patch pkgsrc with https://github.com/NetBSD/pkgsrc/blob/trunk/meta-pkgs/boost/patches/patch-boost_asio_detail_dev__poll__reactor.hpp as I'm sure other illumos distributions are too, and it would be nice if this fix could be integrated into the next boost release so we aren't having to maintain patches.

grobian commented 1 year ago

I see, sorry for the noise!