Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when trying to install blocktest #64

Closed
martinaxgloria opened this issue Nov 14, 2023 · 0 comments · Fixed by #65
Closed

Error when trying to install blocktest #64

martinaxgloria opened this issue Nov 14, 2023 · 0 comments · Fixed by #65

Comments

@martinaxgloria
Copy link
Collaborator

martinaxgloria commented Nov 14, 2023

I was trying to install this repo following the instructions in the README.md but I retrieved the following error:

/home/mgloria/iit/blocktest/build/_deps/unittest-src/googletest/src/gtest-death-test.cc: In function ‘bool testing::internal::StackGrowsDown()’:
/home/mgloria/iit/blocktest/build/_deps/unittest-src/googletest/src/gtest-death-test.cc:1301:24: error: ‘dummy’ may be used uninitialized [-Werror=maybe-uninitialized]
 1301 |   StackLowerThanAddress(&dummy, &result);
      |   ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/home/mgloria/iit/blocktest/build/_deps/unittest-src/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/mgloria/iit/blocktest/build/_deps/unittest-src/googletest/src/gtest-death-test.cc:1299:7: note: ‘dummy’ declared here
 1299 |   int dummy;
      |       ^~~~~
cc1plus: all warnings being treated as errors
make[2]: *** [_deps/unittest-build/googletest/CMakeFiles/gtest.dir/build.make:90: _deps/unittest-build/googletest/CMakeFiles/gtest.dir/src/gtest-all.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:462: _deps/unittest-build/googletest/CMakeFiles/gtest.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

This seems an error related to gtest, not this repo. Looking at the gtest issues, I found that a lot of people have experienced this bug and this happens with gcc version 11.x and googletest v1.10 (which I think is the version used in here).
This issue got fixed by this PR and the fix is available since gtest v1.11.0.

To correctly install BlockTest, maybe it is sufficient to update the GIT_TAG argument of the FetchContent_Declare call.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant