#11246: flint-1.5.0.p5's extraneous #includes break typedef ulong in sys/types.h
------------------------+---------------------------------------------------
   Reporter:  dimpase   |          Owner:  tbd         
       Type:  defect    |         Status:  needs_review
   Priority:  major     |      Milestone:  sage-4.7.1  
  Component:  packages  |       Keywords:              
Work_issues:            |       Upstream:  N/A         
   Reviewer:            |         Author:              
     Merged:            |   Dependencies:              
------------------------+---------------------------------------------------

Comment(by dimpase):

 Replying to [comment:2 wbhart]:

 >
 > Note that the flint-1.6 release notes say:
 >
 > * Better Cygwin support
 >
 > though I don't know if this particular issue is fixed or not. It may be
 only be an issue with more recent Cygwin than what I tested with.

 1.6 suffers from the same issue:

 {{{
 ...
 cc -std=c99 -I -I   -g -O2 -c ZmodF_mul.c -o ZmodF_mul.o
 In file included from /usr/include/stdio.h:46,
                  from ZmodF_poly.h:40,
                  from ZmodF_mul.c:34:
 /usr/include/sys/types.h:101: error: duplicate `unsigned'
 make: *** [ZmodF_mul.o] Error 1

 dima@SPMS-DIMA-W7 /tmp/flint-1.6
 }}}

 to get that far when compiling, I needed to remove quite a bit of
 "error: redeclaration of `i' with no linkage" in QS/mp_linear_algebra.c
 and QS/mp_sieve.c

 E.g:
 {{{
 QS/mp_linear_algebra.c: In function `insert_lp_relation':
 QS/mp_linear_algebra.c:334: error: redeclaration of `i' with no linkage
 QS/mp_linear_algebra.c:329: error: previous declaration of `i' was here
 }}}

 the reason for that is rather than writing
 {{{
  for (unsigned long i = 0; ...
 }}}
 which restricts the scope of i to the for loop, you write
 {{{
  unsigned long i;
  for (i = 0; ...
 }}}
 there, in many places. Well, maybe some weird compiler can accept this,
 but gcc does not...

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