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

Make error when compiling googletest on Manjaro #50

Open
demlenar opened this issue Jan 20, 2023 · 0 comments
Open

Make error when compiling googletest on Manjaro #50

demlenar opened this issue Jan 20, 2023 · 0 comments

Comments

@demlenar
Copy link

This is likely due to a newer GCC version. When running make I encountered:

CppND-Route-Planning-Project/thirdparty/googletest/googletest/src/gtest-death-test.cc:1287:24: error: ‘dummy’ may be used uninitialized [-Werror=maybe-uninitialized]
 1287 |   StackLowerThanAddress(&dummy, &result);

According to this SO post, the newer version of GCC treats this as an error.

This has been fixed upstream, so changing the submodule link from abseil/googletest.git to google/googletest.git (I think the upstream project was moved), and pulling to latest works.

$ git diff
diff --git a/.gitmodules b/.gitmodules
index 3fc81ad..7e4a0c4 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -3,4 +3,4 @@
        url = https://github.com/zeux/pugixml.git
 [submodule "thirdparty/googletest"]
        path = thirdparty/googletest
-       url = https://github.com/abseil/googletest.git
+       url = https://github.com/google/googletest.git
diff --git a/thirdparty/googletest b/thirdparty/googletest
index 695cf7c..ec25eea 160000
--- a/thirdparty/googletest
+++ b/thirdparty/googletest
@@ -1 +1 @@
-Subproject commit 695cf7c96249de50360a7d2951dc88eb3aea0695
+Subproject commit ec25eea8f8237cf86c30703f59747e42f34b6f75
ruddyscent added a commit to ruddyscent/CppND-Route-Planning-Project that referenced this issue Sep 7, 2023
Apply the fix suggested by @demlenar at the issue udacity#50
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

1 participant