#14803: ppl-1.0 build error
----------------------------+-----------------------------------------------
   Reporter:  stephen       |             Owner:  pjeremy                       
     
       Type:  defect        |            Status:  new                           
     
   Priority:  major         |         Milestone:  sage-5.12                     
     
  Component:  porting: BSD  |          Keywords:                                
     
Work issues:                |   Report Upstream:  Reported upstream. No 
feedback yet.
  Reviewers:                |           Authors:                                
     
  Merged in:                |      Dependencies:                                
     
   Stopgaps:                |  
----------------------------+-----------------------------------------------
 I am compiling ppl-1.0 as part of sage-5.11 under FreeBSD-8.4. I get the
 following compilation error.

 {{{
 gcc -DHAVE_CONFIG_H -I. -I../.. -I../../interfaces/C
 -I/usr/home/stephen/sage-devel/work/sage-5.11.beta2/local/include
 -pedantic -std=gnu89 -Werror -g -O2 -frounding-math -pipe
 -Wl,-rpath=/usr/home/stephen/sage-devel/work/sage-5.11.beta2/local/lib
 -Wl,-rpath=/usr/local/lib/gcc46 -W -Wall -MT ppl_lpsol-ppl_lpsol.o -MD
 -MP -MF .deps/ppl_lpsol-ppl_lpsol.Tpo -c -o ppl_lpsol-ppl_lpsol.o `test
 -f 'ppl_lpsol.c' || echo './'`ppl_lpsol.c
 ppl_lpsol.c: In function 'limit_virtual_memory':
 ppl_lpsol.c:537:13: error: comparison between signed and unsigned
 integer expressions [-Werror=sign-compare]
 }}}
 In FreeBSD, it looks like rlim_cur in struct rlimit is a signed number.

 The following patch will work:
 {{{
 --- ppl-1.0.p0/src/demos/ppl_lpsol/ppl_lpsol.c.orig 2013-06-20
 17:21:39.000000000 +0000
 +++ ppl-1.0.p0/src/demos/ppl_lpsol/ppl_lpsol.c 2013-06-20
 17:39:44.000000000 +0000
 @@ -534,7 +534,7 @@
    if (getrlimit(RLIMIT_AS, &t) != 0)
      fatal("getrlimit failed: %s", strerror(errno));

 - if (bytes < t.rlim_cur) {
 + if (bytes < (unsigned long)(t.rlim_cur)) {
      t.rlim_cur = bytes;
      if (setrlimit(RLIMIT_AS, &t) != 0)
        fatal("setrlimit failed: %s", strerror(errno));
 }}}

 Reported upstream: https://www.cs.unipr.it/mantis/view.php?id=508

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14803>
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to