On Nov 20, 5:32 pm, "Dr. David Kirkby" <david.kir...@onetel.net>
wrote:
> On 11/20/10 10:36 PM, John H Palmieri wrote:
>
> > Summarizing, my questions are:
>
> >   - is SAGE64 supposed to have an effect on platforms other than OS X
> > and Solaris?  (I think so.)
>
> I would say yes.
>
> In practice it is only currently used on OS X and Solaris, but looking 
> forward,
> it could be used on AIX, HP-UX and perhaps even Linux systems on mobile 
> phones.

Is that the compiler flag "-m64" has no effect on other systems?  Some
spkg-install files just check whether SAGE64 is set, not the platform,
and then they add -m64 to the flags.  So if that does anything on
linux, then SAGE64 can be used on linux.

> It's important that the check is made regularly, as someone could start 
> building
> with SAGE64=yes, then upgrade, or what I've done before, open another terminal
> and not set SAGE64=yes. If the check did not exist, this would lead to a mix 
> of
> 32-bit and 64-bit objects.

Right.

> It would actually be good if the file was always created but had "yes" or "no"
> in it. Then it could prevent
>
> 1) Initial 64-bit builds getting corrupted with 32-bit components.
>
> 2) Initial 32-bit builds getting corrupted with 64-bit components
>
> Currently the file only protects against (1).

On the other hand, if I have a 32-bit install and I want to test
building an spkg in both 32-bit mode and 64-bit mode, I would like to
be able to do

  $ sage -f new.spkg
  ...
  $ do some testing
  $ export SAGE64='yes'
  $ sage -f new.spkg
  ...

for example, just to see if the compiler flags are set correctly.  I
shouldn't need separate 32-bit and 64-bit builds just for a simple
check like that.  And if the spkg is just supposed to produce some
binary executables which don't rely on any libraries in SAGE_LOCAL,
then I should be able to completely test the spkg this way. But once I
set SAGE64=yes on OS X or Solaris, then unless I manually delete the
file sage-64.txt, it will forever think it's a 64-bit build.  I think
I should be able to do

  $ export SAGE64='no'

and then Sage should *delete* the file sage-64.txt if it's present.

Another option to prevent (2) could be done in sage-check-64: if
SAGE64='yes' but the sage-64.txt does not exist (along with some other
check to make sure the Sage build is not just starting), or if
SAGE64='no' and the sage-64.txt does exist, ask if you really want to
continue.  That is, the presence of absence of the file would be
equivalent to your idea of having the file contain "yes" or "no".
Having a query would allow my desired behavior also.

--
John

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to