Opened 8 years ago
Closed 4 years ago
#14803 closed defect (worksforme)
ppl-1.0 build error
Reported by: | stephen | Owned by: | pjeremy |
---|---|---|---|
Priority: | major | Milestone: | sage-duplicate/invalid/wontfix |
Component: | porting: BSD | Keywords: | |
Cc: | vbraun | Merged in: | |
Authors: | Reviewers: | Samuel Lelièvre | |
Report Upstream: | Fixed upstream, in a later stable release. | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
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
Change History (7)
comment:1 Changed 8 years ago by
- Cc vbraun added
comment:2 Changed 7 years ago by
- Milestone changed from sage-6.1 to sage-6.2
comment:3 Changed 7 years ago by
- Milestone changed from sage-6.2 to sage-6.3
comment:4 Changed 7 years ago by
- Milestone changed from sage-6.3 to sage-6.4
comment:5 Changed 4 years ago by
- Report Upstream changed from Reported upstream. No feedback yet. to Fixed upstream, in a later stable release.
comment:6 Changed 4 years ago by
Solution: don't build with -Werror
comment:7 Changed 4 years ago by
- Milestone changed from sage-6.4 to sage-duplicate/invalid/wontfix
- Resolution set to worksforme
- Reviewers set to Samuel Lelièvre
- Status changed from new to closed
Note: See
TracTickets for help on using
tickets.
The upstream bug report is closed as fixed, with a comment that PPL 1.1 builds on FreeBSD 8.x.
This ticket here can probably be closed.