id summary reporter owner description type status milestone component version severity resolution keywords cc 11070 async_connect never calls back on mac with -fvisibility=hidden blastrock chris_kohlhoff "See the attached file for a minimal code to reproduce. I have tested this on mac os yosemite with ""Apple LLVM version 6.0 (clang-600.0.56) (based on LLVM 3.5svn)"". To test: {{{ mkdir build cd build cmake .. make ./main }}} Result: The program never returns Expected: The program finishes (possibly with a ""connection refused"" error) What I do is to create a socket in the main binary (without using it) and do an async_connect in a library with hidden symbols. This code works if I comment the -fvisibility=hidden line in the CMakeLists.txt or if I comment the socket creation in main(). This seems to be related to boost::asio::detail::service_registry::keys_match which compares service types. It relies on typeinfo to do that (unless BOOST_ASIO_NO_TYPEID is set). For that to work, typeid_wrapper is forced to default visibility (see #pragma at boost/asio/detail/service_registry.hpp:32), but in recent mac os versions it seems that it is not enough anymore. It seems that a symbol Foo is exported if and only if Foo AND T are set to default visibility. So, in this case, we have two typeinfos for the same type typeid_wrapper> and they are not merged at dynamic linking because the symbols are hidden. One possible fix is to set default visibility to stream_socket_service and ip::tcp. This makes my example work, but it should be needed also for other services and protocols as well. I have made a patch for for this, but I don't know if this is the right way to fix it." Bugs new To Be Determined asio Boost 1.55.0 Problem