#7849: MPRI issue with Sun Studio and --enable-cxx
--------------------------------------------------------------+-------------
   Reporter:  drkirkby                                        |       Owner:  
drkirkby  
       Type:  defect                                          |      Status:  
new       
   Priority:  major                                           |   Milestone:  
sage-4.3.1
  Component:  porting                                         |    Keywords:    
        
Work_issues:                                                  |      Author:    
        
   Upstream:  Reported upstream. Developers acknowledge bug.  |    Reviewer:    
        
     Merged:                                                  |  
--------------------------------------------------------------+-------------
 Sun's recent compilers for Solaris (and I assume Linux too), ship with two
 standard C++ libraries:

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

  * libCstd for backward compatibility with the old C+++ standard
  * libstlport for almost 100% compatibility with the latest C++ standard.
 (If Wikipedia is to be believe, there is no C++ compiler in existence
 which is 100% compatible).

 PolyBoRi will not build without the newer library. Since libraries can't
 be mixed and backward compatibility to a library released before Sage was
 released is not important. It therefore makes sensce to use the latest
 library on Solaris. That means adding the option

 {{{
 -library=stlport4.
 }}}

 to CXXFLAGS.

 Something like the following show allow a 64-bit build of Sage (though
 many bits do not work yet).

 {{{
 $ export CC=/opt/sunstudio12.1/bin/cc
 $ export CXX=/opt/sunstudio12.1/bin/CC
 $ export CFLAGS=-m64
 $ export CXXFLAGS=-m64
 $ export ABI=64
 $ configure --enable-cxx
 $ make
 $ make check
 }}}

 MPIR is one such package. Bill Hart suggested a fix:

 -----
 Try #including stddef.h and stdarg.h in gmp-h.in.

 Probably that won't be the end of the problems....

 Bill Hart
 -----
 I will simply added this temporary fix to the stop of the file. It did fix
 the problem. but Bill notes it needs more extensive testing on other
 platforms.

 I'll probably add a patch in Sage, which only includes the fix for the Sun
 Studio compilers. There's nothing in that web page from Sun to indicate
 the problem is specific to Solaris (Sun also ships Sun Studio for Linux),
 so I'll '''not''' make it Solaris specific, but only Sun Studio specific.
 That's easy using the script

 {{{
 $SAGE_LOCAL/bin/testcxx.sh
 }}}

 Dave

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