#7653: Ensure that C++ libraries linked are ISO standard with commerical 
compilers
------------------------+---------------------------------------------------
   Reporter:  drkirkby  |       Owner:  GeorgSWeber
       Type:  defect    |      Status:  new        
   Priority:  major     |   Milestone:             
  Component:  build     |    Keywords:             
Work_issues:            |      Author:             
   Upstream:  N/A       |    Reviewer:             
     Merged:            |  
------------------------+---------------------------------------------------
 Several C++ compilers from commercial vendors (Sun and HP being two
 examples I am aware of), created C++ libraries based on an older version
 of the C++ standard. This is incompatible with the current standard, so
 both HP and Sun ship two libraries - one for backward compatibility, the
 other which implements the last ISO standard, but at the expense of
 backward compatibility.

 In contrast, g++ only uses on library.

 Sun take their usual attitude of ensuring Solaris is backward compatible,
 so by default their C++ compiler uses a library which does not conform to
 the latest C++ standard. Alexander Dreyer has found that the magic switch
 to get Sun Studio to use the latest C++ library is

 {{{
 -library=stlport4
 }}}

 Further details can be found on the Sun web site at

 http://developers.sun.com/solaris/articles/cmp_stlport_libCstd.html

 Looking at the HP C++ compiler for HP-UX, I see that it too has two C++
 libraries - one for backward compatibility, one for latest C++
 conformance.

 http://docs.hp.com/en/14487/faq.htm

 Like the Sun compiler, the HP compiler defaults to an older C++ library
 standard. The option to enable the latest standard is

 {{{
 -AA
 }}}

 In both cases, the same library must be used for all objects - you can't
 mix them.

 Hence at some point, all code in Sage that uses C++ must have the
 appropriate option to C++ compiler to use the latest libraries, if it is
 to be built with Sun Studio or any other compiler which ships with two
 libraries.

 I would invisage creating individual trac tickets for each package which
 uses C++. The sensible option it to add this flag to a CXXFLAGS and hope
 all packages respect CXXFLAGS. In practice, this will not happen, so many
 will require changes to ensure they do respect flags from a global CXX
 flags.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/7653>
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