On Tue, Jan 11, 2011 at 09:28:36PM -0800, Alan Irwin wrote:
> 
> This commit finishes what I planned to do for Octave, and I am glad to
> say that Andrew has already started making some improvements (i.e.,
> handling NULL arguments) to my work.
> 
> Here are some known remaining Octave issues which I am leaving to
> Andrew when his time constraints permit some work on these issues.
> 
> 2. Get gcc -fvisibility=hidden option to work.

Well I'd entirely forgotten about this until I tried using it with the 
Debian packages. A short rummage around in the header files shows that
swig defines the function plplot_octave in plplot_octaveOCTAVE_wrap.cxx
using the macro DEFUN_DLD, which when you follow it through includes
the octave export macro OCTAVE_EXPORT. Unfortunately this only 
supports the requirements of Windows DLLs and not the gcc visibility, 
at least in octave-3.2.  

1) It would be trivial to patch the octave header 
/usr/include/octave/oct-dlldefs.h similarly to what we do in pldll.h, 
but this is an octave bug. 

2) Alternatively swig could work around this by prepending SWIG_EXPORT 
(which is defined correctly) before DEFUN_DLD, but only for the gcc 
case. This is a bit of a temporary hack.

3) A further alternative is that we modify the swig generated source
code to do 2) ourselves.

For now, for Debian, I've just disabled -fvisibility=hidden for C++ 
compilers which does the trick, but loses some of the benefits.

Andrew

------------------------------------------------------------------------------
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to