seemoo-lab/owl

complation error when performing make or sudo make install

Opened this issue · 4 comments

When I perform these command to get the thing working I get this error:


In file included from /home/vm/owl/googletest/googletest/src/gtest-all.cc:42:
/home/vm/owl/googletest/googletest/src/gtest-death-test.cc: In function 'bool testing::internal::StackGrowsDown()':
/home/vm/owl/googletest/googletest/src/gtest-death-test.cc:1301:24: error: 'dummy' may be used uninitialized [-Werror=maybe-uninitialized]
 1301 |   StackLowerThanAddress(&dummy, &result);
      |   ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/home/vm/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/vm/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

same

guihi commented

My workarround:
In the file owl/googletest/googletest/src/gtest-death-test.cc I inserted the following as the new line 1301:
dummy = 0;
After this I was able to execute "make install" (only one warning left, but not considered as an error).

oa01 commented

My workarround: In the file owl/googletest/googletest/src/gtest-death-test.cc I inserted the following as the new line 1301: dummy = 0; After this I was able to execute "make install" (only one warning left, but not considered as an error).

works for me.
For anyone wondering it should look like this:
image