hexway / apple_bleee

Apple BLE research
GNU General Public License v3.0
2.09k stars 302 forks source link

Error Building CXX object googletest/googletest/CMakeFiles/gtest.dir/src/gtest-all.cc.o #40

Open xthr0 opened 1 year ago

xthr0 commented 1 year ago

CMake Deprecation Warning at googletest/CMakeLists.txt:4 (cmake_minimum_required): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake.

Update the VERSION argument value or use a ... suffix to tell CMake that the project does not need compatibility with older versions.

CMake Deprecation Warning at googletest/googlemock/CMakeLists.txt:45 (cmake_minimum_required): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake.

Update the VERSION argument value or use a ... suffix to tell CMake that the project does not need compatibility with older versions.

CMake Deprecation Warning at googletest/googletest/CMakeLists.txt:56 (cmake_minimum_required): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake.

Update the VERSION argument value or use a ... suffix to tell CMake that the project does not need compatibility with older versions.

-- Configuring done -- Generating done -- Build files have been written to: /home/xthr0/apple_bleee/owl/build Consolidate compiler generated dependencies of target radiotap [ 5%] Built target radiotap Consolidate compiler generated dependencies of target awdl [ 51%] Built target awdl Consolidate compiler generated dependencies of target owl [ 64%] Built target owl Consolidate compiler generated dependencies of target gtest [ 67%] Building CXX object googletest/googletest/CMakeFiles/gtest.dir/src/gtest-all.cc.o In file included from /home/xthr0/apple_bleee/owl/googletest/googletest/src/gtest-all.cc:42: /home/xthr0/apple_bleee/owl/googletest/googletest/src/gtest-death-test.cc: In function ‘bool testing::internal::StackGrowsDown()’: /home/xthr0/apple_bleee/owl/googletest/googletest/src/gtest-death-test.cc:1301:24: error: ‘dummy’ may be used uninitialized [-Werror=maybe-uninitialized] 1301 | StackLowerThanAddress(&dummy, &result); | ~~~~~^~~~~ /home/xthr0/apple_bleee/owl/googletest/googletest/src/gtest-death-test.cc:1290:13: note: by argument 1 of type ‘const void’ to ‘void testing::internal::StackLowerThanAddress(const void, bool)’ declared here 1290 | static void StackLowerThanAddress(const void ptr, bool* result) { | ^~~~~ /home/xthr0/apple_bleee/owl/googletest/googletest/src/gtest-death-test.cc:1299:7: note: ‘dummy’ declared here 1299 | int dummy; | ^~~~~ cc1plus: all warnings being treated as errors make[2]: [googletest/googletest/CMakeFiles/gtest.dir/build.make:76: googletest/googletest/CMakeFiles/gtest.dir/src/gtest-all.cc.o] Error 1 make[1]: [CMakeFiles/Makefile2:322: googletest/googletest/CMakeFiles/gtest.dir/all] Error 2 make: *** [Makefile:136: all] Error 2

Chihammer commented 1 year ago

I had the same problem

starlin1995 commented 1 year ago

This is due to a bug from googletest when you are using latest gcc, which has been fixed in googletest 1.11.0, try below cmd should fix the issue

cd ~/owl rm -rf googletest git clone -b release-1.11.0 https://github.com/google/googletest.git cd build make