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

CMake Error Debugging Request #4616

Open
apal9569 opened this issue Sep 23, 2024 · 2 comments
Open

CMake Error Debugging Request #4616

apal9569 opened this issue Sep 23, 2024 · 2 comments

Comments

@apal9569
Copy link

Describe the issue

There seems to be some mismatch in the googletest library version. There were some issue coming the Nvidia package itself which I was able to correct but got stuck in errors mentioned below.

Steps to reproduce the problem

I am trying to compile the https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_image_pipeline in ubuntu 22.04 with ROS2 Humble.

What version of GoogleTest are you using?

ros-humble-gtest-vendor is already the newest version (1.10.9006-1jammy.20240728.193421).
ros-humble-gmock-vendor is already the newest version (1.10.9006-1jammy.20240728.193706).

What operating system and version are you using?

Ubuntu 22.04

What compiler and version are you using?

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/aarch64-linux-gnu/11/lto-wrapper
Target: aarch64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 11.4.0-1ubuntu122.04' --with-bugurl=file:///usr/share/doc/gcc-11/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-11 --program-prefix=aarch64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libquadmath --disable-libquadmath-support --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --enable-fix-cortex-a53-843419 --disable-werror --enable-checking=release --build=aarch64-linux-gnu --host=aarch64-linux-gnu --target=aarch64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-serialization=2
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.4.0 (Ubuntu 11.4.0-1ubuntu1
22.04)

What build system are you using?

cmake version 3.22.1

CMake suite maintained and supported by Kitware (kitware.com/cmake).

Additional context

--- stderr: isaac_ros_image_proc
In file included from /usr/src/googletest/googlemock/include/gmock/gmock-spec-builders.h:75,
from /usr/src/googletest/googlemock/include/gmock/gmock-function-mocker.h:42,
from /usr/src/googletest/googlemock/include/gmock/gmock.h:61,
from /home/student/isaac_ros_ws/src/isaac_ros_image_pipeline/isaac_ros_image_proc/test/image_format_converter_node_test.cpp:18:
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h: In member function ‘testing::internal::FieldsAreMatcher::operator testing::Matcher() const’:
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:3165:49: error: ‘IndexSequenceFor’ was not declared in this scope; did you mean ‘IndexSequence’?
3165 | new FieldsAreMatcherImpl<const Struct&, IndexSequenceFor<Inner...>>(
| ^~~~~~~~~~~~~~~~
| IndexSequence
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:3165:71: error: expected parameter pack before ‘...’
3165 | new FieldsAreMatcherImpl<const Struct&, IndexSequenceFor<Inner...>>(
| ^~~
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:3165:71: error: template argument 2 is invalid
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h: At global scope:
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:4291:21: error: ‘StringLike’ in namespace ‘testing::internal’ does not name a template type; did you mean ‘Strings’?
4291 | const internal::StringLike& str) {
| ^~~~~~~~~~
| Strings
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:4291:31: error: expected ‘,’ or ‘...’ before ‘<’ token
4291 | const internal::StringLike& str) {
| ^
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h: In function ‘testing::PolymorphicMatcher<testing::internal::StrEqualityMatcher<std::__cxx11::basic_string > > testing::StrEq(int)’:
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:4293:61: error: ‘str’ was not declared in this scope; did you mean ‘std’?
4293 | internal::StrEqualityMatcherstd::string(std::string(str), true, true));
| ^~~
| std
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h: At global scope:
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:4299:21: error: ‘StringLike’ in namespace ‘testing::internal’ does not name a template type; did you mean ‘Strings’?
4299 | const internal::StringLike& str) {
| ^~~~~~~~~~
| Strings
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:4299:31: error: expected ‘,’ or ‘...’ before ‘<’ token
4299 | const internal::StringLike& str) {
| ^
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h: In function ‘testing::PolymorphicMatcher<testing::internal::StrEqualityMatcher<std::__cxx11::basic_string > > testing::StrNe(int)’:
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:4301:61: error: ‘str’ was not declared in this scope; did you mean ‘std’?
4301 | internal::StrEqualityMatcherstd::string(std::string(str), false, true));
| ^~~
| std
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h: At global scope:
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:4307:21: error: ‘StringLike’ in namespace ‘testing::internal’ does not name a template type; did you mean ‘Strings’?
4307 | const internal::StringLike& str) {
| ^~~~~~~~~~
| Strings
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:4307:31: error: expected ‘,’ or ‘...’ before ‘<’ token
4307 | const internal::StringLike& str) {
| ^
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h: In function ‘testing::PolymorphicMatcher<testing::internal::StrEqualityMatcher<std::__cxx11::basic_string > > testing::StrCaseEq(int)’:
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:4309:61: error: ‘str’ was not declared in this scope; did you mean ‘std’?
4309 | internal::StrEqualityMatcherstd::string(std::string(str), true, false));
| ^~~
| std
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h: At global scope:
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:4315:21: error: ‘StringLike’ in namespace ‘testing::internal’ does not name a template type; did you mean ‘Strings’?
4315 | const internal::StringLike& str) {
| ^~~~~~~~~~
| Strings
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:4315:31: error: expected ‘,’ or ‘...’ before ‘<’ token
4315 | const internal::StringLike& str) {
| ^
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h: In function ‘testing::PolymorphicMatcher<testing::internal::StrEqualityMatcher<std::__cxx11::basic_string > > testing::StrCaseNe(int)’:
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:4317:19: error: ‘str’ was not declared in this scope; did you mean ‘std’?
4317 | std::string(str), false, false));
| ^~~
| std
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h: At global scope:
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:4324:21: error: ‘StringLike’ in namespace ‘testing::internal’ does not name a template type; did you mean ‘Strings’?
4324 | const internal::StringLike& substring) {
| ^~~~~~~~~~
| Strings
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:4324:31: error: expected ‘,’ or ‘...’ before ‘<’ token
4324 | const internal::StringLike& substring) {
| ^
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h: In function ‘testing::PolymorphicMatcher<testing::internal::HasSubstrMatcher<std::__cxx11::basic_string > > testing::HasSubstr(int)’:
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:4326:59: error: ‘substring’ was not declared in this scope; did you mean ‘IsSubstring’?
4326 | internal::HasSubstrMatcherstd::string(std::string(substring)));
| ^~~~~~~~~
| IsSubstring
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h: At global scope:
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:4332:21: error: ‘StringLike’ in namespace ‘testing::internal’ does not name a template type; did you mean ‘Strings’?
4332 | const internal::StringLike& prefix) {
| ^~~~~~~~~~
| Strings
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:4332:31: error: expected ‘,’ or ‘...’ before ‘<’ token
4332 | const internal::StringLike& prefix) {
| ^
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h: In function ‘testing::PolymorphicMatcher<testing::internal::StartsWithMatcher<std::__cxx11::basic_string > > testing::StartsWith(int)’:
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:4334:60: error: ‘prefix’ was not declared in this scope; did you mean ‘profil’?
4334 | internal::StartsWithMatcherstd::string(std::string(prefix)));
| ^~~~~~
| profil
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h: At global scope:
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:4340:21: error: ‘StringLike’ in namespace ‘testing::internal’ does not name a template type; did you mean ‘Strings’?
4340 | const internal::StringLike& suffix) {
| ^~~~~~~~~~
| Strings
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:4340:31: error: expected ‘,’ or ‘...’ before ‘<’ token
4340 | const internal::StringLike& suffix) {
| ^
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h: In function ‘testing::PolymorphicMatcher<testing::internal::EndsWithMatcher<std::__cxx11::basic_string > > testing::EndsWith(int)’:
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:4342:58: error: ‘suffix’ was not declared in this scope
4342 | internal::EndsWithMatcherstd::string(std::string(suffix)));
| ^~~~~~
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h: In member function ‘bool testing::internal::ExceptionMatcherImpl::MatchAndExplain(T&&, testing::MatchResultListener*) const’:
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:5150:65: error: no matching function for call to ‘GetTypeName(const std::type_info&)’
5150 | *listener << "throws an exception of type " << GetTypeName(typeid(err));
| ~~~~~~~~~~~^~~~~~~~~~~~~
In file included from /opt/ros/humble/src/gtest_vendor/include/gtest/internal/gtest-internal.h:67,
from /opt/ros/humble/src/gtest_vendor/include/gtest/gtest.h:62,
from /usr/src/googletest/googlemock/include/gmock/internal/gmock-internal-utils.h:47,
from /usr/src/googletest/googlemock/include/gmock/gmock-actions.h:145,
from /usr/src/googletest/googlemock/include/gmock/gmock.h:59,
from /home/student/isaac_ros_ws/src/isaac_ros_image_pipeline/isaac_ros_image_proc/test/image_format_converter_node_test.cpp:18:
/opt/ros/humble/src/gtest_vendor/include/gtest/internal/gtest-type-util.h:80:13: note: candidate: ‘template std::string testing::internal::GetTypeName()’
80 | std::string GetTypeName() {
| ^~~~~~~~~~~
/opt/ros/humble/src/gtest_vendor/include/gtest/internal/gtest-type-util.h:80:13: note: template argument deduction/substitution failed:
In file included from /usr/src/googletest/googlemock/include/gmock/gmock-spec-builders.h:75,
from /usr/src/googletest/googlemock/include/gmock/gmock-function-mocker.h:42,
from /usr/src/googletest/googlemock/include/gmock/gmock.h:61,
from /home/student/isaac_ros_ws/src/isaac_ros_image_pipeline/isaac_ros_image_proc/test/image_format_converter_node_test.cpp:18:
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:5150:65: note: candidate expects 0 arguments, 1 provided
5150 | listener << "throws an exception of type " << GetTypeName(typeid(err));
| ~~~~~~~~~~~^~~~~~~~~~~~~
In file included from /usr/src/googletest/googlemock/include/gmock/gmock-spec-builders.h:75,
from /usr/src/googletest/googlemock/include/gmock/gmock-function-mocker.h:42,
from /usr/src/googletest/googlemock/include/gmock/gmock.h:61,
from /home/student/isaac_ros_ws/src/isaac_ros_image_pipeline/isaac_ros_image_proc/test/resize_node_test.cpp:18:
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h: In member function ‘testing::internal::FieldsAreMatcher::operator testing::Matcher() const’:
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:3165:49: error: ‘IndexSequenceFor’ was not declared in this scope; did you mean ‘IndexSequence’?
3165 | new FieldsAreMatcherImpl<const Struct&, IndexSequenceFor<Inner...>>(
| ^~~~~~~~~~~~~~~~
| IndexSequence
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:3165:71: error: expected parameter pack before ‘...’
3165 | new FieldsAreMatcherImpl<const Struct&, IndexSequenceFor<Inner...>>(
| ^~~
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:3165:71: error: template argument 2 is invalid
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h: At global scope:
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:4291:21: error: ‘StringLike’ in namespace ‘testing::internal’ does not name a template type; did you mean ‘Strings’?
4291 | const internal::StringLike& str) {
| ^~~~~~~~~~
| Strings
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:4291:31: error: expected ‘,’ or ‘...’ before ‘<’ token
4291 | const internal::StringLike& str) {
| ^
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h: In function ‘testing::PolymorphicMatcher<testing::internal::StrEqualityMatcher<std::__cxx11::basic_string > > testing::StrEq(int)’:
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:4293:61: error: ‘str’ was not declared in this scope; did you mean ‘std’?
4293 | internal::StrEqualityMatcherstd::string(std::string(str), true, true));
| ^~~
| std
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h: At global scope:
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:4299:21: error: ‘StringLike’ in namespace ‘testing::internal’ does not name a template type; did you mean ‘Strings’?
4299 | const internal::StringLike& str) {
| ^~~~~~~~~~
| Strings
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:4299:31: error: expected ‘,’ or ‘...’ before ‘<’ token
4299 | const internal::StringLike& str) {
| ^
In file included from /usr/src/googletest/googlemock/include/gmock/gmock.h:63,
from /home/student/isaac_ros_ws/src/isaac_ros_image_pipeline/isaac_ros_image_proc/test/image_format_converter_node_test.cpp:18:
/usr/src/googletest/googlemock/include/gmock/gmock-more-actions.h: In member function ‘decltype (testing::internal::InvokeArgument(get(std::forward_as_tuple((forward)(args)...)), (declval<const Params&>)()...)) testing::internal::InvokeArgumentAction<index, Params>::operator()(Args&& ...) const’:
/usr/src/googletest/googlemock/include/gmock/gmock-more-actions.h:519:47: error: ‘FlatTupleConstructTag’ was not declared in this scope
519 | internal::FlatTuple<Args&&...> args_tuple(FlatTupleConstructTag{},
| ^~~~~~~~~~~~~~~~~~~~~
/usr/src/googletest/googlemock/include/gmock/gmock-more-actions.h: In function ‘testing::internal::InvokeArgumentAction<index, typename std::decay::type ...> testing::InvokeArgument(Params&& ...)’:
/usr/src/googletest/googlemock/include/gmock/gmock-more-actions.h:564:17: error: ‘FlatTupleConstructTag’ is not a member of ‘testing::internal’
564 | internal::FlatTupleConstructTag{}, std::forward(params)...)};
| ^~~~~~~~~~~~~~~~~~~~~
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h: In function ‘testing::PolymorphicMatcher<testing::internal::StrEqualityMatcher<std::__cxx11::basic_string > > testing::StrNe(int)’:
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:4301:61: error: ‘str’ was not declared in this scope; did you mean ‘std’?
4301 | internal::StrEqualityMatcherstd::string(std::string(str), false, true));
| ^~~
| std
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h: At global scope:
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:4307:21: error: ‘StringLike’ in namespace ‘testing::internal’ does not name a template type; did you mean ‘Strings’?
4307 | const internal::StringLike& str) {
| ^~~~~~~~~~
| Strings
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:4307:31: error: expected ‘,’ or ‘...’ before ‘<’ token
4307 | const internal::StringLike& str) {
| ^
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h: In function ‘testing::PolymorphicMatcher<testing::internal::StrEqualityMatcher<std::__cxx11::basic_string > > testing::StrCaseEq(int)’:
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:4309:61: error: ‘str’ was not declared in this scope; did you mean ‘std’?
4309 | internal::StrEqualityMatcherstd::string(std::string(str), true, false));
| ^~~
| std
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h: At global scope:
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:4315:21: error: ‘StringLike’ in namespace ‘testing::internal’ does not name a template type; did you mean ‘Strings’?
4315 | const internal::StringLike& str) {
| ^~~~~~~~~~
| Strings
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:4315:31: error: expected ‘,’ or ‘...’ before ‘<’ token
4315 | const internal::StringLike& str) {
| ^
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h: In function ‘testing::PolymorphicMatcher<testing::internal::StrEqualityMatcher<std::__cxx11::basic_string > > testing::StrCaseNe(int)’:
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:4317:19: error: ‘str’ was not declared in this scope; did you mean ‘std’?
4317 | std::string(str), false, false));
| ^~~
| std
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h: At global scope:
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:4324:21: error: ‘StringLike’ in namespace ‘testing::internal’ does not name a template type; did you mean ‘Strings’?
4324 | const internal::StringLike& substring) {
| ^~~~~~~~~~
| Strings
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:4324:31: error: expected ‘,’ or ‘...’ before ‘<’ token
4324 | const internal::StringLike& substring) {
| ^
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h: In function ‘testing::PolymorphicMatcher<testing::internal::HasSubstrMatcher<std::__cxx11::basic_string > > testing::HasSubstr(int)’:
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:4326:59: error: ‘substring’ was not declared in this scope; did you mean ‘IsSubstring’?
4326 | internal::HasSubstrMatcherstd::string(std::string(substring)));
| ^~~~~~~~~
| IsSubstring
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h: At global scope:
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:4332:21: error: ‘StringLike’ in namespace ‘testing::internal’ does not name a template type; did you mean ‘Strings’?
4332 | const internal::StringLike& prefix) {
| ^~~~~~~~~~
| Strings
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:4332:31: error: expected ‘,’ or ‘...’ before ‘<’ token
4332 | const internal::StringLike& prefix) {
| ^
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h: In function ‘testing::PolymorphicMatcher<testing::internal::StartsWithMatcher<std::__cxx11::basic_string > > testing::StartsWith(int)’:
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:4334:60: error: ‘prefix’ was not declared in this scope; did you mean ‘profil’?
4334 | internal::StartsWithMatcherstd::string(std::string(prefix)));
| ^~~~~~
| profil
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h: At global scope:
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:4340:21: error: ‘StringLike’ in namespace ‘testing::internal’ does not name a template type; did you mean ‘Strings’?
4340 | const internal::StringLike& suffix) {
| ^~~~~~~~~~
| Strings
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:4340:31: error: expected ‘,’ or ‘...’ before ‘<’ token
4340 | const internal::StringLike& suffix) {
| ^
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h: In function ‘testing::PolymorphicMatcher<testing::internal::EndsWithMatcher<std::__cxx11::basic_string > > testing::EndsWith(int)’:
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:4342:58: error: ‘suffix’ was not declared in this scope
4342 | internal::EndsWithMatcherstd::string(std::string(suffix)));
| ^~~~~~
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h: In member function ‘bool testing::internal::ExceptionMatcherImpl::MatchAndExplain(T&&, testing::MatchResultListener
) const’:
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:5150:65: error: no matching function for call to ‘GetTypeName(const std::type_info&)’
5150 | *listener << "throws an exception of type " << GetTypeName(typeid(err));
| ~~~~~~~~~~~^~~~~~~~~~~~~
In file included from /opt/ros/humble/src/gtest_vendor/include/gtest/internal/gtest-internal.h:67,
from /opt/ros/humble/src/gtest_vendor/include/gtest/gtest.h:62,
from /usr/src/googletest/googlemock/include/gmock/internal/gmock-internal-utils.h:47,
from /usr/src/googletest/googlemock/include/gmock/gmock-actions.h:145,
from /usr/src/googletest/googlemock/include/gmock/gmock.h:59,
from /home/student/isaac_ros_ws/src/isaac_ros_image_pipeline/isaac_ros_image_proc/test/resize_node_test.cpp:18:
/opt/ros/humble/src/gtest_vendor/include/gtest/internal/gtest-type-util.h:80:13: note: candidate: ‘template std::string testing::internal::GetTypeName()’
80 | std::string GetTypeName() {
| ^~~~~~~~~~~
/opt/ros/humble/src/gtest_vendor/include/gtest/internal/gtest-type-util.h:80:13: note: template argument deduction/substitution failed:
In file included from /usr/src/googletest/googlemock/include/gmock/gmock-spec-builders.h:75,
from /usr/src/googletest/googlemock/include/gmock/gmock-function-mocker.h:42,
from /usr/src/googletest/googlemock/include/gmock/gmock.h:61,
from /home/student/isaac_ros_ws/src/isaac_ros_image_pipeline/isaac_ros_image_proc/test/resize_node_test.cpp:18:
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:5150:65: note: candidate expects 0 arguments, 1 provided
5150 | listener << "throws an exception of type " << GetTypeName(typeid(err));
| ~~~~~~~~~~~^~~~~~~~~~~~~
In file included from /usr/src/googletest/googlemock/include/gmock/gmock-spec-builders.h:75,
from /usr/src/googletest/googlemock/include/gmock/gmock-function-mocker.h:42,
from /usr/src/googletest/googlemock/include/gmock/gmock.h:61,
from /home/student/isaac_ros_ws/src/isaac_ros_image_pipeline/isaac_ros_image_proc/test/crop_node_test.cpp:18:
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h: In member function ‘testing::internal::FieldsAreMatcher::operator testing::Matcher() const’:
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:3165:49: error: ‘IndexSequenceFor’ was not declared in this scope; did you mean ‘IndexSequence’?
3165 | new FieldsAreMatcherImpl<const Struct&, IndexSequenceFor<Inner...>>(
| ^~~~~~~~~~~~~~~~
| IndexSequence
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:3165:71: error: expected parameter pack before ‘...’
3165 | new FieldsAreMatcherImpl<const Struct&, IndexSequenceFor<Inner...>>(
| ^~~
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:3165:71: error: template argument 2 is invalid
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h: At global scope:
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:4291:21: error: ‘StringLike’ in namespace ‘testing::internal’ does not name a template type; did you mean ‘Strings’?
4291 | const internal::StringLike& str) {
| ^~~~~~~~~~
| Strings
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:4291:31: error: expected ‘,’ or ‘...’ before ‘<’ token
4291 | const internal::StringLike& str) {
| ^
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h: In function ‘testing::PolymorphicMatcher<testing::internal::StrEqualityMatcher<std::__cxx11::basic_string > > testing::StrEq(int)’:
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:4293:61: error: ‘str’ was not declared in this scope; did you mean ‘std’?
4293 | internal::StrEqualityMatcherstd::string(std::string(str), true, true));
| ^~~
| std
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h: At global scope:
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:4299:21: error: ‘StringLike’ in namespace ‘testing::internal’ does not name a template type; did you mean ‘Strings’?
4299 | const internal::StringLike& str) {
| ^~~~~~~~~~
| Strings
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:4299:31: error: expected ‘,’ or ‘...’ before ‘<’ token
4299 | const internal::StringLike& str) {
| ^
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h: In function ‘testing::PolymorphicMatcher<testing::internal::StrEqualityMatcher<std::__cxx11::basic_string > > testing::StrNe(int)’:
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:4301:61: error: ‘str’ was not declared in this scope; did you mean ‘std’?
4301 | internal::StrEqualityMatcherstd::string(std::string(str), false, true));
| ^~~
| std
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h: At global scope:
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:4307:21: error: ‘StringLike’ in namespace ‘testing::internal’ does not name a template type; did you mean ‘Strings’?
4307 | const internal::StringLike& str) {
| ^~~~~~~~~~
| Strings
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:4307:31: error: expected ‘,’ or ‘...’ before ‘<’ token
4307 | const internal::StringLike& str) {
| ^
In file included from /usr/src/googletest/googlemock/include/gmock/gmock.h:63,
from /home/student/isaac_ros_ws/src/isaac_ros_image_pipeline/isaac_ros_image_proc/test/resize_node_test.cpp:18:
/usr/src/googletest/googlemock/include/gmock/gmock-more-actions.h: In member function ‘decltype (testing::internal::InvokeArgument(get(std::forward_as_tuple((forward)(args)...)), (declval<const Params&>)()...)) testing::internal::InvokeArgumentAction<index, Params>::operator()(Args&& ...) const’:
/usr/src/googletest/googlemock/include/gmock/gmock-more-actions.h:519:47: error: ‘FlatTupleConstructTag’ was not declared in this scope
519 | internal::FlatTuple<Args&&...> args_tuple(FlatTupleConstructTag{},
| ^~~~~~~~~~~~~~~~~~~~~
/usr/src/googletest/googlemock/include/gmock/gmock-more-actions.h: In function ‘testing::internal::InvokeArgumentAction<index, typename std::decay::type ...> testing::InvokeArgument(Params&& ...)’:
/usr/src/googletest/googlemock/include/gmock/gmock-more-actions.h:564:17: error: ‘FlatTupleConstructTag’ is not a member of ‘testing::internal’
564 | internal::FlatTupleConstructTag{}, std::forward(params)...)};
| ^~~~~~~~~~~~~~~~~~~~~
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h: In function ‘testing::PolymorphicMatcher<testing::internal::StrEqualityMatcher<std::__cxx11::basic_string > > testing::StrCaseEq(int)’:
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:4309:61: error: ‘str’ was not declared in this scope; did you mean ‘std’?
4309 | internal::StrEqualityMatcherstd::string(std::string(str), true, false));
| ^~~
| std
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h: At global scope:
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:4315:21: error: ‘StringLike’ in namespace ‘testing::internal’ does not name a template type; did you mean ‘Strings’?
4315 | const internal::StringLike& str) {
| ^~~~~~~~~~
| Strings
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:4315:31: error: expected ‘,’ or ‘...’ before ‘<’ token
4315 | const internal::StringLike& str) {
| ^
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h: In function ‘testing::PolymorphicMatcher<testing::internal::StrEqualityMatcher<std::__cxx11::basic_string > > testing::StrCaseNe(int)’:
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:4317:19: error: ‘str’ was not declared in this scope; did you mean ‘std’?
4317 | std::string(str), false, false));
| ^~~
| std
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h: At global scope:
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:4324:21: error: ‘StringLike’ in namespace ‘testing::internal’ does not name a template type; did you mean ‘Strings’?
4324 | const internal::StringLike& substring) {
| ^~~~~~~~~~
| Strings
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:4324:31: error: expected ‘,’ or ‘...’ before ‘<’ token
4324 | const internal::StringLike& substring) {
| ^
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h: In function ‘testing::PolymorphicMatcher<testing::internal::HasSubstrMatcher<std::__cxx11::basic_string > > testing::HasSubstr(int)’:
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:4326:59: error: ‘substring’ was not declared in this scope; did you mean ‘IsSubstring’?
4326 | internal::HasSubstrMatcherstd::string(std::string(substring)));
| ^~~~~~~~~
| IsSubstring
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h: At global scope:
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:4332:21: error: ‘StringLike’ in namespace ‘testing::internal’ does not name a template type; did you mean ‘Strings’?
4332 | const internal::StringLike& prefix) {
| ^~~~~~~~~~
| Strings
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:4332:31: error: expected ‘,’ or ‘...’ before ‘<’ token
4332 | const internal::StringLike& prefix) {
| ^
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h: In function ‘testing::PolymorphicMatcher<testing::internal::StartsWithMatcher<std::__cxx11::basic_string > > testing::StartsWith(int)’:
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:4334:60: error: ‘prefix’ was not declared in this scope; did you mean ‘profil’?
4334 | internal::StartsWithMatcherstd::string(std::string(prefix)));
| ^~~~~~
| profil
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h: At global scope:
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:4340:21: error: ‘StringLike’ in namespace ‘testing::internal’ does not name a template type; did you mean ‘Strings’?
4340 | const internal::StringLike& suffix) {
| ^~~~~~~~~~
| Strings
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:4340:31: error: expected ‘,’ or ‘...’ before ‘<’ token
4340 | const internal::StringLike& suffix) {
| ^
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h: In function ‘testing::PolymorphicMatcher<testing::internal::EndsWithMatcher<std::__cxx11::basic_string > > testing::EndsWith(int)’:
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:4342:58: error: ‘suffix’ was not declared in this scope
4342 | internal::EndsWithMatcherstd::string(std::string(suffix)));
| ^~~~~~
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h: In member function ‘bool testing::internal::ExceptionMatcherImpl::MatchAndExplain(T&&, testing::MatchResultListener
) const’:
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:5150:65: error: no matching function for call to ‘GetTypeName(const std::type_info&)’
5150 | *listener << "throws an exception of type " << GetTypeName(typeid(err));
| ~~~~~~~~~~~^~~~~~~~~~~~~
In file included from /opt/ros/humble/src/gtest_vendor/include/gtest/internal/gtest-internal.h:67,
from /opt/ros/humble/src/gtest_vendor/include/gtest/gtest.h:62,
from /usr/src/googletest/googlemock/include/gmock/internal/gmock-internal-utils.h:47,
from /usr/src/googletest/googlemock/include/gmock/gmock-actions.h:145,
from /usr/src/googletest/googlemock/include/gmock/gmock.h:59,
from /home/student/isaac_ros_ws/src/isaac_ros_image_pipeline/isaac_ros_image_proc/test/crop_node_test.cpp:18:
/opt/ros/humble/src/gtest_vendor/include/gtest/internal/gtest-type-util.h:80:13: note: candidate: ‘template std::string testing::internal::GetTypeName()’
80 | std::string GetTypeName() {
| ^~~~~~~~~~~
/opt/ros/humble/src/gtest_vendor/include/gtest/internal/gtest-type-util.h:80:13: note: template argument deduction/substitution failed:
In file included from /usr/src/googletest/googlemock/include/gmock/gmock-spec-builders.h:75,
from /usr/src/googletest/googlemock/include/gmock/gmock-function-mocker.h:42,
from /usr/src/googletest/googlemock/include/gmock/gmock.h:61,
from /home/student/isaac_ros_ws/src/isaac_ros_image_pipeline/isaac_ros_image_proc/test/crop_node_test.cpp:18:
/usr/src/googletest/googlemock/include/gmock/gmock-matchers.h:5150:65: note: candidate expects 0 arguments, 1 provided
5150 | *listener << "throws an exception of type " << GetTypeName(typeid(err));
| ~~~~~~~~~~~^~~~~~~~~~~~~
In file included from /usr/src/googletest/googlemock/include/gmock/gmock.h:63,
from /home/student/isaac_ros_ws/src/isaac_ros_image_pipeline/isaac_ros_image_proc/test/crop_node_test.cpp:18:
/usr/src/googletest/googlemock/include/gmock/gmock-more-actions.h: In member function ‘decltype (testing::internal::InvokeArgument(get(std::forward_as_tuple((forward)(args)...)), (declval<const Params&>)()...)) testing::internal::InvokeArgumentAction<index, Params>::operator()(Args&& ...) const’:
/usr/src/googletest/googlemock/include/gmock/gmock-more-actions.h:519:47: error: ‘FlatTupleConstructTag’ was not declared in this scope
519 | internal::FlatTuple<Args&&...> args_tuple(FlatTupleConstructTag{},
| ^~~~~~~~~~~~~~~~~~~~~
/usr/src/googletest/googlemock/include/gmock/gmock-more-actions.h: In function ‘testing::internal::InvokeArgumentAction<index, typename std::decay::type ...> testing::InvokeArgument(Params&& ...)’:
/usr/src/googletest/googlemock/include/gmock/gmock-more-actions.h:564:17: error: ‘FlatTupleConstructTag’ is not a member of ‘testing::internal’
564 | internal::FlatTupleConstructTag{}, std::forward(params)...)};
| ^~~~~~~~~~~~~~~~~~~~~
gmake[2]: *** [CMakeFiles/crop_node_test.dir/build.make:76: CMakeFiles/crop_node_test.dir/test/crop_node_test.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:404: CMakeFiles/crop_node_test.dir/all] Error 2
gmake[1]: *** Waiting for unfinished jobs....
gmake[2]: *** [CMakeFiles/image_format_converter_node_test.dir/build.make:76: CMakeFiles/image_format_converter_node_test.dir/test/image_format_converter_node_test.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:372: CMakeFiles/image_format_converter_node_test.dir/all] Error 2
gmake[2]: *** [CMakeFiles/resize_node_test.dir/build.make:76: CMakeFiles/resize_node_test.dir/test/resize_node_test.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:434: CMakeFiles/resize_node_test.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2

Failed <<< isaac_ros_image_proc [20.8s, exited with code 2]

@Andrewshin-7th-technology-student

The issue you're experiencing is due to a mismatch between the version of GoogleTest used by your project and the version of GoogleMock used by the isaac_ros_image_pipeline package.

The error messages indicate that the isaac_ros_image_pipeline package is using a version of GoogleMock that is not compatible with the version of GoogleTest provided by ROS Humble.

To fix this issue, you can try the following:

Update GoogleTest: Make sure you're using the latest version of GoogleTest. You can check the version of GoogleTest by running dpkg -l | grep gtest. If you're not using the latest version, you can update it by running sudo apt-get update && sudo apt-get install ros-humble-gtest-vendor.
Use a compatible version of GoogleMock: You can try using a version of GoogleMock that is compatible with the version of GoogleTest provided by ROS Humble. You can do this by adding the following lines to your CMakeLists.txt file:
cmake

find_package(GoogleTest 1.10.0.9006 REQUIRED)
find_package(GoogleMock 1.10.0.9006 REQUIRED)

Use a different version of the isaac_ros_image_pipeline package: If the above steps don't work, you can try using a different version of the isaac_ros_image_pipeline package that is compatible with the version of GoogleTest provided by ROS Humble.
Build GoogleTest and GoogleMock from source: If none of the above steps work, you can try building GoogleTest and GoogleMock from source. This will allow you to use the latest versions of these libraries, which may be compatible with the isaac_ros_image_pipeline package.
To build GoogleTest and GoogleMock from source, you can follow these steps:

Clone the GoogleTest repository: git clone https://github.com/google/googletest.git
Clone the GoogleMock repository: git clone https://github.com/google/googletest/tree/master/googlemock
Build GoogleTest: cd googletest && mkdir build && cd build && cmake .. && make
Build GoogleMock: cd googletest/googlemock && mkdir build && cd build && cmake .. && make
Install GoogleTest and GoogleMock: sudo make install
After building and installing GoogleTest and GoogleMock, you can update your CMakeLists.txt file to use the built versions of these libraries.

find_package(GoogleTest REQUIRED)
find_package(GoogleMock REQUIRED)

Note that building GoogleTest and GoogleMock from source can be a complex process, and may require additional dependencies and configuration.

@jdcast
Copy link

jdcast commented Oct 15, 2024

The issue you're experiencing is due to a mismatch between the version of GoogleTest used by your project and the version of GoogleMock used by the isaac_ros_image_pipeline package.

The error messages indicate that the isaac_ros_image_pipeline package is using a version of GoogleMock that is not compatible with the version of GoogleTest provided by ROS Humble.

To fix this issue, you can try the following:

Update GoogleTest: Make sure you're using the latest version of GoogleTest. You can check the version of GoogleTest by running dpkg -l | grep gtest. If you're not using the latest version, you can update it by running sudo apt-get update && sudo apt-get install ros-humble-gtest-vendor. Use a compatible version of GoogleMock: You can try using a version of GoogleMock that is compatible with the version of GoogleTest provided by ROS Humble. You can do this by adding the following lines to your CMakeLists.txt file: cmake

find_package(GoogleTest 1.10.0.9006 REQUIRED) find_package(GoogleMock 1.10.0.9006 REQUIRED)

Use a different version of the isaac_ros_image_pipeline package: If the above steps don't work, you can try using a different version of the isaac_ros_image_pipeline package that is compatible with the version of GoogleTest provided by ROS Humble. Build GoogleTest and GoogleMock from source: If none of the above steps work, you can try building GoogleTest and GoogleMock from source. This will allow you to use the latest versions of these libraries, which may be compatible with the isaac_ros_image_pipeline package. To build GoogleTest and GoogleMock from source, you can follow these steps:

Clone the GoogleTest repository: git clone https://github.com/google/googletest.git Clone the GoogleMock repository: git clone https://github.com/google/googletest/tree/master/googlemock Build GoogleTest: cd googletest && mkdir build && cd build && cmake .. && make Build GoogleMock: cd googletest/googlemock && mkdir build && cd build && cmake .. && make Install GoogleTest and GoogleMock: sudo make install After building and installing GoogleTest and GoogleMock, you can update your CMakeLists.txt file to use the built versions of these libraries.

find_package(GoogleTest REQUIRED) find_package(GoogleMock REQUIRED)

Note that building GoogleTest and GoogleMock from source can be a complex process, and may require additional dependencies and configuration.

I meet this follow-on error when trying your suggestions (I should also note that it does not work to try and git clone googlemock precisely as you mentioned):

--- stderr: isaac_ros_image_proc                                                                                                                                                                                   
CMake Error at CMakeLists.txt:25 (find_package):                                                                                                                                                                   
  By not providing "FindGoogleTest.cmake" in CMAKE_MODULE_PATH this project                                                                                                                                        
  has asked CMake to find a package configuration file provided by                                                                                                                                                 
  "GoogleTest", but CMake did not find one.                                                                                                                                                                        
                                                                                                                                                                                                                   
  Could not find a package configuration file provided by "GoogleTest" with                                                                                                                                        
  any of the following names:                                                                                                                                                                                      
                                                                                                                                                                                                                   
    GoogleTestConfig.cmake                                                                                                                                                                                         
    googletest-config.cmake                                                                                                                                                                                        
                                                                                                                                                                                                                   
  Add the installation prefix of "GoogleTest" to CMAKE_PREFIX_PATH or set                                                                                                                                          
  "GoogleTest_DIR" to a directory containing one of the above files.  If                                                                                                                                           
  "GoogleTest" provides a separate development package or SDK, be sure it has                                                                                                                                      
  been installed.                                                                                                                                                                                                  
                                                                                                                                                                                                                   
                                                                                                                                                                                                                   
gmake: *** [Makefile:664: cmake_check_build_system] Error 1

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

3 participants