From c58192809252ccd958c75f61cd645412ab4c1dbe Mon Sep 17 00:00:00 2001 From: lezhan Date: Mon, 1 Apr 2024 06:52:44 +0000 Subject: [PATCH 1/3] [build] fix the exection issue of script build-commissioner-libs.sh 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 --- android/build-commissioner-libs.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/android/build-commissioner-libs.sh b/android/build-commissioner-libs.sh index 1054904d8..41d12ec6d 100755 --- a/android/build-commissioner-libs.sh +++ b/android/build-commissioner-libs.sh @@ -55,6 +55,7 @@ cmake -GNinja \ -DCMAKE_CXX_STANDARD=11 \ -DCMAKE_CXX_STANDARD_REQUIRED=ON \ -DCMAKE_BUILD_TYPE=Release \ + -DEVENT__HAVE_PIPE2=0 \ -DOT_COMM_ANDROID=ON \ -DOT_COMM_JAVA_BINDING=ON \ -DOT_COMM_APP=OFF \ From e264a9bb91448ee810353d6144ce6f1a8c6f4d80 Mon Sep 17 00:00:00 2001 From: lezhan Date: Mon, 1 Apr 2024 06:52:44 +0000 Subject: [PATCH 2/3] [build] fix the exection issue of script build-commissioner-libs.sh 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 --- third_party/libevent/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/third_party/libevent/CMakeLists.txt b/third_party/libevent/CMakeLists.txt index 60e9d68d2..1fe43fc0e 100644 --- a/third_party/libevent/CMakeLists.txt +++ b/third_party/libevent/CMakeLists.txt @@ -36,6 +36,7 @@ set(EVENT__DISABLE_SAMPLES ON CACHE BOOL "libevent disable samples" FORCE) set(EVENT__DISABLE_REGRESS ON CACHE BOOL "libevent disable regression tests" FORCE) set(EVENT__DISABLE_TESTS ON CACHE BOOL "libevent disable tests" FORCE) set(EVENT__DISABLE_BENCHMARK ON CACHE BOOL "libevent disable benchmark" FORCE) +set(EVENT__HAVE_PIPE2 OFF CACHE BOOL "disable use of pipe2 in libevent" FORCE) add_subdirectory(repo) target_include_directories(event_core From 9cc2a5316258d1ca4980d726ff622501f21e77db Mon Sep 17 00:00:00 2001 From: lezhan Date: Mon, 1 Apr 2024 06:52:44 +0000 Subject: [PATCH 3/3] [build] fix the exection issue of script build-commissioner-libs.sh 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 --- android/build-commissioner-libs.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/android/build-commissioner-libs.sh b/android/build-commissioner-libs.sh index 41d12ec6d..1054904d8 100755 --- a/android/build-commissioner-libs.sh +++ b/android/build-commissioner-libs.sh @@ -55,7 +55,6 @@ cmake -GNinja \ -DCMAKE_CXX_STANDARD=11 \ -DCMAKE_CXX_STANDARD_REQUIRED=ON \ -DCMAKE_BUILD_TYPE=Release \ - -DEVENT__HAVE_PIPE2=0 \ -DOT_COMM_ANDROID=ON \ -DOT_COMM_JAVA_BINDING=ON \ -DOT_COMM_APP=OFF \