Subject: [boost] [config] really, really sticky issue with BOOST_SYMBOL_IMPORT
From: Robert Ramey (ramey_at_[hidden])
Date: 2018-10-10 04:37:44
For many, many years we've built the Boost serialization library with
the macros for BOOST_SYMBOL_IMPORT and BOOST_SYMBOL_EXPORT set according
to the instructions included in the boost/config documentation written
by John Maddock. These set attributes for creating and using DLLS for
windows and (used to) resolve to nothing on other systems. So far so good.
At some point things changed for gcc compilers. Now it seems that
BOOST_SYMBOL_IMPORT resolves to nothing and BOOST_SYMBOL_EXPORT resolves
to : __attribute__ ((visibility("default"))) and BOOST_SYMBOL_IMPORT
still resolves to nothing. OK - this has never been a problem.
Now we have an extremely subtle issue which appears on linux systems
with gcc. It's related to sequence of shared library loading and
unloading. It shows up as a bunch of test failures for the test named
test_exported_dll. A very astute user has determined that this can be
"fixed" by defining BOOST_SYMBOL_IMPORT as __attribute__
((visibility("default"))) as well. Question. should config/gcc be
updated in this way? Also is it possible that this "fix" is just a
fluke unrelated to the real source of the problem?
Note that this issue predates the recent change to make
-visibility=default which has, as one might expect, caused some issues.
I believe that this situation is unrelated.
Any help appreciated
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk