#9780: Check for static libraries libatlas.a, libcblas.a, libf77blas and
liblapack.a, so SAGE_ATLAS_LIB works
------------------------+---------------------------------------------------
   Reporter:  drkirkby  |       Owner:  drkirkby  
       Type:  defect    |      Status:  needs_info
   Priority:  major     |   Milestone:  sage-4.6  
  Component:  solaris   |    Keywords:            
     Author:            |    Upstream:  N/A       
   Reviewer:            |      Merged:            
Work_issues:            |  
------------------------+---------------------------------------------------
Changes (by drkirkby):

  * status:  needs_review => needs_info


Comment:

 Replying to [comment:16 jhpalmieri]:
 > I'm not worried about the deprecation messages, but what about
 {{{/bin/sh: readelf: not found}}}?  Is that important?

 I did notice that about {{{readelf}}}. It's basically non-portable code.
 No such command exists as part of the POSIX Unix standard. It appears to
 be part of the GNU binutils package.

 IMHO, the section:

 {{{
             s_gfortran = os.popen2('readelf -s '
 +ATLAS_LIB+'/lib/libf77blas.so | grep gfortran')[1].read()
             s_g95 = os.popen2('readelf -s ' + ATLAS_LIB +
 '/lib/libf77blas.so | grep g95')[1].read()

             if s_gfortran !='' and not fortran.startswith('gfortran'):
                 print "Symbols in lib77blas indicate it was build with
 gfortran \n"
                 print "However SAGE is using a different fortran compiler
 \n"
                 print "If you wish to use this blas library, make sure
 SAGE_FORTRAN points \n"
                 print "to a fortran compiler compatible with this library.
 \n"
                 sys.exit(2)

             if s_g95 !='' and not fortran.startswith('g95'):
                 print "Symbols in lib77blas indicate it was build with g95
 \n"
                 print "However SAGE is using a different fortran compiler
 \n"
                 print "If you wish to use this blas library, make sure
 SAGE_FORTRAN points \n"
                 print "to a fortran compiler compatible with this library.
 \n"
                 sys.exit(2)
 }}}

 is of '''extremely''' limited value. It is certainly non-portable and
 whilst there was a time when {{{g95}}} was popular and someone might have
 compiled ATLAS with it, those days are long since passed. William said
 some time ago we can remove the g95 binaries from the fortran package.

 In any case, it is testing on a shared library {{{libf77blas.so}}} which
 often fails to build for people on various Linux distributions. I think
 removing that whole section would save a few CPU cycles and a few bytes of
 download.

 The failure is harmless in that if {{{readelf}}} does not exist, it will
 never find the symbols this bit of code tests for, so both
 {{{s_gfortran}}} and {{{s_g95}}} remain empty.

 It is worth bearing in mind is that this ATLAS code is never installed on
 Cygwin or OS X. So this code will only ever be executed on Linux, Solaris
 and rarer Unix systems like HP-UX, AIX etc. Only Linux systems will
 probably have the {{{readelf}} command, though it could be installed on
 Solaris, AIX, HP-UX etc.

 There are several options, ranked in order of my preference.

  1. Remove that section of code above.
  2. Ignore it, since the error message is harmless.
  3. Test first if {{{readelf}}} exists.
  4. Make GNU binutils a perquisite for building Sage - i.e. add it as a
 standard package.


 Dave

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9780#comment:17>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to