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

build failed #23

Closed
botoph4 opened this issue Mar 30, 2023 · 4 comments
Closed

build failed #23

botoph4 opened this issue Mar 30, 2023 · 4 comments
Labels

Comments

@botoph4
Copy link

botoph4 commented Mar 30, 2023

Hey,

seems like the project for now is not compilable? Here is the error message:

Consolidate compiler generated dependencies of target cppcore
[ 17%] Built target cppcore
Consolidate compiler generated dependencies of target gtest
[ 21%] Building CXX object contrib/googletest-1.10.x/googletest/CMakeFiles/gtest.dir/src/gtest-all.cc.o
In file included from /home/ar_admin/Collection/cppcore/contrib/googletest-1.10.x/googletest/src/gtest-all.cc:42:
/home/ar_admin/Collection/cppcore/contrib/googletest-1.10.x/googletest/src/gtest-death-test.cc: In function ‘bool testing::internal::StackGrowsDown()’:
/home/ar_admin/Collection/cppcore/contrib/googletest-1.10.x/googletest/src/gtest-death-test.cc:1301:24: error: ‘dummy’ may be used uninitialized [-Werror=maybe-uninitialized]
 1301 |   StackLowerThanAddress(&dummy, &result);
      |   ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/home/ar_admin/Collection/cppcore/contrib/googletest-1.10.x/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/ar_admin/Collection/cppcore/contrib/googletest-1.10.x/googletest/src/gtest-death-test.cc:1299:7: note: ‘dummy’ declared here
 1299 |   int dummy;
      |       ^~~~~
cc1plus: all warnings being treated as errors
make[2]: *** [contrib/googletest-1.10.x/googletest/CMakeFiles/gtest.dir/build.make:76: contrib/googletest-1.10.x/googletest/CMakeFiles/gtest.dir/src/gtest-all.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:158: contrib/googletest-1.10.x/googletest/CMakeFiles/gtest.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
@kimkulling
Copy link
Owner

Thanks for your report. Which compiler have you used?

@botoph4
Copy link
Author

botoph4 commented Mar 31, 2023

Hey @kimkulling,

I am using GCC 11.2.0 x86_64-linux-gnu on Ubuntu 22.04

@kimkulling kimkulling added the bug label Mar 31, 2023
@kimkulling
Copy link
Owner

This issue is caused by a not used variable in gtest. You can disable the tests to workaound this issue:

cmake CMakeLists.txt -DCPPCORE_BUILD_UNITTESTS=OFF

I am working on a solution which will fix this issue in the correct way.

@kimkulling
Copy link
Owner

Fixed by 2c3c270

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

No branches or pull requests

2 participants