Tom-python0121 opened a new issue #1632:
URL: https://github.com/apache/incubator-brpc/issues/1632
**Describe the bug (描述bug)**
```console
[root@localhost build]#cmake .. -DBUILD_UNIT_TESTS =ON
CMake Error: Parse error in command line argument: -DBUILD_UNIT_TESTS
Should be: VAR:type=value
CMake Error: Problem processing arguments. Aborting.
[root@localhost build]#cmake .. -DBUILD_UNIT_TESTS=ON
-- The C compiler identification is GNU 8.5.0
-- The CXX compiler identification is GNU 8.5.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at cmake/FindGFLAGS.cmake:37 (message):
Could not find gflags library.
Call Stack (most recent call first):
CMakeLists.txt:75 (find_package)
-- Configuring incomplete, errors occurred!
See also
"/home/spack-stage/root/spack-stage-brpc-0.9.7-2iuiakdynpinmqur7edrvhldyrko7a27/spack-src/build/CMakeFiles/CMakeOutput.log".
[root@localhost build]#. ../../spack-build-env.txt
[root@localhost build]#cmake .. -DBUILD_UNIT_TESTS=ON
CMake Deprecation Warning at CMakeLists.txt:18 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
-- The C compiler identification is GNU 8.5.0
-- The CXX compiler identification is GNU 8.5.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found gflags:
/home/spack/opt/spack/linux-centos8-skylake_avx512/gcc-8.4.1/gflags-2.2.2-4fkmr4ydgvpvxutqlg2dx5qvrm3wejt4/lib/libgflags.so
-- Found Protobuf:
/home/spack/opt/spack/linux-centos8-skylake_avx512/gcc-8.4.1/protobuf-3.12.2-erunnl2vwbtdkv6btnglgrl3bprm3cwj/lib64/libprotobuf.so;-lpthread
(found version "3.12.2")
-- Found Threads: TRUE
-- Found OpenSSL:
/home/spack/opt/spack/linux-centos8-skylake_avx512/gcc-8.4.1/openssl-1.1.1j-sd3cphltvpn7w26oiva2h5jfj4lkegld/lib/libcrypto.so
(found version "1.1.1j")
-- Found Gperftools:
/home/spack/opt/spack/linux-centos8-skylake_avx512/gcc-8.4.1/gperftools-2.9.1-bzx6zug2mozykrqxgjgkpqn75ybcuzcm/lib/libtcmalloc_and_profiler.so
CMake Deprecation Warning at CMakeLists.txt:16 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
-- Configuring done
-- Generating done
-- Build files have been written to:
/home/spack-stage/root/spack-stage-brpc-0.9.7-2iuiakdynpinmqur7edrvhldyrko7a27/spack-src/build/googletest-download
Scanning dependencies of target googletest
[ 11%] Creating directories for 'googletest'
[ 22%] Performing download step (git clone) for 'googletest'
Cloning into 'googletest-src'...
Note: switching to 'release-1.8.0'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at ec44c6c1 Merge pull request #821 from mazong1123/master
[ 33%] Performing update step for 'googletest'
[ 44%] No patch step for 'googletest'
[ 55%] No configure step for 'googletest'
[ 66%] No build step for 'googletest'
[ 77%] No install step for 'googletest'
[ 88%] No test step for 'googletest'
[100%] Completed 'googletest'
[100%] Built target googletest
CMake Deprecation Warning at build/googletest-src/CMakeLists.txt:1
(cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
CMake Deprecation Warning at
build/googletest-src/googlemock/CMakeLists.txt:41 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
CMake Deprecation Warning at
build/googletest-src/googletest/CMakeLists.txt:48 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
-- Found PythonInterp: /usr/bin/python3.6 (found version "3.6.8")
-- Configuring done
-- Generating done
-- Build files have been written to:
/home/spack-stage/root/spack-stage-brpc-0.9.7-2iuiakdynpinmqur7edrvhldyrko7a27/spack-src/build
[root@localhost build]#make -j126
……
[ 16%] Building CXX object
test/CMakeFiles/BUTIL_DEBUG_LIB.dir/__/src/butil/files/scoped_temp_dir.cc.o
[ 16%] Building CXX object
src/CMakeFiles/BUTIL_LIB.dir/butil/memory/ref_counted_memory.cc.o
In file included from
/home/spack-stage/root/spack-stage-brpc-0.9.7-2iuiakdynpinmqur7edrvhldyrko7a27/spack-src/build/googletest-src/googletest/src/gtest.cc:142,
from
/home/spack-stage/root/spack-stage-brpc-0.9.7-2iuiakdynpinmqur7edrvhldyrko7a27/spack-src/build/googletest-src/googletest/src/gtest-all.cc:42:
/home/spack-stage/root/spack-stage-brpc-0.9.7-2iuiakdynpinmqur7edrvhldyrko7a27/spack-src/build/googletest-src/googletest/src/gtest-internal-inl.h:429:11:
error: 'string' does not name a type; did you mean 'String'?
virtual string CurrentStackTrace(int max_depth, int skip_count) = 0;
^~~~~~
String
/home/spack-stage/root/spack-stage-brpc-0.9.7-2iuiakdynpinmqur7edrvhldyrko7a27/spack-src/build/googletest-src/googletest/src/gtest-internal-inl.h:449:11:
error: 'string' does not name a type; did you mean 'String'?
virtual string CurrentStackTrace(int max_depth, int skip_count);
^~~~~~
String
/home/spack-stage/root/spack-stage-brpc-0.9.7-2iuiakdynpinmqur7edrvhldyrko7a27/spack-src/build/googletest-src/googletest/src/gtest-internal-inl.h:635:31:
error: 'testing::Test::SetUpTestCaseFunc' has not been declared
Test::SetUpTestCaseFunc set_up_tc,
^~~~~~~~~~~~~~~~~
/home/spack-stage/root/spack-stage-brpc-0.9.7-2iuiakdynpinmqur7edrvhldyrko7a27/spack-src/build/googletest-src/googletest/src/gtest-internal-inl.h:636:31:
error: 'testing::Test::TearDownTestCaseFunc' has not been declared
Test::TearDownTestCaseFunc tear_down_tc);
^~~~~~~~~~~~~~~~~~~~
/home/spack-stage/root/spack-stage-brpc-0.9.7-2iuiakdynpinmqur7edrvhldyrko7a27/spack-src/build/googletest-src/googletest/src/gtest-internal-inl.h:645:26:
error: 'testing::Test::SetUpTestCaseFunc' has not been declared
void AddTestInfo(Test::SetUpTestCaseFunc set_up_tc,
^~~~~~~~~~~~~~~~~
/home/spack-stage/root/spack-stage-brpc-0.9.7-2iuiakdynpinmqur7edrvhldyrko7a27/spack-src/build/googletest-src/googletest/src/gtest-internal-inl.h:646:26:
error: 'testing::Test::TearDownTestCaseFunc' has not been declared
Test::TearDownTestCaseFunc tear_down_tc,
^~~~~~~~~~~~~~~~~~~~
/home/spack-stage/root/spack-stage-brpc-0.9.7-2iuiakdynpinmqur7edrvhldyrko7a27/spack-src/build/googletest-src/googletest/src/gtest-internal-inl.h:911:13:
error: 'scoped_ptr' in namespace 'testing::internal' does not name a template
type
internal::scoped_ptr<InternalRunDeathTestFlag>
internal_run_death_test_flag_;
^~~~~~~~~~
/home/spack-stage/root/spack-stage-brpc-0.9.7-2iuiakdynpinmqur7edrvhldyrko7a27/spack-src/build/googletest-src/googletest/src/gtest-internal-inl.h:912:13:
error: 'scoped_ptr' in namespace 'testing::internal' does not name a template
type
internal::scoped_ptr<internal::DeathTestFactory> death_test_factory_;
^~~~~~~~~~
[ 16%] Building CXX object
src/CMakeFiles/BUTIL_LIB.dir/butil/memory/singleton.cc.o
/home/spack-stage/root/spack-stage-brpc-0.9.7-2iuiakdynpinmqur7edrvhldyrko7a27/spack-src/build/googletest-src/googletest/src/gtest-internal-inl.h:
In member function 'void
testing::internal::UnitTestImpl::ClearNonAdHocTestResult()':
/home/spack-stage/root/spack-stage-brpc-0.9.7-2iuiakdynpinmqur7edrvhldyrko7a27/spack-src/build/googletest-src/googletest/src/gtest-internal-inl.h:703:36:
error: 'ClearTestCaseResult' is not a member of 'testing::TestCase' {aka
'testing::TestSuite'}
ForEach(test_cases_, TestCase::ClearTestCaseResult);
^~~~~~~~~~~~~~~~~~~
[ 16%] Building CXX object
test/CMakeFiles/BUTIL_DEBUG_LIB.dir/__/src/butil/file_util.cc.o
/home/spack-stage/root/spack-stage-brpc-0.9.7-2iuiakdynpinmqur7edrvhldyrko7a27/spack-src/build/googletest-src/googletest/src/gtest-internal-inl.h:
In member function 'void
testing::internal::UnitTestImpl::InitDeathTestSubprocessControlInfo()':
/home/spack-stage/root/spack-stage-brpc-0.9.7-2iuiakdynpinmqur7edrvhldyrko7a27/spack-src/build/googletest-src/googletest/src/gtest-internal-inl.h:751:5:
error: 'internal_run_death_test_flag_' was not declared in this scope
internal_run_death_test_flag_.reset(ParseInternalRunDeathTestFlag());
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/spack-stage/root/spack-stage-brpc-0.9.7-2iuiakdynpinmqur7edrvhldyrko7a27/spack-src/build/googletest-src/googletest/src/gtest-internal-inl.h:751:5:
note: suggested alternative: 'internal_run_death_test_flag'
internal_run_death_test_flag_.reset(ParseInternalRunDeathTestFlag());
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
internal_run_death_test_flag
/home/spack-stage/root/spack-stage-brpc-0.9.7-2iuiakdynpinmqur7edrvhldyrko7a27/spack-src/build/googletest-src/googletest/src/gtest-internal-inl.h:
In member function 'const testing::internal::InternalRunDeathTestFlag*
testing::internal::UnitTestImpl::internal_run_death_test_flag() const':
/home/spack-stage/root/spack-stage-brpc-0.9.7-2iuiakdynpinmqur7edrvhldyrko7a27/spack-src/build/googletest-src/googletest/src/gtest-internal-inl.h:758:12:
error: 'internal_run_death_test_flag_' was not declared in this scope
return internal_run_death_test_flag_.get();
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/spack-stage/root/spack-stage-brpc-0.9.7-2iuiakdynpinmqur7edrvhldyrko7a27/spack-src/build/googletest-src/googletest/src/gtest-internal-inl.h:758:12:
note: suggested alternative: 'internal_run_death_test_flag'
return internal_run_death_test_flag_.get();
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
internal_run_death_test_flag
/home/spack-stage/root/spack-stage-brpc-0.9.7-2iuiakdynpinmqur7edrvhldyrko7a27/spack-src/build/googletest-src/googletest/src/gtest-internal-inl.h:
In member function 'testing::internal::DeathTestFactory*
testing::internal::UnitTestImpl::death_test_factory()':
/home/spack-stage/root/spack-stage-brpc-0.9.7-2iuiakdynpinmqur7edrvhldyrko7a27/spack-src/build/googletest-src/googletest/src/gtest-internal-inl.h:763:12:
error: 'death_test_factory_' was not declared in this scope
return death_test_factory_.get();
^~~~~~~~~~~~~~~~~~~
/home/spack-stage/root/spack-stage-brpc-0.9.7-2iuiakdynpinmqur7edrvhldyrko7a27/spack-src/build/googletest-src/googletest/src/gtest-internal-inl.h:763:12:
note: suggested alternative: 'death_test_factory'
return death_test_factory_.get();
^~~~~~~~~~~~~~~~~~~
death_test_factory
/home/spack-stage/root/spack-stage-brpc-0.9.7-2iuiakdynpinmqur7edrvhldyrko7a27/spack-src/build/googletest-src/googletest/src/gtest-internal-inl.h:
At global scope:
/home/spack-stage/root/spack-stage-brpc-0.9.7-2iuiakdynpinmqur7edrvhldyrko7a27/spack-src/build/googletest-src/googletest/src/gtest-internal-inl.h:1043:29:
error: 'string' does not name a type; did you mean 'String'?
virtual void Send(const string& message) = 0;
^~~~~~
String
[ 16%] Building CXX object
src/CMakeFiles/BUTIL_LIB.dir/butil/memory/weak_ptr.cc.o
[ 16%] Building CXX object
test/CMakeFiles/BUTIL_DEBUG_LIB.dir/__/src/butil/file_util_posix.cc.o
/home/spack-stage/root/spack-stage-brpc-0.9.7-2iuiakdynpinmqur7edrvhldyrko7a27/spack-src/build/googletest-src/googletest/src/gtest-internal-inl.h:1049:23:
error: 'string' does not name a type; did you mean 'String'?
void SendLn(const string& message) {
^~~~~~
String
/home/spack-stage/root/spack-stage-brpc-0.9.7-2iuiakdynpinmqur7edrvhldyrko7a27/spack-src/build/googletest-src/googletest/src/gtest-internal-inl.h:1057:24:
error: 'string' does not name a type; did you mean 'String'?
SocketWriter(const string& host, const string& port)
^~~~~~
String
/home/spack-stage/root/spack-stage-brpc-0.9.7-2iuiakdynpinmqur7edrvhldyrko7a27/spack-src/build/googletest-src/googletest/src/gtest-internal-inl.h:1057:44:
error: 'string' does not name a type; did you mean 'String'?
SocketWriter(const string& host, const string& port)
^~~~~~
String
/home/spack-stage/root/spack-stage-brpc-0.9.7-2iuiakdynpinmqur7edrvhldyrko7a27/spack-src/build/googletest-src/googletest/src/gtest-internal-inl.h:1068:29:
error: 'string' does not name a type; did you mean 'String'?
virtual void Send(const string& message) {
^~~~~~
String
/home/spack-stage/root/spack-stage-brpc-0.9.7-2iuiakdynpinmqur7edrvhldyrko7a27/spack-src/build/googletest-src/googletest/src/gtest-internal-inl.h:1094:11:
error: 'string' does not name a type; did you mean 'String'?
const string host_name_;
^~~~~~
……
```

Can you tell me why googletest was going from mazong1123/master
Download instead of downloading from google/googletest? Now because of the
old version of google test causes a lot of syntax problems, can you fix it?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]