-
Notifications
You must be signed in to change notification settings - Fork 308
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
s2builderutil_lax_polygon_layer_test/googletest: build fails on Ubuntu 22.04 #356
Comments
Let's wait until the "which code is it?" question from the other issues is resolved before worrying too much about this one. |
This is on the master branch. Steps to reproduce (I'm using an Ubuntu 22.04 Docker Image): git clone https://github.com/google/s2geometry.git |
I'm actually using the Debian googletest-1.14.0-1, and it works. Do you get the same error message from 1.14.0? |
I've answered that in the other issue (and sorry, I should have consolidated the issues into a single one). Though the build instructions from the readme won't work on Ubuntu 22.04 either way, because for whatever reason gmock is missing in the Ubuntu package (if I remember correctly the version there is otherwise 1.11.0). Even though gtest is found cmake complains right away that gmock isn't available when the system package is used. |
Then the instructions about the required version number are probably wrong, as well as the package instructions for Ubunto. google-mock needs to be installed separately. Can you install google-mock and see if it works with 1.11 or 1.14? |
The build fails at the same place with googletest and gmock installed via apt (the Ubuntu package version for both is 1.11.0-3). Since I get the same "wrong number of arguments" error on alpine 3.19 when using a recent googletest version as with ubuntu 22.04 I assume installing a different version on Ubuntu via apt from alternative sources would not make a difference.
Edit: By the way, for testing the above I used a shell into blank docker container. This may be a quick way to reproduce the issue: (build tools and git need to be installed still) |
One of the tests won't compile with the latest version on Ubuntu 22.04. Neither with the mentioned googletest version 1.10.0 nor the current 1.14.0 release. The error is in s2builderutil_lax_polygon_layer_test:
In file included from /root/googletest/googlemock/include/gmock/gmock-spec-builders.h:75,
from /root/googletest/googlemock/include/gmock/gmock-generated-function-mockers.h:47,
from /root/googletest/googlemock/include/gmock/gmock-function-mocker.h:39,
from /root/googletest/googlemock/include/gmock/gmock.h:61,
from /root/s2geometry/src/s2/s2builderutil_lax_polygon_layer_test.cc:26:
/root/googletest/googlemock/include/gmock/gmock-matchers.h: In instantiation of 'bool testing::internal::ElementsAreMatcherImpl::MatchAndExplain(Container, testing::MatchResultListener*) const [with Container = const IdSetLexicon::IdSet&]':
/root/googletest/googlemock/include/gmock/gmock-matchers.h:2747:8: required from here
/root/googletest/googlemock/include/gmock/gmock-matchers.h:2757:43: error: no type named 'const_iterator' in 'testing::internal::ElementsAreMatcherImpl<const IdSetLexicon::IdSet&>::StlContainer' {aka 'class IdSetLexicon::IdSet'}
2757 | typename StlContainer::const_iterator it = stl_container.begin();
| ^~
/root/googletest/googlemock/include/gmock/gmock-matchers.h:2757:43: error: no type named 'const_iterator' in 'testing::internal::ElementsAreMatcherImpl<const IdSetLexicon::IdSet&>::StlContainer' {aka 'class IdSetLexicon::IdSet'}
/root/s2geometry/src/s2/s2builderutil_snap_functions_test.cc: In function 'double GetS2CellIdMinVertexSeparation(int, absl::lts_20240116::flat_hash_set*)':
The text was updated successfully, but these errors were encountered: