On 06/14/10 06:39 PM, William Stein wrote:
On Mon, Jun 14, 2010 at 9:11 AM, Dr. David Kirkby
<david.kir...@onetel.net> wrote:
On 06/14/10 04:28 PM, William Stein wrote:
On Mon, Jun 14, 2010 at 3:49 AM, Dr. David Kirkby
Hence I'd propose that any attempt to set CC, CXX, FC, or F77 caused the
build to exit with a warning. Then allow an environment variable like
SAGE_ALLOW_SETTING_OF_COMPILERS
(better name?)
that will allow someone to do this, if they really want to.
The same is true really of CP, CHMOD and several other variables. They work
in some parts of Sage, and not in others.
Dave
Another possibility might be that if the Sage build system starts and
the environment variable
CC is defined, then a command "gcc" that runs whatever is specified in
CC is created and
put first in the path. Then:
(1) any build scripts that still annoying look for gcc will instead
find this fake gcc wrapper and use it, hence calling CC.
(2) We can also make it so this fake gcc wrapper logs whenever it
is called, and hence easily nail down which packages are offendors.
The same can be done with all the other variables you mentioned.
-- William
I don't like the fake gcc idea myself. Currently when the fake gcc is run,
it obscures what flags are being passed to the compiler - the same with the
sage_fortran.
We already have one fake gcc, so then we need another one which logs data.
I'm unaware of this current fake gcc.
Where is it? Who added it? What does it do?
Numpy's spkg-install has this.
# numpy's distutils is buggy and runs a conftest without
# taking CFLAGS into account. With 64 bit OSX this results
# in *boom*
if [ `uname` = "Darwin" -a "$SAGE64" = "yes" ]; then
echo "64 bit MacIntel: copying fake gcc"
rm $SAGE_LOCAL/bin/gcc
cp gcc_fake $SAGE_LOCAL/bin/gcc
chmod 755 $SAGE_LOCAL/bin/gcc
fi
I'm not sure what creates the fake_gcc in the first place though.
That's not working on OpenSolaris. Jaap has tried to modify it, but the mod does
not work for me - see
http://trac.sagemath.org/sage_trac/ticket/8086
Thanks for letting me know about it.
Sorry I can't be more helpful. I don't know what actually creates this.
Personally I don't like fake files like this. As I indicate in that trac ticket,
it caused me to reboot my machine!
It's clear you won't implement a fake gcc/g++, etc. that would make it
much easier to track down the problems with components calling GCC
when they don't, so I won't try to convince you that this is the best
thing to do.
OK, we will agree to differ. I can't see what harm issuing a warning does -
especially for novice users.
In contrast, deepening on your point of view, logging data with fake files can
be either a blessing or a nuisance.
I think in the short term, the main benefit would be to stop users setting these
variables. Getting Sage to build with a non-GNU compiler is not going to be
easy, and certainly wont be done in the short term. Getting it to build with gcc
on OpenSolaris, FreeBSD and Cygwin seems to present more than its fair share of
problems.
-- William
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