#6595: 'modified sage library code' fails at c_lib if /opt/SUNWspro/bin/CC can 
be
found. (SCons issue)
------------------------+---------------------------------------------------
   Reporter:  drkirkby  |       Owner:  tbd                     
       Type:  defect    |      Status:  needs_review            
   Priority:  blocker   |   Milestone:  sage-4.3                
  Component:  solaris   |    Keywords:  scons SUNWspro SunStudio
Work_issues:            |      Author:                          
   Upstream:  N/A       |    Reviewer:                          
     Merged:            |  
------------------------+---------------------------------------------------

Comment(by drkirkby):

 Great you have found those problems. The Sun compiler is quite fussy,
 which annoys some, but does show up bugs that other compilers ignore.

 However, building the Sage library with 'CC' will '''not''' produce a
 workable Sage, as the Sun and GNU C++ compilers use different name
 mangling. We must get this to build with g++. Hence hte library it must be
 made to respect CC and CXX.

 I've had some feedback from the SCons mailing list. It's 2:02 AM here, so
 I'm not going to implement any of these now, but hopefully later I'll look
 at resolving the issues. It would appear that SCons ignores CC and CXX,
 but there are things we can do. Some code snippets posted by two or three
 different people include the following.

 -----
 Hi David,

 I believe your problem is the line:
 {{{
 env = Environment(ENV = os.environ)
 }}}
 which imports wholesale everything from the shell environment. Try
 removing this and your cxx=g++ override should work.
 -------------
 Your best technique is just to specify the GNU toolchain when setting
 up the Environment:
 {{{
 tools=['gcc','g++','gnulink',WhateverElseYouNeed).
 }}}

 That's portable across all platforms now, and will be into the future.

 -----------

 Or the toolchain you pass to the Environment when you set it up:
 {{{
      if os.environ['CC'].contains('gcc'):
          toolchain = ['gcc', 'g++', 'gnulink']
      else:
          toolchain = ['suncc', 'sunc++', 'sunlink']
      env = Environment(tools = [toolchain, 'other', 'tools'])
 }}}
 --------

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/6595#comment:11>
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.


Reply via email to