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

Build error with examples on macOS with apple clang #189

Closed
ClausKlein opened this issue Feb 4, 2021 · 1 comment · Fixed by #190
Closed

Build error with examples on macOS with apple clang #189

ClausKlein opened this issue Feb 4, 2021 · 1 comment · Fixed by #190

Comments

@ClausKlein
Copy link
Contributor

examples$> ./build_all.py
# . . .

running example gtest
=====================
- cmake -Hgtest -Bbuild/gtest
  -- CPM: adding package Format.cmake@1.0 (v1.0 at /Users/clausklein/.cache/CPM/format.cmake/c5897bd28c5032d45f7f669c8fb470790d2ae156)
  -- CPM: adding package fibonacci@2.0 (v2.0 at /Users/clausklein/.cache/CPM/fibonacci/5536f7aeb12d179096312a2cfc8b9437ac761bd6)
  -- CPM: adding package googletest@1.8.1 (release-1.8.1 at /Users/clausklein/.cache/CPM/googletest/fa7d3a96e167d35883c622b7db96dda86ebdaaf0)
- cmake --build build/gtest -j4
error while running 'cmake --build build/gtest -j4':
   In file included from /Users/clausklein/.cache/CPM/googletest/fa7d3a96e167d35883c622b7db96dda86ebdaaf0/googlemock/src/gmock-all.cc:39:
  In file included from /Users/clausklein/.cache/CPM/googletest/fa7d3a96e167d35883c622b7db96dda86ebdaaf0/googlemock/include/gmock/gmock.h:62:
  In file included from /Users/clausklein/.cache/CPM/googletest/fa7d3a96e167d35883c622b7db96dda86ebdaaf0/googlemock/include/gmock/gmock-generated-function-mockers.h:44:
  In file included from /Users/clausklein/.cache/CPM/googletest/fa7d3a96e167d35883c622b7db96dda86ebdaaf0/googlemock/include/gmock/gmock-spec-builders.h:71:
  /Users/clausklein/.cache/CPM/googletest/fa7d3a96e167d35883c622b7db96dda86ebdaaf0/googlemock/include/gmock/gmock-matchers.h:3008:8: error: no template named 'IsHashTable'
        !IsHashTable<GTEST_REMOVE_REFERENCE_AND_CONST_(RhsContainer)>::value,
         ^
  /Users/clausklein/.cache/CPM/googletest/fa7d3a96e167d35883c622b7db96dda86ebdaaf0/googlemock/include/gmock/gmock-matchers.h:3008:8: error: no template named 'IsHashTable'
  /Users/clausklein/.cache/CPM/googletest/fa7d3a96e167d35883c622b7db96dda86ebdaaf0/googlemock/include/gmock/gmock-matchers.h:3029:10: error: no template named 'IsHashTable'
          !IsHashTable<GTEST_REMOVE_REFERENCE_AND_CONST_(LhsContainer)>::value,
           ^
  /Users/clausklein/.cache/CPM/googletest/fa7d3a96e167d35883c622b7db96dda86ebdaaf0/googlemock/include/gmock/gmock-matchers.h:3029:10: error: no template named 'IsHashTable'
  /Users/clausklein/.cache/CPM/googletest/fa7d3a96e167d35883c622b7db96dda86ebdaaf0/googlemock/include/gmock/gmock-matchers.h:3867:10: error: no template named 'IsHashTable'
          !IsHashTable<GTEST_REMOVE_REFERENCE_AND_CONST_(Container)>::value ||
           ^
  /Users/clausklein/.cache/CPM/googletest/fa7d3a96e167d35883c622b7db96dda86ebdaaf0/googlemock/include/gmock/gmock-matchers.h:3867:10: error: no template named 'IsHashTable'
  /Users/clausklein/.cache/CPM/googletest/fa7d3a96e167d35883c622b7db96dda86ebdaaf0/googlemock/include/gmock/gmock-matchers.h:3920:10: error: no template named 'IsHashTable'
          !IsHashTable<GTEST_REMOVE_REFERENCE_AND_CONST_(Container)>::value,
           ^
  /Users/clausklein/.cache/CPM/googletest/fa7d3a96e167d35883c622b7db96dda86ebdaaf0/googlemock/include/gmock/gmock-matchers.h:3920:10: error: no template named 'IsHashTable'
  In file included from /Users/clausklein/.cache/CPM/googletest/fa7d3a96e167d35883c622b7db96dda86ebdaaf0/googlemock/src/gmock-all.cc:39:
  In file included from /Users/clausklein/.cache/CPM/googletest/fa7d3a96e167d35883c622b7db96dda86ebdaaf0/googlemock/include/gmock/gmock.h:62:
  /Users/clausklein/.cache/CPM/googletest/fa7d3a96e167d35883c622b7db96dda86ebdaaf0/googlemock/include/gmock/gmock-generated-function-mockers.h:101:43: error: no template named 'forward' in namespace 'testing::internal'; did you mean 'std::forward'?
      return this->InvokeWith(ArgumentTuple(internal::forward<A1>(a1)));
                                            ^~~~~~~~~~~~~~~~~
                                            std::forward
  /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/type_traits:2273:1: note: 'std::forward' declared here
  forward(typename remove_reference<_Tp>::type& __t) _NOEXCEPT
  ^
  In file included from /Users/clausklein/.cache/CPM/googletest/fa7d3a96e167d35883c622b7db96dda86ebdaaf0/googlemock/src/gmock-all.cc:39:
  In file included from /Users/clausklein/.cache/CPM/googletest/fa7d3a96e167d35883c622b7db96dda86ebdaaf0/googlemock/include/gmock/gmock.h:62:
  /Users/clausklein/.cache/CPM/googletest/fa7d3a96e167d35883c622b7db96dda86ebdaaf0/googlemock/include/gmock/gmock-generated-function-mockers.h:101:43: error: no template named 'forward' in namespace 'testing::internal'; did you mean 'std::forward'?
      return this->InvokeWith(ArgumentTuple(internal::forward<A1>(a1)));
                                            ^~~~~~~~~~~~~~~~~
                                            std::forward
  /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/type_traits:2273:1: note: 'std::forward' declared here
  forward(typename remove_reference<_Tp>::type& __t) _NOEXCEPT
  ^
  In file included from /Users/clausklein/.cache/CPM/googletest/fa7d3a96e167d35883c622b7db96dda86ebdaaf0/googlemock/src/gmock-all.cc:39:
  In file included from /Users/clausklein/.cache/CPM/googletest/fa7d3a96e167d35883c622b7db96dda86ebdaaf0/googlemock/include/gmock/gmock.h:62:
  /Users/clausklein/.cache/CPM/googletest/fa7d3a96e167d35883c622b7db96dda86ebdaaf0/googlemock/include/gmock/gmock-generated-function-mockers.h:121:43: error: no template named 'forward' in namespace 'testing::internal'; did you mean 'std::forward'?
      return this->InvokeWith(ArgumentTuple(internal::forward<A1>(a1),
                                            ^~~~~~~~~~~~~~~~~
                                            std::forward
  /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/type_traits:2273:1: note: 'std::forward' declared here
  forward(typename remove_reference<_Tp>::type& __t) _NOEXCEPT
  ^
  In file included from /Users/clausklein/.cache/CPM/googletest/fa7d3a96e167d35883c622b7db96dda86ebdaaf0/googlemock/src/gmock-all.cc:39:
  In file included from /Users/clausklein/.cache/CPM/googletest/fa7d3a96e167d35883c622b7db96dda86ebdaaf0/googlemock/include/gmock/gmock.h:62:
  /Users/clausklein/.cache/CPM/googletest/fa7d3a96e167d35883c622b7db96dda86ebdaaf0/googlemock/include/gmock/gmock-generated-function-mockers.h:121:43: error: no template named 'forward' in namespace 'testing::internal'; did you mean 'std::forward'?
      return this->InvokeWith(ArgumentTuple(internal::forward<A1>(a1),
                                            ^~~~~~~~~~~~~~~~~
                                            std::forward
  /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/type_traits:2273:1: note: 'std::forward' declared here
  forward(typename remove_reference<_Tp>::type& __t) _NOEXCEPT
  ^
  In file included from /Users/clausklein/.cache/CPM/googletest/fa7d3a96e167d35883c622b7db96dda86ebdaaf0/googlemock/src/gmock-all.cc:39:
  In file included from /Users/clausklein/.cache/CPM/googletest/fa7d3a96e167d35883c622b7db96dda86ebdaaf0/googlemock/include/gmock/gmock.h:62:
  /Users/clausklein/.cache/CPM/googletest/fa7d3a96e167d35883c622b7db96dda86ebdaaf0/googlemock/include/gmock/gmock-generated-function-mockers.h:122:9: error: no template named 'forward' in namespace 'testing::internal'; did you mean 'std::forward'?
          internal::forward<A2>(a2)));
          ^~~~~~~~~~~~~~~~~
          std::forward
  /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/type_traits:2273:1: note: 'std::forward' declared here
  forward(typename remove_reference<_Tp>::type& __t) _NOEXCEPT
  ^
  In file included from /Users/clausklein/.cache/CPM/googletest/fa7d3a96e167d35883c622b7db96dda86ebdaaf0/googlemock/src/gmock-all.cc:39:
  In file included from /Users/clausklein/.cache/CPM/googletest/fa7d3a96e167d35883c622b7db96dda86ebdaaf0/googlemock/include/gmock/gmock.h:62:
  /Users/clausklein/.cache/CPM/googletest/fa7d3a96e167d35883c622b7db96dda86ebdaaf0/googlemock/include/gmock/gmock-generated-function-mockers.h:122:9: error: no template named 'forward' in namespace 'testing::internal'; did you mean 'std::forward'?
          internal::forward<A2>(a2)));
          ^~~~~~~~~~~~~~~~~
          std::forward
  /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/type_traits:2273:1: note: 'std::forward' declared here
  forward(typename remove_reference<_Tp>::type& __t) _NOEXCEPT
  ^
  In file included from /Users/clausklein/.cache/CPM/googletest/fa7d3a96e167d35883c622b7db96dda86ebdaaf0/googlemock/src/gmock-all.cc:39:
  In file included from /Users/clausklein/.cache/CPM/googletest/fa7d3a96e167d35883c622b7db96dda86ebdaaf0/googlemock/include/gmock/gmock.h:62:
  /Users/clausklein/.cache/CPM/googletest/fa7d3a96e167d35883c622b7db96dda86ebdaaf0/googlemock/include/gmock/gmock-generated-function-mockers.h:143:43: error: no template named 'forward' in namespace 'testing::internal'; did you mean 'std::forward'?
      return this->InvokeWith(ArgumentTuple(internal::forward<A1>(a1),
                                            ^~~~~~~~~~~~~~~~~
                                            std::forward
  /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/type_traits:2273:1: note: 'std::forward' declared here
  forward(typename remove_reference<_Tp>::type& __t) _NOEXCEPT
  ^
  In file included from /Users/clausklein/.cache/CPM/googletest/fa7d3a96e167d35883c622b7db96dda86ebdaaf0/googlemock/src/gmock-all.cc:39:
  In file included from /Users/clausklein/.cache/CPM/googletest/fa7d3a96e167d35883c622b7db96dda86ebdaaf0/googlemock/include/gmock/gmock.h:62:
  /Users/clausklein/.cache/CPM/googletest/fa7d3a96e167d35883c622b7db96dda86ebdaaf0/googlemock/include/gmock/gmock-generated-function-mockers.h:143:43: error: no template named 'forward' in namespace 'testing::internal'; did you mean 'std::forward'?
      return this->InvokeWith(ArgumentTuple(internal::forward<A1>(a1),
                                            ^~~~~~~~~~~~~~~~~
                                            std::forward
  /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/type_traits:2273:1: note: 'std::forward' declared here
  forward(typename remove_reference<_Tp>::type& __t) _NOEXCEPT
  ^
  In file included from /Users/clausklein/.cache/CPM/googletest/fa7d3a96e167d35883c622b7db96dda86ebdaaf0/googlemock/src/gmock-all.cc:39:
  In file included from /Users/clausklein/.cache/CPM/googletest/fa7d3a96e167d35883c622b7db96dda86ebdaaf0/googlemock/include/gmock/gmock.h:62:
  /Users/clausklein/.cache/CPM/googletest/fa7d3a96e167d35883c622b7db96dda86ebdaaf0/googlemock/include/gmock/gmock-generated-function-mockers.h:144:9: error: no template named 'forward' in namespace 'testing::internal'; did you mean 'std::forward'?
          internal::forward<A2>(a2), internal::forward<A3>(a3)));
          ^~~~~~~~~~~~~~~~~
          std::forward
  /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/type_traits:2273:1: note: 'std::forward' declared here
  forward(typename remove_reference<_Tp>::type& __t) _NOEXCEPT
  ^
  In file included from /Users/clausklein/.cache/CPM/googletest/fa7d3a96e167d35883c622b7db96dda86ebdaaf0/googlemock/src/gmock-all.cc:39:
  In file included from /Users/clausklein/.cache/CPM/googletest/fa7d3a96e167d35883c622b7db96dda86ebdaaf0/googlemock/include/gmock/gmock.h:62:
  /Users/clausklein/.cache/CPM/googletest/fa7d3a96e167d35883c622b7db96dda86ebdaaf0/googlemock/include/gmock/gmock-generated-function-mockers.h:144:9: error: no template named 'forward' in namespace 'testing::internal'; did you mean 'std::forward'?
          internal::forward<A2>(a2), internal::forward<A3>(a3)));
          ^~~~~~~~~~~~~~~~~
          std::forward
  /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/type_traits:2273:1: note: 'std::forward' declared here
  forward(typename remove_reference<_Tp>::type& __t) _NOEXCEPT
  ^
  In file included from /Users/clausklein/.cache/CPM/googletest/fa7d3a96e167d35883c622b7db96dda86ebdaaf0/googlemock/src/gmock-all.cc:39:
  In file included from /Users/clausklein/.cache/CPM/googletest/fa7d3a96e167d35883c622b7db96dda86ebdaaf0/googlemock/include/gmock/gmock.h:62:
  /Users/clausklein/.cache/CPM/googletest/fa7d3a96e167d35883c622b7db96dda86ebdaaf0/googlemock/include/gmock/gmock-generated-function-mockers.h:144:36: error: no template named 'forward' in namespace 'testing::internal'; did you mean 'std::forward'?
          internal::forward<A2>(a2), internal::forward<A3>(a3)));
                                     ^~~~~~~~~~~~~~~~~
                                     std::forward
  /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/type_traits:2273:1: note: 'std::forward' declared here
  forward(typename remove_reference<_Tp>::type& __t) _NOEXCEPT
  ^
  fatal error: too many errors emitted, stopping now [-ferror-limit=]
  20 errors generated.
  gmake[2]: *** [_deps/googletest-build/googlemock/CMakeFiles/gmock.dir/build.make:82: _deps/googletest-build/googlemock/CMakeFiles/gmock.dir/src/gmock-all.cc.o] Error 1
  gmake[1]: *** [CMakeFiles/Makefile2:336: _deps/googletest-build/googlemock/CMakeFiles/gmock.dir/all] Error 2
  gmake: *** [Makefile:114: all] Error 2
  
bash-3.2$ 
@TheLartians TheLartians linked a pull request Feb 4, 2021 that will close this issue
@ClausKlein
Copy link
Contributor Author

it seems to be a problem with the first clean build with build_all.py and make -j4

cmake --build build/gtest -- -j4

on console this works fine

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

Successfully merging a pull request may close this issue.

1 participant