You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[root@3d852ecb608f /]# cd /usr/local/
[root@3d852ecb608f local]# ls
bin etc games include lib lib64 libexec sbin share src
[root@3d852ecb608f local]# git clone https://github.com/OpenAtomFoundation/pika.git && cd pika
Cloning into 'pika'...
remote: Enumerating objects: 11217, done.
remote: Counting objects: 100% (266/266), done.
remote: Compressing objects: 100% (214/214), done.
remote: Total 11217 (delta 77), reused 127 (delta 49), pack-reused 10951
Receiving objects: 100% (11217/11217), 84.52 MiB | 17.43 MiB/s, done.
Resolving deltas: 100% (8138/8138), done.
[root@3d852ecb608f pika]#
2.2 切换版本
[root@3d852ecb608f pika]# git checkout v3.3.6
Note: switching to 'v3.3.6'.
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 9e74c8c vsersion 3.3.6
[root@3d852ecb608f pika]#
2.3初始化
初始化依赖外网,最好挂vpn
[root@3d852ecb608f pika]# git submodule init
Submodule 'third/blackwidow' (https://github.com/Qihoo360/blackwidow.git) registered for path 'third/blackwidow'
Submodule 'third/glog' (https://github.com/Qihoo360/glog.git) registered for path 'third/glog'
Submodule 'third/pink' (https://github.com/Qihoo360/pink.git) registered for path 'third/pink'
Submodule 'third/rocksdb' (https://github.com/facebook/rocksdb.git) registered for path 'third/rocksdb'
Submodule 'third/slash' (https://github.com/Qihoo360/slash.git) registered for path 'third/slash'
[root@3d852ecb608f pika]# git submodule update
Cloning into '/usr/local/pika/third/blackwidow'...
Cloning into '/usr/local/pika/third/glog'...
Cloning into '/usr/local/pika/third/pink'...
Cloning into '/usr/local/pika/third/rocksdb'...
Cloning into '/usr/local/pika/third/slash'...
Submodule path 'third/blackwidow': checked out '7565ce9f09f9528b90984feefe6ad850bf87fe90'
Submodule path 'third/glog': checked out 'ecdbd7cda69e1ff304ac02f7f277715a162e1474'
Submodule path 'third/pink': checked out 'fb34df9c885a12ac2f31a19760e93e451ffc4714'
Submodule path 'third/rocksdb': checked out '004237e62790320d8e630456cbeb6f4a1f3579c2'
Submodule path 'third/slash': checked out 'c1315c0d5ed2a60b21cc1db4b9f29ee833e7d2a3'
2.4 编译
PORTABLE=1 make
日志
/usr/local/pika/src/pika_admin.cc: In member function‘void InfoCmd::InfoReplication(std::__cxx11::string&)’:
/usr/local/pika/src/pika_admin.cc:964:7: warning: this statement may fall through [-Wimplicit-fallthrough]
if (!all_partition_sync) {
^~
/usr/local/pika/src/pika_admin.cc:967:5: note: here
case PIKA_ROLE_SINGLE :
^~~~
CC pika_repl_bgworker.o
CC pika_zset.o
CC pika_repl_client_thread.o
CC pika_slave_node.o
CCLD pika
memtable/skiplistrep.cc:28:28: required from here
./memtable/inlineskiplist.h:282:11: error: ‘void* memcpy(void*, const void*, size_t)’ writing to an object of type ‘struct std::atomic<rocksdb::InlineSkipList<const rocksdb::MemTableRep::KeyComparator&>::Node*>’ with no trivial copy-assignment [-Werror=class-memaccess]
memcpy(&next_[0], &height, sizeof(int));~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./memtable/inlineskiplist.h:47,
from memtable/skiplistrep.cc:6:
/usr/include/c++/8/atomic:352:12: note: ‘struct std::atomic<rocksdb::InlineSkipList<const rocksdb::MemTableRep::KeyComparator&>::Node*>’ declared here
struct atomic<_Tp*>
^~~~~~~~~~~~
CC monitoring/thread_status_updater.o
CC monitoring/thread_status_updater_debug.o
CC monitoring/thread_status_util.o
CC monitoring/thread_status_util_debug.o
CC options/cf_options.o
cc1plus: all warnings being treated as errors
make[1]: *** [Makefile:1809: memtable/skiplistrep.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/opt/pika/third/rocksdb'
make: *** [Makefile:229: /opt/pika/third/rocksdb/librocksdb.a] Error 2
问题解决
#在inlineskiplist.h中约282行,StashHeight函数中增加(void*),具体见下文
vim /usr/local/pika/third/rocksdb/memtable/inlineskiplist.h
void StashHeight(const int height) {
assert(sizeof(int) <= sizeof(next_[0]));
memcpy((void*)&next_[0], (void*)&height, sizeof(int));
}
#参考链接:https://www.cnblogs.com/saikaimei/p/14396369.html
pika在arm环境编译
1.安装依赖
2.组件编译
2.1 下载源码
2.2 切换版本
2.3初始化
初始化依赖外网,最好挂vpn
2.4 编译
日志
3.启动
[root@3d852ecb608f pika]# ./output/bin/pika -c ./conf/pika.conf
4.问题解决
4.1问题一:
问题1:使用PORTABLE=1 make编译报如下错:
问题解决
4.2问题2:
问题2:使用PORTABLE=1 make编译报如下错:
问题解决
4.3问题3:
问题3:执行./output/bin/pika -c ./conf/pika.conf启动服务时只是回显版本,服务未正常启动
问题解决:
The text was updated successfully, but these errors were encountered: