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

ros-noetic-tf fails install due to C++ version and gtest #3

Open
ploedige opened this issue Mar 23, 2023 · 2 comments
Open

ros-noetic-tf fails install due to C++ version and gtest #3

ploedige opened this issue Mar 23, 2023 · 2 comments

Comments

@ploedige
Copy link

When I try to install the ros-noetic-desktop-full package it fails on ros-noetic-tf.
The error message is:

[ 80%] Building CXX object googletest/CMakeFiles/gtest.dir/src/gtest-all.cc.o
In file included from /usr/include/gtest/gtest-message.h:57,
                 from /usr/include/gtest/gtest-assertion-result.h:46,
                 from /usr/include/gtest/gtest.h:64,
                 from /usr/src/googletest/src/gtest-all.cc:38:
/usr/include/gtest/internal/gtest-port.h:270:2: error: #error C++ versions less than C++14 are not supported.
  270 | #error C++ versions less than C++14 are not supported.
      |  ^~~~~
In file included from /usr/include/gtest/gtest-printers.h:115,
                 from /usr/include/gtest/gtest-matchers.h:48,
                 from /usr/include/gtest/internal/gtest-death-test-internal.h:47,
                 from /usr/include/gtest/gtest-death-test.h:43,
                 from /usr/include/gtest/gtest.h:65:
/usr/include/gtest/internal/gtest-internal.h:636:58: error: wrong number of template arguments (0, should be 1)
  636 |   typedef ::std::map<std::string, CodeLocation, std::less<>> RegisteredTestsMap;
      |                                                          ^
In file included from /usr/include/c++/12.2.1/string:48,
                 from /usr/include/c++/12.2.1/bits/locale_classes.h:40,
                 from /usr/include/c++/12.2.1/bits/ios_base.h:41,
                 from /usr/include/c++/12.2.1/iomanip:40,
                 from /usr/include/gtest/gtest.h:54:
/usr/include/c++/12.2.1/bits/stl_function.h:403:12: note: provided for ‘template<class _Tp> struct std::less’
  403 |     struct less : public binary_function<_Tp, _Tp, bool>
      |            ^~~~
/usr/include/gtest/internal/gtest-internal.h:636:59: error: template argument 3 is invalid
  636 |   typedef ::std::map<std::string, CodeLocation, std::less<>> RegisteredTestsMap;
      |                                                           ^~
/usr/include/gtest/internal/gtest-internal.h: In member function ‘bool testing::internal::TypedTestSuitePState::AddTestName(const char*, int, const char*, const char*)’:
/usr/include/gtest/internal/gtest-internal.h:613:23: error: request for member ‘insert’ in ‘((testing::internal::TypedTestSuitePState*)this)->testing::internal::TypedTestSuitePState::registered_tests_’, which is of non-class type ‘testing::internal::TypedTestSuitePState::RegisteredTestsMap’ {aka ‘int’}
  613 |     registered_tests_.insert(
      |                       ^~~~~~
/usr/include/gtest/internal/gtest-internal.h: In member function ‘bool testing::internal::TypedTestSuitePState::TestExists(const std::string&) const’:
/usr/include/gtest/internal/gtest-internal.h:619:30: error: request for member ‘count’ in ‘((const testing::internal::TypedTestSuitePState*)this)->testing::internal::TypedTestSuitePState::registered_tests_’, which is of non-class type ‘const testing::internal::TypedTestSuitePState::RegisteredTestsMap’ {aka ‘const int’}
  619 |     return registered_tests_.count(test_name) > 0;
      |                              ^~~~~
/usr/include/gtest/internal/gtest-internal.h: In member function ‘const testing::internal::CodeLocation& testing::internal::TypedTestSuitePState::GetCodeLocation(const std::string&) const’:
/usr/include/gtest/internal/gtest-internal.h:623:40: error: qualified-id in declaration before ‘it’
  623 |     RegisteredTestsMap::const_iterator it = registered_tests_.find(test_name);
      |                                        ^~
/usr/include/gtest/internal/gtest-internal.h:624:5: error: ‘it’ was not declared in this scope; did you mean ‘int’?
  624 |     GTEST_CHECK_(it != registered_tests_.end());
      |     ^~~~~~~~~~~~
/usr/include/gtest/internal/gtest-internal.h:624:5: error: request for member ‘end’ in ‘((const testing::internal::TypedTestSuitePState*)this)->testing::internal::TypedTestSuitePState::registered_tests_’, which is of non-class type ‘const testing::internal::TypedTestSuitePState::RegisteredTestsMap’ {aka ‘const int’}
  624 |     GTEST_CHECK_(it != registered_tests_.end());
      |     ^~~~~~~~~~~~
/usr/include/gtest/internal/gtest-internal.h:625:12: error: ‘it’ was not declared in this scope; did you mean ‘int’?
  625 |     return it->second;
      |            ^~
      |            int
In file included from /usr/src/googletest/src/gtest-all.cc:48:
/usr/src/googletest/src/gtest-typed-test.cc: In member function ‘const char* testing::internal::TypedTestSuitePState::VerifyRegisteredTestNames(const char*, const char*, int, const char*)’:
/usr/src/googletest/src/gtest-typed-test.cc:61:46: error: qualified-id in declaration before ‘RegisteredTestIter’
   61 |   typedef RegisteredTestsMap::const_iterator RegisteredTestIter;
      |                                              ^~~~~~~~~~~~~~~~~~
/usr/src/googletest/src/gtest-typed-test.cc:77:27: error: request for member ‘count’ in ‘((testing::internal::TypedTestSuitePState*)this)->testing::internal::TypedTestSuitePState::registered_tests_’, which is of non-class type ‘testing::internal::TypedTestSuitePState::RegisteredTestsMap’ {aka ‘int’}
   77 |     if (registered_tests_.count(name) != 0) {
      |                           ^~~~~
/usr/src/googletest/src/gtest-typed-test.cc:85:8: error: ‘RegisteredTestIter’ was not declared in this scope; did you mean ‘RegisteredTestsMap’?
   85 |   for (RegisteredTestIter it = registered_tests_.begin();
      |        ^~~~~~~~~~~~~~~~~~
      |        RegisteredTestsMap
/usr/src/googletest/src/gtest-typed-test.cc:86:8: error: ‘it’ was not declared in this scope; did you mean ‘Lt’?
   86 |        it != registered_tests_.end(); ++it) {
      |        ^~
      |        Lt
/usr/src/googletest/src/gtest-typed-test.cc:86:32: error: request for member ‘end’ in ‘((testing::internal::TypedTestSuitePState*)this)->testing::internal::TypedTestSuitePState::registered_tests_’, which is of non-class type ‘testing::internal::TypedTestSuitePState::RegisteredTestsMap’ {aka ‘int’}
   86 |        it != registered_tests_.end(); ++it) {
      |                                ^~~
make[2]: *** [googletest/CMakeFiles/gtest.dir/build.make:76: googletest/CMakeFiles/gtest.dir/src/gtest-all.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:3020: googletest/CMakeFiles/gtest.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...
 -> error making: ros-noetic-tf
@AchmadFathoni
Copy link
Contributor

You can install ros-noetic in arch using conda provided by Robostack channel

@acxz acxz transferred this issue from ros-noetic-arch/ros-noetic-desktop-full May 5, 2023
@acxz
Copy link
Member

acxz commented May 5, 2023

patched with: 9c8ba3d

upstream issue: ros/geometry#233

with help from @mrcn (https://aur.archlinux.org/packages/ros-noetic-tf#comment-911020)

Hello, the package fails to compile now, due to the updates made to gtest and boost (see https://github.com/ros-noetic-arch/ros-noetic-desktop-full/issues/46 ). There is a patch that has been available in the upstream repository for a while (see ros/geometry#233 ), but it has not been merged yet. Maybe we can include the patch in this AUR package.

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

No branches or pull requests

3 participants