Boost logo

Boost :

Subject: Re: [boost] support for gcc hidden visibility in shared libraries
From: Stjepan Rajko (stjepan.rajko_at_[hidden])
Date: 2008-12-05 08:56:51

On Fri, Dec 5, 2008 at 5:23 AM, Alexander Arhipenko <arhipjan_at_[hidden]> wrote:
> On Thu, Dec 4, 2008 at 10:39 PM, Stjepan Rajko <stjepan.rajko_at_[hidden]> wrote:
>> Many (almost all?) linked boost libraries don't work as shared
>> libraries when compiled with the -fvisibility=hidden switch on gcc
>> version>=4. I am wondering whether there is interest in making them
>> work under these circumstances, as it might not be too hard to do, and
>> there seems to be some benefit to it.
>> [snip]
> Hi, Stjepan.
> There was thread on this topic some time ago, see:

Ah, cool.

> I had even booked trac ticket and attached a patch (that provide gcc
> visibility facilities )
> to it, see:

The ticket has no owner - perhaps that is the problem? To quote David
Abrahams from the thread above:

On Fri, Jul 11, 2008 at 5:11 PM, David Abrahams <dave <at>> wrote:
> patches tend to be more impactful when attached to Trac
> tickets: ;-)

Perhaps Dave would like to take over the patch and make his statement
tend to be more true? ;-)

> I would really love to see such functionality in boost, but it was silence from
> the moment of ticket creation (~5 months ago) so I've became silent too ;).

Me too. That ticket would have saved me 5 months of being baffled as
to why shared boost libraries don't work on one of my systems.

> Regards
> P.S. Comments on patch will be really appreciated

I think it's great, and I appreciate the extra bold step of actually
changing the compilation of affected libraries to build with hidden
visibility (had I made the patch, which I probably never would have
gotten to, I would have stopped short of that because of being afraid
of breaking something, but you probably know a lot more about all this
than me). Three comments:
* the darwin toolset is affected the same way as gcc
* will the added -fvisibility=hidden cause a problem with gcc<4?
* I would prefer the slightly more descriptive macro names discussed
in the thread (I think BOOST_SYMBOL_EXPORT is my favorite)



Boost list run by bdawes at, gregod at, cpdaniel at, john at