#4000: Implement QQ['x'] via Flint ZZ['x'] + denominator
------------------------------+---------------------------------------------
 Reporter:  malb              |         Owner:  somebody                        
                          
     Type:  enhancement       |        Status:  needs_work                      
                          
 Priority:  blocker           |     Milestone:  sage-4.6                        
                          
Component:  basic arithmetic  |    Resolution:                                  
                          
 Keywords:                    |        Author:  Sebastian Pancratz, Martin 
Albrecht                       
 Upstream:  N/A               |      Reviewer:  John Cremona, Martin Albrecht, 
Alex Ghitza, Harald Schilly
   Merged:                    |   Work_issues:  Solaris build error, doctest 
error                        
------------------------------+---------------------------------------------

Comment(by leif):

 Replying to [comment:110 mpatel]:
 > [...]
 > Are there any objections to using
 {{{
 #!python
               extra_compile_args=["-std=c99"] + uname_specific('SunOS',
 [], ['-D_XPG6']),
 }}}
 > instead?

 I would really appreciate if this got fixed in a proper way, and not with
 yet another work-around.

 I.e., IMHO one should
  * '''drop the''' {{{language="c++"}}} (since it is in fact C code),
  * clean up - unfortunately lots of - Cython header files ({{{.pxi}}},
 {{{.pxd}}}) to not rather randomly include NTL[-related] wrappers /
 headers which trigger the need for C++. Some {{{.pyx}}} files then have to
 explicitly include these elsewhere omitted ones (but IIRC only
 {{{sage/algebras/quatalg/quaternion_algebra_element.pyx}}}).
  * Remove {{{"ntl"}}} and {{{"gmpxx"}}} from {{{libraries}}}.

 I've actually given up to complete the second step, since for some reason
 Cython insists to put both
 {{{
 #!C
 #include "ntl_wrap.h"
 }}}
 and
 {{{
 #!C
 #include "FLINT/NTL-interface.h"
 }}}
 into the generated {{{polynomial_rational_flint.c}}} (for me, line 168 and
 170).

 If I manually remove these two lines, the extension module gets properly
 built and apparently works.

 If we solve just the XPG6 issue (by getting around the bad Solaris
 headers), but keep the underlying cause, I'm pretty sure we'll revisit the
 same problem (needing to compile C code as if it was C++) soon.

 Perhaps one should ask the authors why they added {{{language="c++"}}}; I
 guess just because they ran into the real problem.

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