Boost logo

Boost-Build :

From: Mat Marcus (mat-lists_at_[hidden])
Date: 2005-08-18 13:20:56


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

It appears that on some platforms, the boost build system is not aware
of the necessary compiler flags that must be set when using shared
libraries. In my experience, under gcc 4.0 if one doesn't effectively
make *all* symbols visible via -fvisibility=default, for both the
dynamic libraries and the executable that uses them, then compiler
generated RTTI information will *not* be shared. I believe that
- -fvisibility=default for dynamic libraries is the default setting but
when an executable is being built it seems that -fvisibility=hidden is
the default.

<complaint>
The fact that in order to safely use C++ with dynamic libraries on this
platform one must effectively make all symbols visible is an unpleasant
state of affairs with a number of ramifications. But this is a topic
for another list.
</complaint>

We are fortunate that in one of the boost::signals test executables,
this leads to a repeatable crash (boost_any_bridge fails to detect that
two types are the same (because of an erroneous type info comparison).
It is much worse in some other situations. I have seen silent failures
(such as the "type" of a standard exception being changed between where
it is thrown and where it is caught).

I have tested this crash and fix (by manually recompiling the
executable with all symbols visible) on the darwin gcc 4.0 platform
using boost build v2. I just noticed the boost bug report #1262038

<http://sourceforge.net/tracker/?func=detail&atid=107586&aid=1262038&group_id=7586>

with the exact same stack crawl, so I believe it is a more general
phenomenon. Can anyone suggest patches to the build system to support
the safe use of shared libs with gcc 4.0?

Thanks,
Mat

-----BEGIN PGP SIGNATURE-----
Version: PGP Desktop 9.0.2 (Build 2424)

iQA/AwUBQwTRixIZBaoznf65EQI3aACfXHYAI5bLL1buAaNqpjsQcGkgJI8AoLQx
O5LGuDL1ujZdPIx5AvOvdO3B
=HhtX
-----END PGP SIGNATURE-----

 


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk