Boost C++ Libraries: Ticket #13308: Asio symbols are exported even when they should not https://svn.boost.org/trac10/ticket/13308 <p> Since the changeset 382804a4325b0e3b90d07f6563f5c6fd13a38052 (Use default visibility everywhere), the asio symbols are always exported on macOS even with visibility=hidden. I.e. contary what the changeset comment says. Not only it gives a bigger footprint (see ticket <a class="new ticket" href="https://svn.boost.org/trac10/ticket/12722" title="#12722: Bugs: asio visibility pragmas bloat .dynstr segment (new)">#12722</a>), but it also has functional impliciations on macOS: When multiple modules export the same symbol, the <strong>macOS</strong> somehow randomly determines which instance of the symbol will be used by which module that needs it. I.e. <strong>when modules A and B export the same symbol, and module A needs to call it, then it can happen that the module A actually calls the symbol exported from B. Weird things begin to happen not only when A and B were built with different versions of boost.</strong> In practice, we are hitting this issue with our <strong>plugins</strong> for Adobe Illustrator. Illustrator itself was built with boost of some (unknown) version which is probably different in different releases of Illustrator. Our plugins are built with boost 1.59, 1.61, 1.64 and we are getting almost identical issues with all of them: the macOS decides to link our plugins to the boost symbols exported by Adobe Illustrator although our plugins carry all the required functions. The symptoms are that our plugins hang because some boost functions are called inside our plugin and some inside Illustrator itself leading to inconstistent state, esp. when different boost versions are used. <strong>The solution here is to really hide the boost asio symbols when building with visibility=hidden</strong> which is the way we build our plugins. In the attachment you can find a solution for the issue: the symbol visibility of asio now really follows the default visibility. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/13308 Trac 1.4.3 Jan Patera <japa@…> Wed, 22 Nov 2017 09:37:12 GMT attachment set https://svn.boost.org/trac10/ticket/13308 https://svn.boost.org/trac10/ticket/13308 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">boost_asio_symbol_visibility.patch</span> </li> </ul> <p> Patch for proper handling visibility with gcc and clang </p> Ticket