#9508: ATLAS is not building shared libraries properly on Solaris 10 and
OpenSolaris
------------------------+---------------------------------------------------
Reporter: drkirkby | Owner: drkirkby
Type: defect | Status: new
Priority: major | Milestone: sage-4.5.1
Component: solaris | Keywords:
Author: | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
------------------------+---------------------------------------------------
The ATLAS package in Sage (atlas-3.8.3.p12 in sage 4.5.rc1) has a problem
in the way shared libraries are built and installed.
* libatlas and libcblas never get built as shared libraries on Solaris or
!OpenSolaris, despite they do get built on Linux, OS X and FreeBSD.
* liblapack gets built, but later gets removed by the following few
lines of code in the script {{{make_correct_shared.sh}}}, which was
probably added in #5024.
{{{
# on Solaris a dynamic liblapack.so leads to import errors in numpy, so
delete them for now.
if [ `uname` = "SunOS" ]; then
echo "Deleting liblapack.so on Solaris due to bug in numpy/scipy"
cd "$SAGE_LOCAL"/lib
rm -rf liblapack.so*
fi
}}}
* On 64-bit builds of Sage, Linbox reports ATLAS is not installed - see
#9101. Closer inspection of Linbox's config.log shows that linbox
determines the ATLAS libraries are 32-bit, not 64-bit. Since it finds no
64-bit libraries, it considers ATLAS is not installed.
I suspect the reasons the shared libraries are not currently built in Sage
is that they were originally built incorrectly, so rather than fix the
problem, they were just deleted. I'm aware Michael Abshoff was using the
GNU linker, despite this has never had a good reputation on Solaris, and
even the GCC documentation advises using the Sun linker. Hence I think we
should
* Build the shared libraries properly, using the Sun linker
{{{/usr/ccs/bin/ld}}}
* Consider deleting the static libraries. I don't think they would
perform any useful function if the shared libraries existed.
This will have several advantages.
* Shared libraries are much smaller than static libraries.
* Shared libraries take up far less memory when th
* Linbox will hopefully not report ATLAS is not installed.
The following command will build a a 32-bit or 64-bit shared library
liblapack.so, although it could easily be extended to other libraries too.
{{{
if [ "x$SAGE64" = xyes ] ; then
# To create a 64-bit shared library, the linker flag
# '-64' must be added. Note this is not the same as
# the compiler flag '-m64'
LINKER_BITS=-64
else
LINKER_BITS=-32
fi
# Build liblapack.so
lapack_command="/usr/ccs/bin/ld $LINKER_BITS -L"$SAGE_LOCAL/lib" -G -h
liblapack.so -o liblapack.so -zallextract liblapack.a -zdefaultextract -
lc -lm -lgfortran"
$lapack_command
}}}
This will need some testing, but at least this will all be specific to
Solaris or !OpenSolaris, so will not cause any problems on other
platforms.
Dave
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9508>
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.