On Jul 13, 2010, at 12:21 AM, Alan W. Irwin wrote:

> On 2010-07-12 19:44-0700 Jerry wrote:
>
>> I'm beginning to have second thoughts about whether this  
>> HAVE_ADA_2007
>> business is worth the trouble. If the flag is not set, the Ada
>> bindings still work fine if the compiler is Ada 95 or Ada 2005. None
>> of the lapack and blas stuff is actually used--only two lines of
>> declarations are used from the Ada modules and these are already
>> inserted into the bindings if the flag is not set. I think maybe
>> requiring the linking of these large libraries is a bad idea and that
>> I over-engineered the bindings just to get the two declarations in  
>> the
>> case of 2005.
>>
>> How much work would it be to just remove this flag?
>
> I think very little effort would be required to remove HAVE_ADA_2007
> from the build system.  However, let's wait to do anything about this
> until we understand the linking issue that Orion reported a lot more.
> I still think the linking issue may be completely orthogonal to
> HAVE_ADA_2007.  You imply above, that lapack/blas are not used by
> HAVE_ADA_2007 so it appears to me that Orion's discovery of a
> lapack/blas linking issue must be completely independent of
> HAVE_ADA_2007.
>
> Alan
> __________________________
> Alan W. Irwin
>
No. Orion's result which he reports in the next e-mail is correct and  
expected.

If the HAVE_ADA_2007 flag is set then something in the build process,  
probably cmake, modifies some Ada files by inserting this declaration:

with Ada.Numerics.Long_Real_Arrays;

This is somewhat analogous to an include statement in C. Once  
Ada.Numerics.Long_Real_Arrays is with-ed, the compiler knows that it  
is supposed to link blas and lapack because a primary function of that  
package is to provide some quasi-advanced numerics such as finding  
eigenvectors/eigenvalues and solving Ax=b, etc. (Yes, this is really  
an official part of Ada now.)

PLplot of course needs none of this numeric capability; the only thing  
that I used from the Ada.Numerics.Long_Real_Arrays package are a  
couple of convenient (and now standardized) declarations for vectors  
and matrices which of course are just one- and two-dimensional arrays  
of double floats of indeterminate sizes. (It occurs to me that this  
type of discussion might require a knowledge of Ada namespaces which  
might be different from C namespaces, if C actually has such a  
concept--that's beyond my C knowledge.)

If the flag is not set, then cmake mucks with some of the Ada files to  
insert equivalent vector and matrix declarations but does not insert  
the reference to Ada.Numerics.Long_Real_Arrays; thus the compiler has  
no need to link lapack and blas.

Hope that makes sense.

Jerry


> 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); PLplot scientific plotting  
> software
> package (plplot.org); 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
> __________________________
>


------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to