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

在g++11的版本上有编译错误 #239

Open
ralf997 opened this issue May 27, 2022 · 3 comments
Open

在g++11的版本上有编译错误 #239

ralf997 opened this issue May 27, 2022 · 3 comments

Comments

@ralf997
Copy link

ralf997 commented May 27, 2022

image

In file included from /root/down/TarsCpp/build/src/gtest-lib/googletest/src/gtest-all.cc:42:
/root/down/TarsCpp/build/src/gtest-lib/googletest/src/gtest-death-test.cc: In function ‘bool testing::internal::StackGrowsDown()’:
/root/down/TarsCpp/build/src/gtest-lib/googletest/src/gtest-death-test.cc:1301:24: error: ‘dummy’ may be used uninitialized [-Werror=maybe-uninitialized]
 1301 |   StackLowerThanAddress(&dummy, &result);
      |   ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/root/down/TarsCpp/build/src/gtest-lib/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) {
      |             ^~~~~~~~~~~~~~~~~~~~~
/root/down/TarsCpp/build/src/gtest-lib/googletest/src/gtest-death-test.cc:1299:7: note: ‘dummy’ declared here
 1299 |   int dummy;
      |       ^~~~~
cc1plus: all warnings being treated as errors
@ruanshudong
Copy link
Contributor

看起来是gtest版本的问题, 等下个版本升级一下gtest

@ralf997
Copy link
Author

ralf997 commented May 30, 2022

的确是gtest版本问题, 换了新版本就好了
我把cmake/Thirdparty.cmake里面的
http://cdn.tarsyun.com/src/release-1.10.0.tar.gz
换成 https://github.com/google/googletest/archive/refs/tags/release-1.11.0.tar.gz
然后再改下URL_MD5就可以正常编译了

@ruanshudong
Copy link
Contributor

还不能直接升级, 升级了低版本gcc又编译不过了, 蛋疼

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

No branches or pull requests

2 participants