Mark Watkins wrote:
> Regarding:
>  http://trac.sagemath.org/sage_trac/ticket/7066
> 
> SYMPOW used to do 'which cc' to find the compiler, but then there were
> complaints that this was not portable. So now Configure (my version) just
> has CC=cc. I'm not even quite sure what the SAGE build is actually doing,
> though a look at the distro has the following in Configure:
> 
> CC=`whichexe cc` && echo "CC = $CC" >> $FILE
> if [ -z "$CC" ]; then
>   echo "**ERROR**: Could not find cc"; exit 1;
> else
>   echo "CC = $CC"
> fi
> 
> I don't think I've heard of whichexe before (though maybe I've just 
> forgotten),
> so this is probably not made directly by me. The Configure that I put in
> SYMPOW was just a hack for a feeble attempt to get it to build on more than
> just my machine. I don't know if a "professional" solution (like automake,
> or whatever GNU has now) would be better or not.
> 
> ===
> Mark Watkins
> watk...@maths.usyd.edu.au
> 

Thank you Mark,

I'm copying this to the Sage developers list, so there is a record of it there. 
(I stripped the with HP-UX from the title, as this issue has nothing to do with 
HP-UX).

The ticket

http://trac.sagemath.org/sage_trac/ticket/7066

is just about the fact that sympow is always being built with gcc and ignores 
the setting of CC - at least on Solaris. (The other issue about the use of 
atoll, which is messing up on HP-UX is less important).

For the purposes of Sage, CC and CXX will always be defined to be valid 
compilers, so it will probably be simpler if I just strip out your "CC=cc" and 
strip any attempts to set CC to gcc in Sage. I note that someone re-wrote your 
configure script, as it has in it.

if [ `"$UNAME"` = "SunOS" ]; then
   echo "using gcc"
   CC='gcc'
else
   CC=`whichexe gcc`
fi

I do not see any reason we should need to do this. The Sage environment 
variable 
CC should be set to a compiler. By default it will be gcc, but this can be 
overridden. Clearly in this case, on Solaris, it is being forced to gcc.

Anyway, thank you for your insights.

I do not fully understand these issues with the assembly code. I think you or 
William might need to give me some advice on that. I'll use your latest source 
too. I'm not sure where to find that, but it should not take me long to do.

If you want, I could try to build a autoconf/automake build system for this. 
Not 
only would that solve the compiler issue, but I could also implement code which 
works around a missing atoll() which would allow it to be built on HP-UX too. 
Would you be interested in incorporating an autoconf/automake solution into 
your 
sources, or would you prefer to stick with your 'Configure' script?


I see in fpu.c you have:

void fpu_53bits()
{
#ifdef x86
#include <fpu_control.h>
fpu_control_t fpu_control=0x027f; _FPU_SETCW(fpu_control);
#endif
}

Is this supposed to work for any x86 system (Solaris, OpenSolaris, Linux, 
FreeBSD ... etc etc), or just for Linux? I just checked on my Solaris x86 
system, and see there is no fpu_control.h header file. I'm not sure whether x86 
would be defined on Solaris, but if so, this looks like it will break, which 
could explain why someone has forced the use of gcc on Solaris, though I 
suspect 
that is not the reason.

I've set the reply to address to include Sage-devel, myself and william. If you 
are not subscribed to that, then perhaps william will let the emails go there.

Dave


-- 
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