On 06/11/10 06:34 PM, Matthew Gwynne wrote:
Thanks for the response! We'll try to disable it for now, and
investigate some of the other things mentioned in this thread.

The problem we have is that we need to provide something like CC/CXX
flags, as the only compiler we can guarantee is the one which we
install, which is installed in a specific location, not globally. Is
there some way we can do something similar to this in Sage? You said
that CC/CXX do not work very well, why is this :(?

Thanks!

Matthew

CC, CXX, CFLAGS and similar should be considered broken. If CC is undefined, Sage environment script sets CC to "gcc". If CXX is not defined, Sage environment script sets CXX to "g++", That seems logical.

However, if CC is defined, the Sage environment script does not change it. Again this seems logical.

When the individual components of Sage are built, some well behaved packages respect these, and use the respective compiles. A large number do not, and use "gcc" or "g++"

So if you set

$ CC=/path/to/my/favorite/gcc

some programs will use the first "gcc" in the path and others will use /path/to/my/favorite/gcc. It is hit-and-miss

Over the course of time, I've filed loads of bug reports for these, and fixed some of them. The easiest way to find them, is to install the Sun compiler, then let type make, and detect what packages build with gcc. Many do unfortunately.

These are all outstanding.

http://trac.sagemath.org/sage_trac/ticket/7071
http://trac.sagemath.org/sage_trac/ticket/7069
http://trac.sagemath.org/sage_trac/ticket/7066
http://trac.sagemath.org/sage_trac/ticket/7027
http://trac.sagemath.org/sage_trac/ticket/7024

I've fixed a few

http://trac.sagemath.org/sage_trac/ticket/7036
http://trac.sagemath.org/sage_trac/ticket/7032

but there are many more. Fixing them is not always easy.


Your best course of action is to make sure your path is set correctly and perhaps LD_LIBRARY_PATH are set correctly to find the right compiler, so when you type just "gcc" you get a workable compiler.

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