[tor-bugs] #32500 [Core Tor/Tor]: consider clang -std=gnu99 in Travis for better C99 portability

Tor Bug Tracker & Wiki blackhole at torproject.org
Tue Dec 3 02:36:30 UTC 2019

#32500: consider clang -std=gnu99 in Travis for better C99 portability
 Reporter:  catalyst                             |          Owner:  teor
     Type:  enhancement                          |         Status:
                                                 |  merge_ready
 Priority:  Medium                               |      Milestone:  Tor:
                                                 |  0.4.3.x-final
Component:  Core Tor/Tor                         |        Version:
 Severity:  Normal                               |     Resolution:
 Keywords:  portability, tor-ci, 029-backport,   |  Actual Points:  0.5
  035-backport, 040-backport, 041-backport,      |
  042-backport                                   |
Parent ID:                                       |         Points:  0.1
 Reviewer:  catalyst                             |        Sponsor:
                                                 |  Sponsor31-can

Comment (by teor):

 Replying to [comment:11 catalyst]:
 > Further investigation reveals that `check-cocci` probably hasn't ever
 worked on Trusty because of an older version of coccinelle that has a
 harder time parsing our files.

 `make check-cocci` is quite new, we upgraded to bionic so we could have a
 new enough version of coccinelle:

 I did some extra tests, the required coccinelle version is some version in
 this range:
 * > 1.0.0-rc21
 * <= 1.0.4

 I couldn't find any versions lower than 1.0.4 in debian, ubuntu, or macOS
 homebrew, so I suggest we require 1.0.4.

 Replying to [comment:16 catalyst]:
 > I do think we want to make a comment explaining that
 `SKIP_MAKE_CHECK="yes"` is required on Trusty at the moment because its
 coccinelle is too old to parse our C files. Would you rather to it as part
 of this ticket, or as a new ticket?

 Replying to [comment:17 nickm]:
 > If we do it this way, can we please have another ticket to make Trusty
 skip less?  Maybe we should have a "SKIP_COCCI" that it can use instead,
 and have our makefile acknowledge it.

 We only have one Trusty CI job right now, which runs chutney without `make
 check`. We'd have the chutney job on bionic, but that's blocked on #32240.

 But you're right, our `make check` should run without failing, even if
 people have a really old coccinelle.

 I suggest we require coccinelle version 1.0.4 in `check_cocci_parse.sh`.
 That way, our changes work in the Makefile and the git hooks. And we can
 put the relevant comment/notice there.

 We should also check what happens if we install coccinelle on Windows.

 I opened #32663 for this fix.

Ticket URL: <https://trac.torproject.org/projects/tor/ticket/32500#comment:18>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online

More information about the tor-bugs mailing list