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

[BUG] gcc-4 is not supported in release after 1.8.0 #1639

Open
Low-profile opened this issue Jul 24, 2023 · 2 comments
Open

[BUG] gcc-4 is not supported in release after 1.8.0 #1639

Low-profile opened this issue Jul 24, 2023 · 2 comments

Comments

@Low-profile
Copy link

Describe the bug
The project is not compilable with gcc-4 since release 1.8.0, is gcc-4 no longer supported or the documentation need modification?

System
Which OS, compiler, and compiler version are you using:

  • OS: CentOS 7.6.1810
  • Compiler and version: gcc 4.8.5

To reproduce
Steps to reproduce the behavior:

  1. checkout release version 1.8.0
  2. cd ${source_code_folder} && mkdir build && cd build && cmake -DBENCHMARK_ENABLE_GTEST_TESTS=OFF ../
  3. make
  4. See error
[  1%] Building CXX object src/CMakeFiles/benchmark.dir/benchmark.cc.o
/home/test/test/benchmark-1.8.0/src/benchmark.cc: In constructor ‘benchmark::State::State(std::string, benchmark::IterationCount, const std::vector<long int>&, int, int, benchmark::internal::ThreadTimer*, benchmark::internal::ThreadManager*, benchmark::internal::PerfCountersMeasurement*)’:
/home/test/test/benchmark-1.8.0/src/benchmark.cc:163:74: error: declaration of ‘name’ shadows a member of 'this' [-Werror=shadow]
              internal::PerfCountersMeasurement* perf_counters_measurement)
                                                                          ^
/home/test/test/benchmark-1.8.0/src/benchmark.cc: In member function ‘void benchmark::State::PauseTiming()’:
/home/test/test/benchmark-1.8.0/src/benchmark.cc:230:12: error: declaration of ‘name’ shadows a member of 'this' [-Werror=shadow]
       auto name = name_and_measurement.first;
            ^
cc1plus: all warnings being treated as errors
make[2]: *** [src/CMakeFiles/benchmark.dir/benchmark.cc.o] Error 1
make[1]: *** [src/CMakeFiles/benchmark.dir/all] Error 2
make: *** [all] Error 2

Expected behavior
The project should be compilable in gcc-4 or the document need an update that gcc-4 is no longer supported.

@dmah42
Copy link
Member

dmah42 commented Jul 31, 2023

documented https://google.github.io/benchmark/dependencies.html which points to https://opensource.google/documentation/policies/cplusplus-support which says "we agree to remove GCC 4.8 because of its incomplete C++11 support, as well as clang 3.x"

ie, on CentOS 7 you may need to use devtoolset-7.

having said that, i'm comfortable taking patches for best effort support for other compilers, but it's not something we'll regularly have as part of our CI set.

@theOnlyUnique
Copy link

这个真的是太坑了。。

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