当前位置: 首页 > 工具软件 > QFS > 使用案例 >

ArchLinux(UBuntu)编译qfs

华季同
2023-12-01

用下面的命令编译

$ git clone https://github.com/quantcast/qfs.git
$ cd qfs
$ sudo make

如果出现CMake报错找不到JNI,应该是环境变量的问题,参考我的.bashrc,并根据自己的环境做一些修改

export JAVA_HOME=/usr/lib/jvm/java-8-openjdk
export JRE_HOME=$JAVA_HOME/jre
export PATH=$PATH:$JAVA_HOME/bin #UBuntu不需要
export CLASSPATH=./:$JAVA_HOME/lib #UBuntu不需要

Ubuntu下遇到两次错误:

-- KRB5 was not found. Make sure the entries KRB5_* are set.

安装库解决

sudo apt-get install libkrb5-dev


[ 65%] Building CXX object src/cc/meta/CMakeFiles/kfsMeta.dir/ChunkServer.cc.o
/home/dean/work/github/qfs/src/cc/meta/ChunkServer.cc: In member function ‘virtual void KFS::ChunkServer::Enqueue(KFS::MetaChunkRequest&, int, bool, bool, bool)’:
/home/dean/work/github/qfs/src/cc/meta/ChunkServer.cc:2481:67: error: cannot convert ‘const ChunkServerPtr {aka const boost::shared_ptr<KFS::ChunkServer>}’ to ‘const bool’ in initialization
     const bool restoreFlag = gLayoutManager.RestoreGetChunkServer();
                                                                   ^
/home/dean/work/github/qfs/src/cc/meta/ChunkServer.cc:2526:11: error: in argument to unary !
     if (! restoreFlag && 0 <= req.chunkVersion) {
           ^~~~~~~~~~~
/home/dean/work/github/qfs/src/cc/meta/ChunkServer.cc: In member function ‘bool KFS::HibernatedChunkServer::Checkpoint(std::ostream&, const KFS::ServerLocation&, uint64_t, uint64_t, bool)’:
/home/dean/work/github/qfs/src/cc/meta/ChunkServer.cc:4087:12: error: cannot convert ‘std::ostream {aka std::basic_ostream<char>}’ to ‘bool’ in return
     return ost;
            ^~~
src/cc/meta/CMakeFiles/kfsMeta.dir/build.make:110: recipe for target 'src/cc/meta/CMakeFiles/kfsMeta.dir/ChunkServer.cc.o' failed
make[3]: *** [src/cc/meta/CMakeFiles/kfsMeta.dir/ChunkServer.cc.o] Error 1
make[3]: Leaving directory '/home/dean/work/github/qfs/build/release'
CMakeFiles/Makefile2:1628: recipe for target 'src/cc/meta/CMakeFiles/kfsMeta.dir/all' failed
make[2]: *** [src/cc/meta/CMakeFiles/kfsMeta.dir/all] Error 2
make[2]: Leaving directory '/home/dean/work/github/qfs/build/release'
Makefile:127: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/dean/work/github/qfs/build/release'
Makefile:44: recipe for target 'build' failed
make: *** [build] Error 2
这种情况可以用/etc/alternatives/c++指向clang++, 也就是用clang++ 3.9替换g++ 6.2


安装了一堆东东

Install the project...
-- Install configuration: "RelWithDebInfo"
-- Installing: /usr/local/lib/static/libgf_complete.a
-- Installing: /usr/local/lib/static/libJerasure.a
-- Up-to-date: /usr/local/lib
-- Installing: /usr/local/lib/libgf_complete.so.1.0.0
-- Installing: /usr/local/lib/libgf_complete.so
-- Installing: /usr/local/lib/libgf_complete.so.1
-- Up-to-date: /usr/local/lib
-- Installing: /usr/local/lib/libJerasure.so
-- Installing: /usr/local/lib/libJerasure.so.2.0.0
-- Installing: /usr/local/lib/libJerasure.so.2
-- Installing: /usr/local/lib/libqfs_access.so
-- Set runtime path of "/usr/local/lib/libqfs_access.so" to ""
-- Installing: /usr/local/bin/chunkserver
-- Installing: /usr/local/bin/chunkscrubber
-- Installing: /usr/local/lib/libqfs_common.so
-- Set runtime path of "/usr/local/lib/libqfs_common.so" to ""
-- Installing: /usr/local/lib/static/libqfs_common.a
-- Installing: /usr/local/include/kfs/common/kfstypes.h
-- Installing: /usr/local/include/kfs/common/kfsdecls.h
-- Installing: /usr/local/bin/devtools/checksum
-- Installing: /usr/local/bin/devtools/dirtree_creator
-- Installing: /usr/local/bin/devtools/logger
-- Installing: /usr/local/bin/devtools/rand-sfmt
-- Installing: /usr/local/bin/devtools/requestparser
-- Installing: /usr/local/bin/devtools/sortedhash
-- Installing: /usr/local/bin/devtools/stlset
-- Installing: /usr/local/bin/devtools/sslfiltertest
-- Installing: /usr/local/bin/devtools/dtokentest
-- Installing: /usr/local/bin/devtools/httpstest
-- Installing: /usr/local/bin/devtools/xmlscannertest
-- Installing: /usr/local/bin/emulator/rebalanceplanner
-- Installing: /usr/local/bin/emulator/rebalanceexecutor
-- Installing: /usr/local/bin/emulator/replicachecker
-- Installing: /usr/local/lib/static/libqfs_emulator.a
-- Installing: /usr/local/lib/static/libqfs_io.a
-- Installing: /usr/local/lib/libqfs_io.so
-- Set runtime path of "/usr/local/lib/libqfs_io.so" to ""
-- Installing: /usr/local/lib/static/libqfskrb.a
-- Installing: /usr/local/lib/libqfskrb.so
-- Installing: /usr/local/lib/static/libqfs_client.a
-- Installing: /usr/local/lib/libqfs_client.so
-- Set runtime path of "/usr/local/lib/libqfs_client.so" to ""
-- Installing: /usr/local/include/kfs/KfsAttr.h
-- Installing: /usr/local/include/kfs/KfsClient.h
-- Installing: /usr/local/bin/metaserver
-- Installing: /usr/local/bin/logcompactor
-- Installing: /usr/local/bin/filelister
-- Installing: /usr/local/bin/qfsfsck
-- Installing: /usr/local/bin/qfsobjstorefsck
-- Installing: /usr/local/lib/static/libqfs_meta.a
-- Installing: /usr/local/lib/static/libqfs_qcdio.a
-- Installing: /usr/local/lib/libqfs_qcdio.so
-- Installing: /usr/local/lib/static/libqfs_qcrs.a
-- Installing: /usr/local/lib/libqfs_qcrs.so
-- Installing: /usr/local/lib/static/libqfsc.a
-- Installing: /usr/local/lib/libqfsc.so
-- Set runtime path of "/usr/local/lib/libqfsc.so" to ""
-- Installing: /usr/local/include/kfs/c/qfs.h
-- Installing: /usr/local/lib/static/libqfss3io.a
-- Installing: /usr/local/lib/libqfss3io.so
-- Set runtime path of "/usr/local/lib/libqfss3io.so" to ""
-- Installing: /usr/local/bin/tests/test.t
-- Installing: /usr/local/bin/tools/cptoqfs
-- Installing: /usr/local/bin/tools/cpfromqfs
-- Installing: /usr/local/bin/tools/qfsshell
-- Installing: /usr/local/bin/tools/qfstoggleworm
-- Installing: /usr/local/bin/tools/qfsput
-- Installing: /usr/local/bin/tools/qfsstats
-- Installing: /usr/local/bin/tools/qfsfileenum
-- Installing: /usr/local/bin/tools/qfsdataverify
-- Installing: /usr/local/bin/tools/qfshibernate
-- Installing: /usr/local/bin/tools/qfscat
-- Installing: /usr/local/bin/tools/qfsping
-- Installing: /usr/local/bin/tools/qfs
-- Installing: /usr/local/bin/tools/qfsadmin
-- Installing: /usr/local/lib/static/libqfs_tools.a
-- Installing: /usr/local/bin/examples/qfssample
-- Installing: /usr/local/bin/qfs_fuse
make[1]: Leaving directory '/home/dean/work/github/qfs/build/debug'


 类似资料: