cocalele / PureFlash

A ServerSAN storage system designed for flash device
GNU General Public License v3.0
97 stars 29 forks source link

pfs-nbd编译报错 #43

Closed zphj1987 closed 1 month ago

zphj1987 commented 7 months ago
git clone  https://gitee.com/cocalele/pfs-nbd.git
./autogen.sh
./configure --enable-pfsnbd
./make  

报错信息:

root@lab101:~/pfs-nbd# make
make  all-recursive
make[1]: Entering directory '/root/pfs-nbd'
Making all in .
make[2]: Entering directory '/root/pfs-nbd'
make[2]: Leaving directory '/root/pfs-nbd'
Making all in man
make[2]: Entering directory '/root/pfs-nbd/man'
make[2]: *** No rule to make target 'all'.  Stop.
make[2]: Leaving directory '/root/pfs-nbd/man'
make[1]: *** [Makefile:914: all-recursive] Error 1
make[1]: Leaving directory '/root/pfs-nbd'
make: *** [Makefile:528: all] Error 2

环境为20.04

root@lab101:~/pfs-nbd# cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.5 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.5 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
cocalele commented 7 months ago

请尝试下 不要运行autogen.sh, 而是运行 autoreconf -f -i 来生产configure

cocalele commented 7 months ago

pfs-nbd目前维护比较少,编译时可以这样尝试: 复制依赖文件到系统的lib和include目录

   # cp ${PUREFLASH_HOME}/common/include/pf_client_api.h /usr/include/pf_client_api.h
   # cp ${PUREFLASH_HOME}/build_deb/bin/libs5common.a /usr/lib/libs5common.a
   # cp ${PUREFLASH_HOME}/build_deb/bin/libzookeeper_mt.a /usr/lib/libzookeeper_mt.a
   # cp ${PUREFLASH_HOME}/build_deb/bin/libhashtable.a /usr/lib/libhashtable.a

在pfs-nbd/pfsnbd子目录下面的Makefile, 修改LDFLAGS, 增加这些链接库


-lrdmacm -libverbs -lspdk_nvme -lspdk_env_dpdk -lspdk_util -lspdk_log -lspdk_sock -lspdk_trace -lspdk_json -lspdk_jsonrpc -lspdk_rpc -lrte_eal -lrte_mempool -lrte_ring -lrte_telemetry -lrte_kvargs -lrte_pci -lrte_bus_pci -lrte_mempool_ring -lzookeeper_mt

configure成功后,直接cd到pfs-nbd/pfsnbd目录下面执行Make