On 2011-09-02 20:49+0100 Andrew Ross wrote:

> 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

So had I...  :-)

> 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.

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).

Alan

__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__________________________

Linux-powered Science
__________________________

------------------------------------------------------------------------------
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