#11107: bzip2 only considers the SAGE64 environment variable on Solaris and OS
X.
------------------------+---------------------------------------------------
Reporter: drkirkby | Owner: GeorgSWeber
Type: defect | Status: new
Priority: major | Milestone: sage-4.7
Component: build | Keywords:
Author: | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
------------------------+---------------------------------------------------
I discovered this after trying to debug a Linux installation.
The bzip2 package (in particular the file
{{{$SAGE_ROOT/spkg/base/bzip2-1.0.5-install}}}) handles SAGE64 in a
different way to the vast majority (if not all) other packages. It has:
{{{
if [ `uname` = "Darwin" -a "$SAGE64" = "yes" ]; then
echo "Building 64 bit OSX release"
CFLAGS="-O2 -g -m64 " && export CFLAGS
fi
if [ `uname` = "SunOS" -a "$SAGE64" = "yes" ]; then
echo "Building 64 bit Solaris release"
CFLAGS="-O2 -g -m64 " && export CFLAGS
fi
}}}
Faster, more flexible and more portable would be:
{{{
if [ "x$CFLAG64" = x ] ; then
CFLAG64=-m64
fi
if [ "x$SAGE64" = xyes ]; then
echo "Building a 64 bit version of bzip2"
CFLAGS="-O2 -g $CFLAG64 $CFLAGS"
export CFLAGS
fi
}}}
This would
* Work on any platform, which might be useful on some like AIX
* Could help debug some Linux issues if Linux is building 32-bit. (I
found this useful to help someone on sage-support)
* Avoids two calls to {{{uname}}}
* Allows any flag to be used for building 64-bit executable, not just the
one use by Sun/Oracle compilers and GCC. Commerical compilers for both AIX
and HP-UX use different flags.
* Would allow any flags set by the user in CFLAGS to override those here.
However, currently setting CFLAGS globally in Sage can not be considered a
good idea, but that's a more general bug and well outside the scope of
this ticket.
Dave
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11107>
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.