On Sat, Sep 03, 2011 at 10:47:52PM +0100, Andrew Ross wrote:
> On Fri, Sep 02, 2011 at 09:56:57PM -0700, Alan Irwin wrote:
> > 
> > I was going to suggest you try preprocessing tricks, until I realized
> > that is probably what you meant by (1) rather than literal patching
> > with the patch programme.
> > 
> > Anyhow, it would be nice to get -fvisibility=hidden working again for
> > C++ upstream (and also for your Debian packages) so I suggest you
> > choose the easiest of the three alternatives to implement above as a
> > "temporary" workaround and also submit a bug report concerning their
> > header to octave so that you will be able to remove your temporary
> > workaround in the mid term (assuming we keep bumping
> > the minimum version of octave we support).
> 
> I've played around and it looks like the best thing to do is exactly
> the same trick I used to get the matwrapped octave bindings to work
> with -fvisibility=hidden, namely to put 
> 
> #if defined(__GNUC__) && __GNUC__ > 3
> #pragma GCC visibility push(default)
> #endif
> 
> before the function definition of plplot_octave - the line starting with
> DEFUN_DLD in the code
> 
> and then
> 
> #if defined(__GNUC__) && __GNUC__ > 3
> #pragma GCC visibility pop
> #endif
> 
> after the function definition. I've tested this and it works. This patch 
> would best be merged into swig until octave fixes visibility support,
> but in the meantime does anyone have an idea what the best way to 
> postprocess the swig generated code is in order to do this in plplot?

I've committed a perl script to do this. It would be nicer to do it in 
sed but I'm not sure how. The old octave bindings required perl anyway
so it is not an extra constraint. I have not yet modified CMakeFiles.txt
to actually call the script as I'm not sure how to do this neatly to
integrate with the cmake SWIG support. Alan, do you have any thoughts
on the best way to do this?

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