google / googletest

GoogleTest - Google Testing and Mocking Framework
https://google.github.io/googletest/
BSD 3-Clause "New" or "Revised" License
34.75k stars 10.14k forks source link

Version 1.8.1 not working with gcc 4.4.7 #1982

Closed n-bes closed 5 years ago

n-bes commented 5 years ago
➜  googletest git:(ec44c6c) ✗ git checkout release-1.8.1 
➜  googletest git:(2fe3bd9) ✗ docker run --rm -it -v $PWD:/sources test_env
[root@19539de69b85 sources]# cd bb
[root@19539de69b85 bb]# cmake ..
-- The C compiler identification is GNU 4.4.7
-- The CXX compiler identification is GNU 4.4.7
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PythonInterp: /usr/bin/python (found version "2.6.6") 
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE  
-- Configuring done
-- Generating done
-- Build files have been written to: /sources/bb
[root@19539de69b85 bb]# make
Scanning dependencies of target gtest
[ 12%] Building CXX object googlemock/gtest/CMakeFiles/gtest.dir/src/gtest-all.cc.o
[ 25%] Linking CXX static library libgtest.a
[ 25%] Built target gtest
Scanning dependencies of target gmock
[ 37%] Building CXX object googlemock/CMakeFiles/gmock.dir/src/gmock-all.cc.o
cc1plus: warnings being treated as errors
In file included from /sources/googlemock/include/gmock/gmock-spec-builders.h:71,
                 from /sources/googlemock/include/gmock/gmock-generated-function-mockers.h:44,
                 from /sources/googlemock/include/gmock/gmock.h:62,
                 from /sources/googlemock/src/gmock-all.cc:39:
/sources/googlemock/include/gmock/gmock-matchers.h: In member function 'testing::internal::PointwiseMatcher<TupleMatcher, RhsContainer>::operator testing::Matcher<T>() const':
/sources/googlemock/include/gmock/gmock-matchers.h:3028: error: declaration of 'use_UnorderedPointwise_with_hash_tables' shadows a member of 'this'
make[2]: *** [googlemock/CMakeFiles/gmock.dir/src/gmock-all.cc.o] Error 1
make[1]: *** [googlemock/CMakeFiles/gmock.dir/all] Error 2
make: *** [all] Error 2

Version 1.8.0 working without problem

n-bes commented 5 years ago

Docker image based on centos 6

gennadiycivil commented 5 years ago

@013ez thank you for the information. https://www.gnu.org/software/gcc/gcc-4.4/ was released back in 2012. https://abseil.io/about/compatibility specifies 5 years horizon for support.

We don't have this complier in the CI build matrix, we dont test agains this compiler.

With that, if you can provide a PR to fix this issue we would consider it.

Thanks

gennadiycivil commented 5 years ago

Looks stale, closing

LukeCz commented 5 years ago

Fixed with #2073.