Build ROHC library with LLVM / Clang

Bug #799205 reported by Didier Barvaux
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
rohc
Status tracked in Rohc-main
Rohc-main
Fix Released
Wishlist
Didier Barvaux

Bug Description

It would be great if the ROHC library could be built with the LLVM / Clang compiler.

description: updated
Revision history for this message
Audric Schiltknecht (audric-schiltknecht) wrote :

Building with LLVM / Clang raises the following warnings (on 32 & 64 bits platforms, LLVM/Clang V2.9)

$ make
make all-recursive
make[1]: Entering directory `/home/storm/Programmation/rohc_llvm'
Making all in src
make[2]: Entering directory `/home/storm/Programmation/rohc_llvm/src'
Making all in common
make[3]: Entering directory `/home/storm/Programmation/rohc_llvm/src/common'
  CC rohc.lo
  CC crc.lo
  CC decode.lo
  CC ip_id.lo
  CC interval.lo
  CC lsb.lo
  CC sdvl.lo
  CC wlsb.lo
  CC ip.lo
  CC ts_sc_comp.lo
ts_sc_comp.c:178:35: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
                                     (ts_sc->ts_scaled < 0 && ts_sc->ts > ts_sc->old_ts);
                                      ~~~~~~~~~~~~~~~~ ^ ~
1 warning generated.
  CC ts_sc_decomp.lo
  CC comp_list.lo
  CC cid.lo
  CCLD librohc_common.la
make[3]: Leaving directory `/home/storm/Programmation/rohc_llvm/src/common'
Making all in comp
make[3]: Entering directory `/home/storm/Programmation/rohc_llvm/src/comp'
  CC rohc_comp.lo
rohc_comp.c:789:20: warning: comparison of unsigned enum expression < 0 is always false [-Wtautological-compare]
                (c->state < 0 || c->state >= sizeof(states)) ? states[0] : states[c->state]);
                 ~~~~~~~~ ^ ~
rohc_comp.c:792:27: warning: comparison of unsigned enum expression < 0 is always false [-Wtautological-compare]
                prefix, (c->mode < 0 || c->mode >= sizeof(modes)) ? modes[0] : modes[c->mode]);
                         ~~~~~~~ ^ ~
2 warnings generated.
  CC c_uncompressed.lo
  CC c_generic.lo
  CC c_ip.lo
  CC c_udp.lo
  CC c_udp_lite.lo
  CC c_rtp.lo
  CCLD librohc_comp.la
make[3]: Leaving directory `/home/storm/Programmation/rohc_llvm/src/comp'
Making all in decomp
make[3]: Entering directory `/home/storm/Programmation/rohc_llvm/src/decomp'
  CC rohc_decomp.lo
rohc_decomp.c:1491:28: warning: comparison of unsigned enum expression < 0 is always false [-Wtautological-compare]
                prefix, (c->state < 0 || c->state >= sizeof(states)) ? states[0] : states[c->state]);
                         ~~~~~~~~ ^ ~
rohc_decomp.c:1494:27: warning: comparison of unsigned enum expression < 0 is always false [-Wtautological-compare]
                prefix, (c->mode < 0 || c->mode >= sizeof(modes)) ? modes[0] : modes[c->mode]);
                         ~~~~~~~ ^ ~
2 warnings generated.
  CC feedback.lo
  CC d_uncompressed.lo
  CC d_generic.lo
  CC d_ip.lo
  CC d_udp.lo
  CC d_udp_lite.lo
  CC d_rtp.lo
  CCLD librohc_decomp.la
make[3]: Leaving directory `/home/storm/Programmation/rohc_llvm/src/decomp'
make[3]: Entering directory `/home/storm/Programmation/rohc_llvm/src'
make[3]: Nothing to be done for `all-am'.
make[3]: Leaving directory `/home/storm/Programmation/rohc_llvm/src'
make[2]: Leaving directory `/home/storm/Programmation/rohc_llvm/src'
Making all in test
[...]

Tests (except statistics generation, see bug #801733) pass.

Revision history for this message
Audric Schiltknecht (audric-schiltknecht) wrote :

My previous comment is true after applied patch provided in bug #800835 (https://bugs.launchpad.net/rohc/+bug/800835/comments/1). Otherwise, errors about wrong printf format are present on a 64 bits build.

tags: added: library
Revision history for this message
Didier Barvaux (didier-barvaux) wrote :
Revision history for this message
Didier Barvaux (didier-barvaux) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.