Skip to content
This repository was archived by the owner on Mar 7, 2025. It is now read-only.

Failed to compile with gcc-11 due to gtest. #737

Open
xkszltl opened this issue Apr 14, 2022 · 0 comments
Open

Failed to compile with gcc-11 due to gtest. #737

xkszltl opened this issue Apr 14, 2022 · 0 comments

Comments

@xkszltl
Copy link

xkszltl commented Apr 14, 2022

The gtest submodule (1.8) is too old and won't work on gcc-11.

-- Build files have been written to: /tmp/scratch/libgdiplus/gtest_build
make[3]: Entering directory '/tmp/scratch/libgdiplus/gtest_build'
make[4]: Entering directory '/tmp/scratch/libgdiplus/gtest_build'
make[5]: Entering directory '/tmp/scratch/libgdiplus/gtest_build'
make[5]: Leaving directory '/tmp/scratch/libgdiplus/gtest_build'
make[5]: Entering directory '/tmp/scratch/libgdiplus/gtest_build'
[ 12%] Building CXX object googletest/CMakeFiles/gtest.dir/src/gtest-all.cc.o
  CCLD     testregion
  CCLD     testgraphicsdraw
  CCLD     testbmpcodec
In file included from ../../external/googletest/googletest/src/gtest-all.cc:42:
../../external/googletest/googletest/src/gtest-death-test.cc: In function ‘bool testing::internal::StackGrowsDown()’:
../../external/googletest/googletest/src/gtest-death-test.cc:1301:24: error: ‘dummy’ may be used uninitialized [-Werror=maybe-uninitialized]
 1301 |   StackLowerThanAddress(&dummy, &result);
      |   ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
../../external/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) {
      |             ^~~~~~~~~~~~~~~~~~~~~
../../external/googletest/googletest/src/gtest-death-test.cc:1299:7: note: ‘dummy’ declared here
 1299 |   int dummy;
      |       ^~~~~
cc1plus: all warnings being treated as errors
make[5]: *** [googletest/CMakeFiles/gtest.dir/build.make:76: googletest/CMakeFiles/gtest.dir/src/gtest-all.cc.o] Error 1
make[5]: Leaving directory '/tmp/scratch/libgdiplus/gtest_build'
make[4]: *** [CMakeFiles/Makefile2:172: googletest/CMakeFiles/gtest.dir/all] Error 2
make[4]: Leaving directory '/tmp/scratch/libgdiplus/gtest_build'
make[3]: *** [Makefile:146: all] Error 2
make[3]: Leaving directory '/tmp/scratch/libgdiplus/gtest_build'
make[2]: *** [Makefile:1867: ../gtest_build/.stamp-gtest] Error 2
make[2]: Leaving directory '/tmp/scratch/libgdiplus/tests'
make[1]: *** [Makefile:479: all-recursive] Error 1
make[1]: Leaving directory '/tmp/scratch/libgdiplus'
make: *** [Makefile:385: all] Error 2

This is the PR fixing this issue and it's in 1.11.

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

No branches or pull requests

1 participant