[C++-sig] Boost.Python visibility fix for GCC 4.0

Allen Bierbaum allenb at vrsource.org
Tue Aug 23 23:35:59 CEST 2005


It looks like the current version of Boost.Python has a small bug when 
using the visibility options of gcc 4.0 (i.e. -fvisibility=hidden).  I 
have attached a patch that will fix the problem.  It looks like when the 
code was originally added to test for the GCC version it didn't take 
into account non 3.x version numbers.  This patch should take care of that.

Note: This bug rears its head by hiding the extern C initmodule() when 
you compile a Boost.Python module with "-fvisibility=hidden".  Thus the 
module fails to import into python because the symbol is not found.

Hopefully this should fix things up for everyone.

-Allen

-------------- next part --------------
A non-text attachment was scrubbed...
Name: gcc4_visibility.patch
Type: text/x-patch
Size: 1722 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20050823/0e39c51e/attachment.bin>


More information about the Cplusplus-sig mailing list