Boost C++ Libraries: Ticket #4883: epoll_reactor.hpp doesn`t compile with some versions of gcc https://svn.boost.org/trac10/ticket/4883 <p> epoll_reactor.hpp doesn`t compile with some old versions of gcc. Actually I have 4.0.2. I have applied small patch that resolves problem. </p> <p> Here is example of compilation error. </p> <ul><li>Compile discovery_layer.cxx [class: dll] ... </li></ul><p> /usr/bin/g++ -MT /home/esuitebuild/AV-Desk-REL-600-AV_201011220/0bld-generic-gcc/drwcs/io/discovery_layer.odll -MD -MP -MF /home/esuitebuild/AV-Desk-REL-600-AV_201011220/0bld-generic-gcc/d\ rwcs/io/discovery_layer.odll.dep -fPIC -DPIC -DNDEBUG -pipe -c -march=pentiumpro -Wall -W -Wredundant-decls -pthread -pedantic -Wno-long-long -D_REENTRANT -D_THREAD_SAFE -D_LARGEFILE64_S\ OURCE -o /home/esuitebuild/AV-Desk-REL-600-AV_201011220/0bld-generic-gcc/drwcs/io/discovery_layer.odll discovery_layer.cxx -O3 -s -I"/home/esuitebuild/AV-Desk-REL-600-AV_201011220/drwcs" \ -isystem"/home/esuitebuild/boost_1_45_0" -I"/home/esuitebuild/AV-Desk-REL-600-AV_201011220/ES-Key" -I"/home/esuitebuild/AV-Desk-REL-600-AV_201011220/0ins-generic-gcc/include" -I"/home/esui\ tebuild/AV-Desk-REL-600-AV_201011220/zlib" -I/usr/local/include -DSYSTEM=\"Linux\" -DARCH=\"x86\" -DUSE_THREADS -D<span class="underline">BUILD_DRWCC</span> -DBOOST_ALL_NO_LIB -DSTATIC=static /home/esuitebuild/boost_1_45_0/boost/asio/detail/impl/epoll_reactor.ipp: In member function 'void boost::asio::detail::epoll_reactor::start_op(int, boost::asio::detail::socket_type, boost:\ :asio::detail::epoll_reactor::descriptor_state*&amp;, boost::asio::detail::reactor_op*, bool)': /home/esuitebuild/boost_1_45_0/boost/asio/detail/impl/epoll_reactor.ipp:140: error: 'boost::asio::detail::epoll_reactor::&lt;anonymous enum&gt;' is/uses anonymous type /home/esuitebuild/boost_1_45_0/boost/asio/detail/impl/epoll_reactor.ipp:140: error: trying to instantiate 'template&lt;class T&gt; struct boost::is_integral' {standard input}: Assembler messages: {standard input}:1788: Error: Local symbol <code>.LTHUNK0' can't be equated to undefined symbol </code>_ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_21thread_resource_errorEEEE\ D0Ev' {standard input}:1788: Error: Local symbol <code>.LTHUNK1' can't be equated to undefined symbol </code>_ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_21thread_resource_errorEEEE\ D0Ev' {standard input}:1788: Error: Local symbol <code>.LTHUNK2' can't be equated to undefined symbol </code>_ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_21thread_resource_errorEEEE\ D1Ev' {standard input}:1788: Error: Local symbol <code>.LTHUNK3' can't be equated to undefined symbol </code>_ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_21thread_resource_errorEEEE\ D1Ev' {standard input}:1788: Error: Local symbol <code>.LTHUNK4' can't be equated to undefined symbol </code>_ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_6system12system_errorEEEED0\ </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/4883 Trac 1.4.3 anonymous Tue, 23 Nov 2010 14:39:59 GMT attachment set https://svn.boost.org/trac10/ticket/4883 https://svn.boost.org/trac10/ticket/4883 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">00-asio-anonymous-enum-fix.patch</span> </li> </ul> Ticket chris_kohlhoff Wed, 23 Feb 2011 01:06:36 GMT <link>https://svn.boost.org/trac10/ticket/4883#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4883#comment:1</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/69194" title="Changes for asio version 1.5.0: * Added support for timeouts on ...">[69194]</a>) Changes for asio version 1.5.0: </p> <ul><li>Added support for timeouts on socket iostreams, such as ip::tcp::iostream. A timeout is set by calling expires_at() or expires_from_now() to establish a deadline. Any socket operations which occur past the deadline will put the iostream into a bad state. </li></ul><ul><li>Added a new error() member function to socket iostreams, for retrieving the error code from the most recent system call. </li></ul><ul><li>Added a new basic_deadline_timer::cancel_one() function. This function lets you cancel a single waiting handler on a timer. Handlers are cancelled in FIFO order. </li></ul><ul><li>Added a new transfer_exactly() completion condition. This can be used to send or receive a specified number of bytes even if the total size of the buffer (or buffer sequence) is larger. </li></ul><ul><li>Added new free functions connect() and async_connect(). These operations try each endpoint in a list until the socket is successfully connected. </li></ul><ul><li>Extended the buffer_size() function so that it works for buffer sequences in addition to individual buffers. </li></ul><ul><li>Added a new buffer_copy() function that can be used to copy the raw bytes between individual buffers and buffer sequences. </li></ul><ul><li>Added new non-throwing overloads of read(), read_at(), write() and write_at() that do not require a completion condition. </li></ul><ul><li>Added friendlier compiler errors for when a completion handler does not meet the necessary type requirements. When C++0x is available (currently supported for g++ 4.5 or later, and MSVC 10), static_assert is also used to generate an informative error message. Checking may be disabled by defining BOOST_ASIO_DISABLE_HANDLER_TYPE_REQUIREMENTS. </li></ul><ul><li>Made the is_loopback(), is_unspecified() and is_multicast() functions consistently available across the ip::address, ip::address_v4 and ip::address_v6 classes. Refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3939" title="#3939: Feature Requests: Determination on wither ip::address is a multicast address (closed: fixed)">#3939</a>. </li></ul><ul><li>Added new non_blocking() functions for managing the non-blocking behaviour of a socket or descriptor. The io_control() commands named non_blocking_io are now deprecated in favour of these new functions. </li></ul><ul><li>Added new native_non_blocking() functions for managing the non-blocking mode of the underlying socket or descriptor. These functions are intended to allow the encapsulation of arbitrary non-blocking system calls as asynchronous operations, in a way that is transparent to the user of the socket object. The functions have no effect on the behaviour of the synchronous operations of the socket or descriptor. Refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3307" title="#3307: Bugs: Stream descriptor blocking state set on close (closed: fixed)">#3307</a>. </li></ul><ul><li>Added the io_control() member function for socket acceptors. Refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3297" title="#3297: Bugs: io_control not exposed on tcp::connector in asio (closed: fixed)">#3297</a>. </li></ul><ul><li>For consistency with the C++0x standard library, deprecated the native_type typedefs in favour of native_handle_type, and the native() member functions in favour of native_handle(). </li></ul><ul><li>Added a release() member function to posix descriptors. This function releases ownership of the underlying native descriptor to the caller. Refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3900" title="#3900: Feature Requests: Request for support of &#34;release&#34; member function or assign without ... (closed: fixed)">#3900</a>. </li></ul><ul><li>Added support for sequenced packet sockets (SOCK_SEQPACKET). </li></ul><ul><li>Added a new io_service::stopped() function that can be used to determine whether the io_service has stopped (i.e. a reset() call is needed prior to any further calls to run(), run_one(), poll() or poll_one()). </li></ul><ul><li>Reduced the copying of handler function objects. </li></ul><ul><li>Added support for C++0x move construction to further reduce copying of handler objects. Move support is enabled when compiling in -std=c++0x mode on g++ 4.5 or higher, or when using MSVC10. </li></ul><ul><li>Removed the dependency on OS-provided macros for the well-known IPv4 and IPv6 addresses. This should eliminate the annoying "missing braces around initializer" warnings. Refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3741" title="#3741: Bugs: asio::ip::address_v6.hpp: Missing braces around anonymous union (closed: fixed)">#3741</a>. </li></ul><ul><li>Reduced the size of ip::basic_endpoint&lt;&gt; objects (such as ip::tcp::endpoint and ip::udp::endpoint). </li></ul><ul><li>Changed the reactor backends to assume that any descriptors or sockets added using assign() may have been dup()-ed, and so require explicit deregistration from the reactor. Refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/4971" title="#4971: Bugs: stream_descriptor not remove descriptor from epoll_reactor (closed: fixed)">#4971</a>. </li></ul><ul><li>Changed the SSL error category to return error strings from the OpenSSL library. </li></ul><ul><li>Changed the separate compilation support such that, to use Asio's SSL capabilities, you should also include 'asio/ssl/impl/src.hpp in one source file in your program. </li></ul><ul><li>Removed the deprecated member functions named io_service(). The get_io_service() member functions should be used instead. </li></ul><ul><li>Removed the deprecated typedefs resolver_query and resolver_iterator from the ip::tcp, ip::udp and ip::icmp classes. </li></ul><ul><li>Fixed a compile error on some versions of g++ due to anonymous enums. Refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/4883" title="#4883: Patches: epoll_reactor.hpp doesn`t compile with some versions of gcc (closed: fixed)">#4883</a>. </li></ul><ul><li>Added an explicit cast to the FIONBIO constant to int to suppress a compiler warning on some platforms. Refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/5128" title="#5128: Bugs: Implicit constant overflow in non_blocking_io::name() (closed: fixed)">#5128</a>. </li></ul><ul><li>Fixed warnings reported by g++'s -Wshadow compiler option. Refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3905" title="#3905: Bugs: asio boost headers fail with g++-4.3.2 and -Wshadow -Werror (closed: fixed)">#3905</a>. </li></ul> </description> <category>Ticket</category> </item> <item> <dc:creator>chris_kohlhoff</dc:creator> <pubDate>Tue, 08 Mar 2011 11:07:15 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/4883#comment:2 https://svn.boost.org/trac10/ticket/4883#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/69680" title="Merge selected bug fixes from trunk: * Fixed a compile error on some ...">[69680]</a>) Merge selected bug fixes from trunk: </p> <ul><li>Fixed a compile error on some versions of g++ due to anonymous enums. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/4883" title="#4883: Patches: epoll_reactor.hpp doesn`t compile with some versions of gcc (closed: fixed)">#4883</a>. </li></ul><ul><li>Fixed a bug in asio::streambuf where the consume() function did not always update the internal buffer pointers correctly. The problem may occur when the asio::streambuf is filled with data using the standard C++ member functions such as sputn(). (Note: the problem does not manifest when the streambuf is populated by the Asio free functions read(), async_read(), read_until() or async_read_until().) </li></ul><ul><li>EV_ONESHOT seems to cause problems on some versions of Mac OS X, with the io_service destructor getting stuck inside the close() system call. Use EV_CLEAR instead. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/5021" title="#5021: Bugs: io_service destructor hangs on Mac OS X (closed: fixed)">#5021</a>. </li></ul><ul><li>Fixed a bug on kqueue-based platforms, where reactor read operations that return false from their perform() function are not correctly re-registered with kqueue. </li></ul><ul><li>Fixed the linger socket option on non-Windows platforms. </li></ul><ul><li>Fixed function name in comment for asio::placeholders::iterator. </li></ul> Ticket