openthread / ot-commissioner

OpenThread Commissioner, a Thread commissioner for joining new Thread devices and managing Thread networks.
https://openthread.io/
BSD 3-Clause "New" or "Revised" License
49 stars 36 forks source link

[build] fix issue when executing `build-commissioner-libs.sh` multiple times #250

Closed ZhangLe2016 closed 4 months ago

ZhangLe2016 commented 5 months ago

When developers run the 'build-commissioner-libs.sh' script multiple times, they might see the following error during compiling the libevent:

error: call to undeclared function 'pipe2'; ISO C99 and later do not support implicit function declarations ...

In fact, we did not use pip2 in libevent. We can turn it off by using the macro EVENT_HAVE-PIPE2=0

ZhangLe2016 commented 5 months ago

@jwhui seems that I cannot add reviewers into this PR, could you please add me into this project as a contributor? thanks.

wgtdkp commented 5 months ago

Better add this to third_party/libevent/CMakeLists.txt:

set(EVENT__HAVE_PIPE2 0 CACHE BOOL "disable use of pipe2 in libevent" FORCE)
codecov-commenter commented 5 months ago

Codecov Report

Attention: Patch coverage is 75.00000% with 7 lines in your changes are missing coverage. Please review.

Project coverage is 73.35%. Comparing base (de8e82c) to head (2704165). Report is 1 commits behind head on main.

:exclamation: Current head 2704165 differs from pull request most recent head 9cc2a53. Consider uploading reports for the commit 9cc2a53 to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #250 +/- ## ======================================= Coverage 73.35% 73.35% ======================================= Files 71 71 Lines 7420 7421 +1 ======================================= + Hits 5443 5444 +1 Misses 1977 1977 ``` | [Files](https://app.codecov.io/gh/openthread/ot-commissioner/pull/250?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openthread) | Coverage Δ | | |---|---|---| | [src/app/border\_agent.cpp](https://app.codecov.io/gh/openthread/ot-commissioner/pull/250?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openthread#diff-c3JjL2FwcC9ib3JkZXJfYWdlbnQuY3Bw) | `92.50% <100.00%> (ø)` | | | [src/app/border\_agent.hpp](https://app.codecov.io/gh/openthread/ot-commissioner/pull/250?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openthread#diff-c3JjL2FwcC9ib3JkZXJfYWdlbnQuaHBw) | `100.00% <ø> (ø)` | | | [src/app/br\_discover.cpp](https://app.codecov.io/gh/openthread/ot-commissioner/pull/250?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openthread#diff-c3JjL2FwcC9icl9kaXNjb3Zlci5jcHA=) | `89.47% <ø> (ø)` | | | [src/app/cli/interpreter.cpp](https://app.codecov.io/gh/openthread/ot-commissioner/pull/250?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openthread#diff-c3JjL2FwcC9jbGkvaW50ZXJwcmV0ZXIuY3Bw) | `79.70% <100.00%> (ø)` | | | [src/app/cli/interpreter.hpp](https://app.codecov.io/gh/openthread/ot-commissioner/pull/250?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openthread#diff-c3JjL2FwcC9jbGkvaW50ZXJwcmV0ZXIuaHBw) | `100.00% <ø> (ø)` | | | [src/app/cli/job.cpp](https://app.codecov.io/gh/openthread/ot-commissioner/pull/250?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openthread#diff-c3JjL2FwcC9jbGkvam9iLmNwcA==) | `100.00% <100.00%> (ø)` | | | [src/app/cli/job.hpp](https://app.codecov.io/gh/openthread/ot-commissioner/pull/250?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openthread#diff-c3JjL2FwcC9jbGkvam9iLmhwcA==) | `100.00% <ø> (ø)` | | | [src/app/commissioner\_app.hpp](https://app.codecov.io/gh/openthread/ot-commissioner/pull/250?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openthread#diff-c3JjL2FwcC9jb21taXNzaW9uZXJfYXBwLmhwcA==) | `100.00% <ø> (ø)` | | | [src/app/file\_logger.hpp](https://app.codecov.io/gh/openthread/ot-commissioner/pull/250?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openthread#diff-c3JjL2FwcC9maWxlX2xvZ2dlci5ocHA=) | `100.00% <ø> (ø)` | | | [src/app/mdns\_handler.cpp](https://app.codecov.io/gh/openthread/ot-commissioner/pull/250?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openthread#diff-c3JjL2FwcC9tZG5zX2hhbmRsZXIuY3Bw) | `85.71% <100.00%> (ø)` | | | ... and [19 more](https://app.codecov.io/gh/openthread/ot-commissioner/pull/250?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openthread) | |