#10303: clean up sage-check-64 and use of SAGE64
-----------------------------+----------------------------------------------
Reporter: jhpalmieri | Owner: GeorgSWeber
Type: defect | Status: needs_review
Priority: minor | Milestone: sage-4.6.1
Component: build | Keywords: 64
Author: John Palmieri | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
-----------------------------+----------------------------------------------
Comment(by leif):
Seems you really like negation... ;-) (perhaps because proofs by
contradiction are usually easier?)
Looks ok to me, though still a bit complicated.
Giving an (early) error if someone tries to build a 64-bit version on a
32-bit platform is IMHO less important, and there are still ticket numbers
available.
----
Regarding `uname`, unfortunately every OS implementor is free to let the
`uname()` system call return whatever he/she likes (i.e. almost prose, and
no official standards); I now recall Solaris returns e.g. "`i86pc`", not
"`i386`" or alike, and the `uname` command just returns what it gets from
that call.
For the purpose of Sage, the list of possible values shouldn't be that
long though, but I'm not aware of a compilation, and just testing `uname
-m` might not even be sufficient. A good resource are autotools sources
(i.e. `config.guess` and `configure` scripts); our Skynet machines wiki
page also contains entries for `uname -a` IIRC.
Another, safer way to detect if 64-bit builds are supported is to use
`getconf`, e.g.
{{{
#!sh
if [ `getconf _POSIX_V6_LP64_OFF64` -eq 1 ]; then
# 64-bit builds supported
echo "Max. unsigned long: `getconf -v POSIX_V6_LP64_OFF64
ULONG_MAX`"
# should give 2^64-1
fi
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10303#comment:10>
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.