Open East-live opened 1 year ago
这是一个不同编译器导致的编译问题。可以考虑手动在gc_manager.cpp
和cluster_manager.cpp
等提示错误的文件里加上
#include <thread>
在错误的文件加上 #include <thread> 之后,继续执行make -j12,报如下错
[ 86%] Linking CXX static library ../../../lib/libmigrate.a
[ 86%] Built target migrate
Consolidate compiler generated dependencies of target repl_manager
[ 87%] Building CXX object src/tendisplus/replication/CMakeFiles/repl_manager.dir/repl_manager.cpp.o
[ 87%] Building CXX object src/tendisplus/replication/CMakeFiles/repl_manager.dir/repl_util.cpp.o
/opt/project/Tendis/tendis/src/tendisplus/replication/repl_manager.cpp: In member function ‘std::shared_ptr~~~^~
/opt/project/Tendis/tendis/src/tendisplus/replication/repl_manager.cpp:503:19: note: remove ‘std::move’ call
/opt/project/Tendis/tendis/src/tendisplus/replication/repl_util.cpp: In function ‘std::shared_ptr~~~^~
/opt/project/Tendis/tendis/src/tendisplus/replication/repl_util.cpp:50:19: note: remove ‘std::move’ call
[ 87%] Linking CXX static library ../../../lib/librepl_manager.a
[ 87%] Built target repl_manager
Consolidate compiler generated dependencies of target commands
[ 87%] Building CXX object src/tendisplus/commands/CMakeFiles/commands.dir/sort.cpp.o
/opt/project/Tendis/tendis/src/tendisplus/commands/sort.cpp: In lambda function:
/opt/project/Tendis/tendis/src/tendisplus/commands/sort.cpp:542:35: warning: comparing floating-point with ‘==’ or ‘!=’ is unsafe [-Wfloat-equal]
542 | if (a.score == b.score) {
| ~~^~~~
[ 87%] Linking CXX static library ../../../lib/libcommands.a
[ 90%] Built target commands
Consolidate compiler generated dependencies of target index_mgr
[ 90%] Built target index_mgr
Consolidate compiler generated dependencies of target segment_mgr
[ 90%] Built target segment_mgr
[ 90%] Building CXX object src/tendisplus/server/CMakeFiles/server_params.dir/server_params.cpp.o
/opt/project/Tendis/tendis/src/tendisplus/server/server_params.cpp:21:10: fatal error: rocksdb/tendis_extension.h: No such file or directory
21 | #include "rocksdb/tendis_extension.h"
| ^~~~~~~~
compilation terminated.
make[2]: [src/tendisplus/server/CMakeFiles/server_params.dir/build.make:76: src/tendisplus/server/CMakeFiles/server_params.dir/server_params.cpp.o] Error 1
make[1]: [CMakeFiles/Makefile2:3247: src/tendisplus/server/CMakeFiles/server_params.dir/all] Error 2
make: *** [Makefile:156: all] Error 2
这个缺失的头文件是在执行 cmake 的时候自动生成,如果提示缺失这个头文件,可以看下cmake 的输出。应该会提错误原因。
这个是我的cmake输出 theling@theling:/opt/project/Tendis/tendis/build$ cmake ..
/usr/bin/c++ using rocksdb-6.23.3 RocksDB git patch, we apply add-property-rocksdb.levelstatsex-in-rocksdb Committer identity unknown
*** Please tell me who you are.
Run
git config --global user.email "you@example.com" git config --global user.name "Your Name"
to set your account's default identity. Omit --global to set the identity only in this repository.
fatal: unable to auto-detect email address (got 'theling@theling.(none)') Committer identity unknown
*** Please tell me who you are.
Run
git config --global user.email "you@example.com" git config --global user.name "Your Name"
to set your account's default identity. Omit --global to set the identity only in this repository.
fatal: unable to auto-detect email address (got 'theling@theling.(none)') Committer identity unknown
*** Please tell me who you are.
Run
git config --global user.email "you@example.com" git config --global user.name "Your Name"
to set your account's default identity. Omit --global to set the identity only in this repository.
fatal: unable to auto-detect email address (got 'theling@theling.(none)') jemalloc git patch, we force set jemalloc prof:true error: patch failed: src/prof.c:30 error: src/prof.c: patch does not apply CMake Deprecation Warning at src/thirdparty/lz4/contrib/cmake_unofficial/CMakeLists.txt:36 (cmake_minimum_required): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake.
Update the VERSION argument
CMake Deprecation Warning at src/thirdparty/googletest/CMakeLists.txt:4 (cmake_minimum_required): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake.
Update the VERSION argument
CMake Deprecation Warning at src/thirdparty/googletest/googlemock/CMakeLists.txt:45 (cmake_minimum_required): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake.
Update the VERSION argument
CMake Deprecation Warning at src/thirdparty/googletest/googletest/CMakeLists.txt:56 (cmake_minimum_required): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake.
Update the VERSION argument
CMake Warning at src/thirdparty/glog/CMakeLists.txt:51 (find_package): By not providing "Findgflags.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "gflags", but CMake did not find one.
Could not find a package configuration file provided by "gflags" (requested version 2.2.0) with any of the following names:
gflagsConfig.cmake
gflags-config.cmake
Add the installation prefix of "gflags" to CMAKE_PREFIX_PATH or set "gflags_DIR" to a directory containing one of the above files. If "gflags" provides a separate development package or SDK, be sure it has been installed.
CMake Deprecation Warning at src/thirdparty/rapidjson/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
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) -- No Doxygen found. Documentation won't be built CMake Deprecation Warning at src/thirdparty/rapidjson/example/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
CMake Deprecation Warning at src/thirdparty/lua/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
-- Enabling RTTI in Debug builds only (default) -- JNI library is disabled RelWithDebInfo -O3 -DNDEBUG -- Configuring done -- Generating done -- Build files have been written to: /opt/project/Tendis/tendis/build
cmake 里提示了要配置 git 的 user name 和 user email。 git config
配置了git 的 user name 和 user email后 theling@theling:/opt/project/Tendis/tendis/build$ cmake ..
/usr/bin/c++ using rocksdb-6.23.3 RocksDB git patch, we apply add-property-rocksdb.levelstatsex-in-rocksdb Applying: add property "rocksdb.levelstatsex" in rocksdb Applying: add tendis latency extension Applying: add property "rocksdb.levelstatsex" in rocksdb jemalloc git patch, we force set jemalloc prof:true error: patch failed: src/prof.c:30 error: src/prof.c: patch does not apply CMake Deprecation Warning at src/thirdparty/lz4/contrib/cmake_unofficial/CMakeLists.txt:36 (cmake_minimum_required): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake.
Update the VERSION argument
CMake Deprecation Warning at src/thirdparty/googletest/CMakeLists.txt:4 (cmake_minimum_required): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake.
Update the VERSION argument
CMake Deprecation Warning at src/thirdparty/googletest/googlemock/CMakeLists.txt:45 (cmake_minimum_required): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake.
Update the VERSION argument
CMake Deprecation Warning at src/thirdparty/googletest/googletest/CMakeLists.txt:56 (cmake_minimum_required): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake.
Update the VERSION argument
CMake Warning at src/thirdparty/glog/CMakeLists.txt:51 (find_package): By not providing "Findgflags.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "gflags", but CMake did not find one.
Could not find a package configuration file provided by "gflags" (requested version 2.2.0) with any of the following names:
gflagsConfig.cmake
gflags-config.cmake
Add the installation prefix of "gflags" to CMAKE_PREFIX_PATH or set "gflags_DIR" to a directory containing one of the above files. If "gflags" provides a separate development package or SDK, be sure it has been installed.
CMake Deprecation Warning at src/thirdparty/rapidjson/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
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) -- No Doxygen found. Documentation won't be built CMake Deprecation Warning at src/thirdparty/rapidjson/example/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
CMake Deprecation Warning at src/thirdparty/lua/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
fatal: no tag exactly matches '978ba16fe5e33a0b58f08afd67e99f00f30ad608' -- Enabling RTTI in Debug builds only (default) -- JNI library is disabled RelWithDebInfo -O3 -DNDEBUG -- Configuring done -- Generating done -- Build files have been written to: /opt/project/Tendis/tendis/build
git patch 没问题了就可以编译了啊 :)
现在是报这个错了
theling@theling:/opt/project/Tendis/tendis/build$ make -j12
[ 0%] Built target filterkeydom
[ 0%] Built target lz4_static
[ 0%] Built target gflags_nothreads_static
[ 0%] Built target lookaheadparser
[ 0%] Built target archivertest
[ 0%] Built target jsonx
[ 0%] Built target capitalize
[ 0%] Built target gtest
[ 0%] Built target condense
[ 0%] Built target snappy
[ 0%] Built target messagereader
[ 0%] Built target filterkey
[ 0%] Built target pretty
[ 0%] Built target prettyauto
[ 0%] Built target schemavalidator
[ 0%] Built target parsebyparts
[ 0%] Built target simplereader
[ 1%] Built target simpledom
[ 1%] Built target simplepullreader
[ 1%] Built target sortkeys
[ 1%] Built target tutorial
[ 1%] Built target serialize
[ 1%] Built target simplewriter
[ 9%] Built target lua
[ 10%] Built target build_jemalloc
[ 10%] Built target sync_point
[ 10%] Built target time_util
[ 10%] Built target gflags_strip_flags_test
[ 12%] Built target glog
[ 12%] Built target latency_record
[ 13%] Built target gflags_declare_test
[ 13%] Built target gflags_unittest
[ 15%] Built target gflags_unittest-main
[ 15%] Built target gflags_unittest_main
[ 16%] Built target snappy_unittest
[ 16%] Built target lz4cli
Consolidate compiler generated dependencies of target session_ctx
[ 18%] Built target lz4c
Consolidate compiler generated dependencies of target script
[ 18%] Built target examples
[ 18%] Built target gmock
[ 19%] Built target gtest_main
[ 19%] Built target status
[ 19%] Built target varint
[ 19%] Built target redis_port
[ 19%] Built target pessimistic
Consolidate compiler generated dependencies of target mgl
[ 19%] Built target session_ctx
Consolidate compiler generated dependencies of target kvstore
[ 19%] Built target gmock_main
[ 21%] Built target status_test
[ 21%] Built target atomic_utility_test
[ 21%] Built target varint_test
[ 21%] Built target script
[ 22%] Built target mgl
[ 24%] Built target kvstore
Consolidate compiler generated dependencies of target lock
Consolidate compiler generated dependencies of target gc_mgr
[ 25%] Built target lock
[ 25%] Built target gc_mgr
Consolidate compiler generated dependencies of target rocksdb
[ 77%] Built target rocksdb
Consolidate compiler generated dependencies of target utils_common
[ 80%] Built target utils_common
Consolidate compiler generated dependencies of target cluster_mgr
Consolidate compiler generated dependencies of target record
Consolidate compiler generated dependencies of target utils_common_test
[ 80%] Built target mgl_test
[ 81%] Built target record
Consolidate compiler generated dependencies of target skiplist
[ 81%] Built target cluster_mgr
Consolidate compiler generated dependencies of target catalog
Consolidate compiler generated dependencies of target rocks_kvstore
Consolidate compiler generated dependencies of target rocks_kvstore_for_test
Consolidate compiler generated dependencies of target ldb_tendis
Consolidate compiler generated dependencies of target record_test
[ 81%] Built target utils_common_test
[ 83%] Built target skiplist
[ 83%] Built target catalog
[ 84%] Built target rocks_kvstore
[ 84%] Built target rocks_kvstore_for_test
[ 84%] Built target ldb_tendis
[ 84%] Built target record_test
Consolidate compiler generated dependencies of target migrate
[ 86%] Built target migrate
Consolidate compiler generated dependencies of target repl_manager
[ 87%] Built target repl_manager
Consolidate compiler generated dependencies of target commands
[ 90%] Built target commands
Consolidate compiler generated dependencies of target index_mgr
[ 90%] Built target index_mgr
Consolidate compiler generated dependencies of target segment_mgr
[ 90%] Built target segment_mgr
Consolidate compiler generated dependencies of target server_params
[ 92%] Built target server_params
Consolidate compiler generated dependencies of target server
[ 92%] Built target server
Consolidate compiler generated dependencies of target session
[ 92%] Built target session
Consolidate compiler generated dependencies of target nwp
[ 93%] Built target nwp
Consolidate compiler generated dependencies of target network
[ 93%] Building CXX object src/tendisplus/network/CMakeFiles/network.dir/network.cpp.o
In file included from /opt/project/Tendis/tendis/src/thirdparty/asio/asio/include/asio/detail/socket_ops.hpp:334,
from /opt/project/Tendis/tendis/src/thirdparty/asio/asio/include/asio/detail/socket_holder.hpp:20,
from /opt/project/Tendis/tendis/src/thirdparty/asio/asio/include/asio/detail/reactive_socket_accept_op.hpp:24,
from /opt/project/Tendis/tendis/src/thirdparty/asio/asio/include/asio/detail/reactive_socket_service.hpp:30,
from /opt/project/Tendis/tendis/src/thirdparty/asio/asio/include/asio/basic_socket.hpp:40,
from /opt/project/Tendis/tendis/src/thirdparty/asio/asio/include/asio/basic_datagram_socket.hpp:20,
from /opt/project/Tendis/tendis/src/thirdparty/asio/asio/include/asio.hpp:21,
from /opt/project/Tendis/tendis/src/tendisplus/network/network.h:18,
from /opt/project/Tendis/tendis/src/tendisplus/network/network.cpp:10:
/opt/project/Tendis/tendis/src/thirdparty/asio/asio/include/asio/detail/impl/socket_ops.ipp: In member function ‘std::string asio::ip::address::to_string() const’:
/opt/project/Tendis/tendis/src/thirdparty/asio/asio/include/asio/detail/impl/socket_ops.ipp:2125:29: error: ‘%lu’ directive writing between 1 and 20 bytes into a region of size 16 [-Werror=format-overflow=]
2125 | sprintf(if_name + 1, "%lu", scope_id);
| ^~~
/opt/project/Tendis/tendis/src/thirdparty/asio/asio/include/asio/detail/impl/socket_ops.ipp:2125:28: note: directive argument in the range [1, 18446744073709551615]
2125 | sprintf(if_name + 1, "%lu", scope_id);
| ^~~~~
In file included from /usr/include/stdio.h:894,
from /usr/include/c++/11/cstdio:42,
from /usr/include/c++/11/ext/string_conversions.h:43,
from /usr/include/c++/11/bits/basic_string.h:6608,
from /usr/include/c++/11/string:55,
from /usr/include/c++/11/bits/locale_classes.h:40,
from /usr/include/c++/11/bits/ios_base.h:41,
from /usr/include/c++/11/ios:42,
from /usr/include/c++/11/ostream:38,
from /usr/include/c++/11/iostream:39,
from /opt/project/Tendis/tendis/src/tendisplus/network/network.cpp:5:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:38:34: note: ‘builtin___sprintf_chk’ output between 2 and 21 bytes into a destination of size 16
38 | return builtin_sprintf_chk (s, USE_FORTIFY_LEVEL - 1,
| ~~~~~~^~~~~~~~
39 | glibc_objsize (s), fmt,
| ~~~~~~~~~
40 | __va_arg_pack ());
| ~~~~~
cc1plus: some warnings being treated as errors
make[2]: [src/tendisplus/network/CMakeFiles/network.dir/build.make:76: src/tendisplus/network/CMakeFiles/network.dir/network.cpp.o] Error 1
make[1]: [CMakeFiles/Makefile2:2698: src/tendisplus/network/CMakeFiles/network.dir/all] Error 2
make: *** [Makefile:156: all] Error 2
这个是因为asio 1-12 版本有个潜在的缓冲区溢出问题,你需要cd 到src/thirdparty/asio 下然后执行
git checkout asio-1-12-2
ok,感谢感谢,编译成功了
怎么运行这个命令./build/bin/tendisplus tendisplus.conf提示找不到文件 theling@theling:/opt/project/Tendis/tendis/build$ ./build/bin/tendisplus tendisplus.conf bash: ./build/bin/tendisplus: No such file or directory
找到了 要在tendis目录下运行
执行这个命令./build/bin/tendisplus tendisplus.conf,这个输出是启动成功了吗 theling@theling:/opt/project/Tendis/tendis$ ./build/bin/tendisplus tendisplus.conf start server with cfg: allow-cross-slot:no aof-enabled:no aof-psync-num:500 bind:"127.0.0.1" bind2:"" binlog-enabled:yes binlog-save-logs:yes binlog-send-batch:256 binlog-send-bytes:16777216 binlog-using-defaultCF:no binlogFileSecs:1200 binlogFileSizeMB:64 binlogRateLimitMB:64 checkkeytypeforsetcmd:no chunkSize:16384 cluster-allow-replica-migration:no cluster-enabled:no cluster-migration-barrier:1 cluster-migration-batch-size:16 cluster-migration-binlog-iters:10 cluster-migration-distance:10000 cluster-migration-rate-limit:32 cluster-migration-slots-num-per-task:10 cluster-migration-timeout:5 cluster-node-timeout:15000 cluster-require-full-coverage:yes cluster-single-node:no cluster-slave-no-failover:no cluster-slave-validity-factor:10 compactrange-after-deleterange:no daemon:yes databases:16 delCntIndexMgr:10000 deletefilesinrange-for-migrate-gc:yes delJobCntIndexMgr:1 dir:"./home/db" direct-io:no domain-enabled:no dumpdir:"./home/dump" element-limit-for-single-delete:2048 element-limit-for-single-delete-zset:1024 executorThreadNum:48 executorWorkPoolSize:0 force-recovery:0 fullPsync-notice-enabled:no fullPushThreadnum:5 fullReceiveThreadnum:5 generalLog:no generate-heartbeat-binlog-interval:0 incrPushThreadnum:10 jeprof-auto-dump:yes keysDefaultLimit:100 kvStoreCount:10 lockDbXWaitTimeout:1 lockWaitTimeOut:3600 log-error:no logDir:"./home/log" logLevel:"notice" logRecycleThreadnum:5 lua-time-limit:5000 luaStateMaxIdleTime:3600000 masterauth:** maxBinlogKeepNum:1 maxClients:10000 migrate-snapshot-key-num:100000 migrate-snapshot-retry-num:1000 migrateReceiveThreadnum:5 migrateSenderThreadnum:5 minBinlogKeepSec:3600 netBatchSize:1048576 netBatchTimeoutSec:10 netIoThreadNum:0 noexpire:no pauseTimeIndexMgr:1 pidFile:"./home/tendisplus.pid" port:51002 proto-max-bulk-len:536870912 replicate-fix-enabled:yes requirepass:** rocks-transaction-mode:2 rocks.blockcache_num_shard_bits:6 rocks.blockcache_strict_capacity_limit:no rocks.blockcachemb:4096 rocks.compaction_deletes_ratio:0.000000 rocks.compaction_deletes_trigger:0 rocks.compaction_deletes_window:0 rocks.compress_type:"snappy" rocks.delete_bytes_per_second:0 rocks.disable_wal:no rocks.flush_log_at_trx_commit:no rocks.latency-limit:0 rocks.level0_compress_enabled:no rocks.level1_compress_enabled:no rocks.max_background_jobs:2 rocks.max_open_files:-1 rocks.rate_limiter_auto_tuned:yes rocks.rate_limiter_fairness:10 rocks.rate_limiter_rate_bytes_per_sec:0 rocks.rate_limiter_refill_period_us:100000 rocks.rowcachemb:0 rocks.skip_concurrency_control:no rocks.wal_dir:"" scanCntIndexMgr:1000 scanDefaultLimit:10 scanDefaultMaxIterateTimes:10000 scanJobCntIndexMgr:1 slave-migrate-enabled:no slaveBinlogKeepNum:1 slowlog:"./home/log/slowlog" slowlog-file-enabled:yes slowlog-flush-interval:1000 slowlog-log-slower-than:100000 slowlog-max-len:128 storage:"rocks" supply-fullpsync-key-batch-num:100 tbitmap-fragment-size:1024 tendis-latency-limit:0 timeoutSecBinlogWaitRsp:3 truncateBinlogIntervalMs:1000 truncateBinlogNum:10000 version-increase:yes wait-time-if-exists-migrate-task:600
用这个命令redis-cli -h 127.0.0.1 -p 51002连不上 theling@theling:/opt/project/Tendis/tendis$ redis-cli -h 127.0.0.1 -p 51002 Could not connect to Redis at 127.0.0.1:51002: Connection refused not connected>
查看进程好像它并没有启动起来 theling@theling:/opt/project/Tendis/tendis$ ps -ef | grep tendisplus theling 469324 185740 0 09:43 pts/5 00:00:00 grep --color=auto tendisplus
可以参考tendis faq
可以连接上了 heling@theling:/opt/project/Tendis/tendis$ redis-cli -h 127.0.0.1 -p 51002 127.0.0.1:51002>
那我怎么指定我的服务器ip,而不是用127.0.0.1呢
配置文件tendis 里 bind 可以配置绑定的 ip,tendis 配置
ok,感谢感谢
这是报错的内容
theling@theling:/opt/project/Tendis/tendis/build$ make -j12 [ 0%] Built target condense [ 0%] Built target archivertest [ 0%] Built target jsonx [ 0%] Built target filterkey [ 0%] Built target lz4_static [ 0%] Built target lookaheadparser [ 0%] Built target snappy [ 1%] Built target gflags_nothreads_static [ 1%] Built target capitalize [ 1%] Built target gtest [ 1%] Built target filterkeydom [ 1%] Built target messagereader [ 1%] Built target parsebyparts [ 3%] Built target prettyauto [ 4%] Built target simpledom [ 4%] Built target schemavalidator [ 4%] Built target pretty [ 4%] Built target sortkeys [ 4%] Built target serialize [ 4%] Built target tutorial [ 4%] Built target simplereader [ 4%] Built target simplewriter [ 4%] Built target simplepullreader [ 12%] Built target lua [ 13%] Built target build_jemalloc [ 13%] Built target time_util [ 15%] Built target glog [ 16%] Built target snappy_unittest [ 16%] Built target sync_point [ 16%] Built target lz4cli [ 18%] Built target latency_record [ 20%] Built target lz4c [ 21%] Built target gtest_main [ 21%] Built target examples [ 21%] Built target gmock Consolidate compiler generated dependencies of target varint Consolidate compiler generated dependencies of target session_ctx Consolidate compiler generated dependencies of target status Consolidate compiler generated dependencies of target pessimistic Consolidate compiler generated dependencies of target redis_port Consolidate compiler generated dependencies of target script Consolidate compiler generated dependencies of target mgl Consolidate compiler generated dependencies of target gmock_main [ 21%] Built target varint [ 21%] Built target status [ 21%] Built target pessimistic [ 23%] Built target redis_port [ 23%] Built target gmock_main Consolidate compiler generated dependencies of target status_test Consolidate compiler generated dependencies of target kvstore Consolidate compiler generated dependencies of target varint_test Consolidate compiler generated dependencies of target atomic_utility_test [ 23%] Built target session_ctx [ 24%] Built target mgl [ 24%] Built target script [ 24%] Built target atomic_utility_test [ 26%] Built target status_test [ 26%] Built target varint_test Consolidate compiler generated dependencies of target lock [ 26%] Built target kvstore Consolidate compiler generated dependencies of target gc_mgr [ 26%] Built target lock [ 26%] Building CXX object src/tendisplus/cluster/CMakeFiles/gc_mgr.dir/gc_manager.cpp.o Consolidate compiler generated dependencies of target rocksdb [ 78%] Built target rocksdb [ 80%] Building CXX object src/tendisplus/utils/CMakeFiles/utils_common.dir/lzf_d.cpp.o [ 80%] Building CXX object src/tendisplus/utils/CMakeFiles/utils_common.dir/time.cpp.o [ 80%] Building CXX object src/tendisplus/utils/CMakeFiles/utils_common.dir/redis_port.cpp.o [ 80%] Building CXX object src/tendisplus/utils/CMakeFiles/utils_common.dir/string.cpp.o [ 80%] Building CXX object src/tendisplus/utils/CMakeFiles/utils_common.dir/status.cpp.o [ 80%] Building CXX object src/tendisplus/utils/CMakeFiles/utils_common.dir/file.cpp.o [ 80%] Building CXX object src/tendisplus/utils/CMakeFiles/utils_common.dir/base64.cpp.o [ 80%] Building CXX object src/tendisplus/utils/CMakeFiles/utils_common.dir/hyperloglog.cpp.o [ 80%] Building CXX object src/tendisplus/utils/CMakeFiles/utils_common.dir/cursor_map.cpp.o [ 80%] Building CXX object src/tendisplus/utils/CMakeFiles/utils_common.dir/param_manager.cpp.o /opt/project/Tendis/tendis/src/tendisplus/utils/file.cpp: In function ‘std::unique_ptr tendisplus::openWritableFile(const string&, bool, bool)’:
/opt/project/Tendis/tendis/src/tendisplus/utils/file.cpp:85:19: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]
85 | return std::move(writable_file);
| tendisplus::bitsetEncodeVec(const std::bitset<_Nb>&) [with long unsigned int size = 16384]’:
/opt/project/Tendis/tendis/src/tendisplus/utils/utils_common_test.cpp:186:51: required from here
/opt/project/Tendis/tendis/src/tendisplus/utils/string.h:98:28: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]
98 | return std::move(slotBuff);
| ^
/opt/project/Tendis/tendis/src/tendisplus/utils/string.h:98:28: note: remove ‘std::move’ call
/opt/project/Tendis/tendis/src/tendisplus/cluster/cluster_manager.cpp: In member function ‘void tendisplus::ClusterManager::controlRoutine()’:
/opt/project/Tendis/tendis/src/tendisplus/cluster/cluster_manager.cpp:4934:25: error: ‘sleep_for’ is not a member of ‘std::this_thread’
4934 | std::this_thread::sleep_for(100ms);
| ^, const tendisplus::ClusterMsg&)’:
/opt/project/Tendis/tendis/src/tendisplus/cluster/cluster_manager.cpp:5341:23: error: ‘sleep_for’ is not a member of ‘std::this_thread’
5341 | std::this_thread::sleep_for(chrono::milliseconds(getBlockTime()));
| ^ tendisplus::bitsetEncodeVec(const std::bitset<_Nb>&) [with long unsigned int size = 16384]’:
/opt/project/Tendis/tendis/src/tendisplus/cluster/cluster_manager.cpp:1654:48: required from here
/opt/project/Tendis/tendis/src/tendisplus/utils/string.h:98:28: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]
98 | return std::move(slotBuff);
| ^
/opt/project/Tendis/tendis/src/tendisplus/utils/string.h:98:28: note: remove ‘std::move’ call
make[2]: [src/tendisplus/cluster/CMakeFiles/cluster_mgr.dir/build.make:76: src/tendisplus/cluster/CMakeFiles/cluster_mgr.dir/cluster_manager.cpp.o] Error 1
make[1]: [CMakeFiles/Makefile2:4222: src/tendisplus/cluster/CMakeFiles/cluster_mgr.dir/all] Error 2
[ 81%] Linking CXX static library ../../../lib/librecord.a
[ 81%] Built target record
[ 81%] Linking CXX executable ../../../bin/utils_common_test
[ 81%] Built target utils_common_test
make: [Makefile:156: all] Error 2
~~~^~~~~ /opt/project/Tendis/tendis/src/tendisplus/utils/file.cpp:85:19: note: remove ‘std::move’ call [ 81%] Linking CXX static library ../../../lib/libutils_common.a [ 81%] Built target utils_common [ 81%] Building CXX object src/tendisplus/storage/CMakeFiles/record.dir/record.cpp.o [ 81%] Building CXX object src/tendisplus/storage/CMakeFiles/record.dir/repllog.cpp.o [ 81%] Building CXX object src/tendisplus/utils/CMakeFiles/utils_common_test.dir/utils_common_test.cpp.o [ 81%] Building CXX object src/tendisplus/cluster/CMakeFiles/cluster_mgr.dir/cluster_manager.cpp.o [ 81%] Building CXX object src/tendisplus/lock/mgl/CMakeFiles/mgl_test.dir/mgl_test.cpp.o /opt/project/Tendis/tendis/src/tendisplus/cluster/gc_manager.cpp: In member function ‘void tendisplus::GCManager::controlRoutine()’: /opt/project/Tendis/tendis/src/tendisplus/cluster/gc_manager.cpp:45:23: error: ‘sleep_for’ is not a member of ‘std::this_thread’ 45 | std::this_thread::sleep_for(std::chrono::seconds(1)); | ^~~~~ make[2]: [src/tendisplus/cluster/CMakeFiles/gc_mgr.dir/build.make:76: src/tendisplus/cluster/CMakeFiles/gc_mgr.dir/gc_manager.cpp.o] Error 1 make[1]: [CMakeFiles/Makefile2:4133: src/tendisplus/cluster/CMakeFiles/gc_mgr.dir/all] Error 2 make[1]: Waiting for unfinished jobs.... [ 81%] Linking CXX executable ../../../../bin/mgl_test [ 81%] Built target mgl_test In file included from /opt/project/Tendis/tendis/src/tendisplus/utils/utils_common_test.cpp:17: /opt/project/Tendis/tendis/src/tendisplus/utils/string.h: In instantiation of ‘std::vector~~~~ /opt/project/Tendis/tendis/src/tendisplus/cluster/cluster_manager.cpp:4953:23: error: ‘sleep_for’ is not a member of ‘std::this_thread’ 4953 | std::this_thread::sleep_for(100ms); | ^~~~~ /opt/project/Tendis/tendis/src/tendisplus/cluster/cluster_manager.cpp: In member function ‘tendisplus::Status tendisplus::ClusterState::clusterProcessPacket(std::shared_ptr~~~~ In file included from /opt/project/Tendis/tendis/src/tendisplus/storage/record.h:17, from /opt/project/Tendis/tendis/src/tendisplus/storage/kvstore.h:24, from /opt/project/Tendis/tendis/src/tendisplus/network/session_ctx.h:24, from /opt/project/Tendis/tendis/src/tendisplus/network/network.h:21, from /opt/project/Tendis/tendis/src/tendisplus/cluster/cluster_manager.h:17, from /opt/project/Tendis/tendis/src/tendisplus/cluster/cluster_manager.cpp:9: /opt/project/Tendis/tendis/src/tendisplus/utils/string.h: In instantiation of ‘std::vector