bfs
bfs copied to clipboard
libunwind build latex2man: Command not found
docker 环境, images: centos:7 编译环境为centos 7 自带的Development Tools group
FROM centos:latest
MAINTAINER ystyle "[email protected]"
RUN yum -y groupinstall 'Development Tools'
RUN yum -y install zlib-devel wget fuse git
RUN cd / && git clone https://github.com/baidu/bfs.git
RUN yum -y install libunwind-devel libunwind cmake
RUN cd /bfs && ./build.sh && cd sandbox && ./deploy.sh
EXPOSE 8827 8828 8829
WORKDIR /bfs/sandbox/
CMD ['./start_bfs.sh']
报错信息
make[1]: Entering directory `/bfs/thirdsrc/libunwind-0.99/doc'
latex2man -t ./libunwind.trans unw_destroy_addr_space.tex unw_destroy_addr_space.man
make[1]: latex2man: Command not found
make[1]: *** [unw_destroy_addr_space.man] Error 127
make[1]: Leaving directory `/bfs/thirdsrc/libunwind-0.99/doc'
make: *** [all-recursive] Error 1
The command '/bin/sh -c cd /bfs && ./build.sh && cd sandbox && ./deploy.sh' returned a non-zero code: 2
没找到latex2man个包, 源里搜索不到
更新了下依赖,再重新build一把试试?
现在是另一个文件了...
Making all in doc
make[1]: Entering directory `/bfs/thirdsrc/libunwind-0.99/doc'
latex2man -t ./libunwind.trans unw_get_proc_name.tex unw_get_proc_name.man
make[1]: latex2man: Command not found
make[1]: *** [unw_get_proc_name.man] Error 127
make[1]: Leaving directory `/bfs/thirdsrc/libunwind-0.99/doc'
make: *** [all-recursive] Error 1
The command '/bin/sh -c cd /bfs && ./build.sh && cd sandbox && ./deploy.sh' returned a non-zero code: 2
先把clone下来的bfs目录下的thirdsrc
目录删掉,然后再重新执行一下build.sh
试试看?
docker 构建我没启用缓存, 每次都会重新构建一个环境再编译的.
这两个文件的是不是也需要注释掉?
libunwind-0.99/doc/Makefile.in
libunwind-0.99/doc/Makefile.in/Makefile
我是直接把doc/Makefile.am
里的latex
命令全换成echo
了,看起来是漏掉了两个,那两个应该也注释掉的,然后应该就可以了,试试看?
更新了一下,彻底把latex
换掉了,现在编应该是可以了
谢谢, 可以了。
最新的dockerfile, 可以的话建议在docker hub上构建一个镜像(docker hub可以自动构建), 这样新手入门时就简单了。
FROM centos:latest
MAINTAINER ystyle "[email protected]"
RUN yum -y groupinstall 'Development Tools' && yum -y install zlib-devel wget fuse fuse-devel git psmisc &&\
cd / && git clone https://github.com/baidu/bfs.git &&\
#sed -i '4a FUSE_PATH=/usr/include/fuse/' /bfs/Makefile &&\
cd /bfs && ./build.sh && cd sandbox && ./deploy.sh &&\
yum -y groupremove 'Development Tools' && yum clean all &&\
cd ../ && rm -rf thirdparty thirdsrc .build .git src
EXPOSE 8827 8828 8829
WORKDIR /bfs/sandbox/
CMD ./start_bfs.sh && tail -f /dev/null
使用方法:
- touch dockerfile
- 复制以上内容进去
- docker build baidu/bfs .
- docker run -d -ti -p 8827:8827 --name bfs baidu/bfs
如果docker hub后弄好了, 新手只需要执行以上的最后一条命令就要以启动了。
@ystyle 你这个dockerfile直接提个pr吧, 我觉得放根目录就可以
fuse 在你们开发环境是怎么弄的? cetnos 7 源里只能下载到2.9 的。 还有就是只要fuse-devel
包就好了吗?
fuse-devel
提供头文件和库 ,还需要内核的fuse
模块来支持fuse的运行,否则只能编译通过,但是不能运行
- 源里的 fuse 是内核模块? 源里的估计也是用户态的库的,没通过源装过
- fuse-devel 好像依赖了fuse-libs , 是不是编译就只需要这个? 对,编译只需要这个
- libfuse 这个只是lib? 对,这个只是个用户态的lib
还是不在懂, 这几个. fuse这个东西主要分三部分,一个内核态的模块,一个用户态的lib,一个用户程序自己的实现
/usr/bin/ld: cannot find -lfuse
collect2: error: ld returned 1 exit status
make: *** [bfs_mount] Error 1
make: *** Waiting for unfinished jobs....
用2.9的编译出现这个,lfuse 源里找不到
看起来像是libfuse没有装上
FUSE_PATH 是libfuse目录还是fuse.h 的那个目录?
是包含fuse.h
的目录,libfuse安装后,会提供这个文件
yum instal fuse fuse-devel fuse-libs 和 编译 https://github.com/libfuse/libfuse.git 的2.8.7 后, 都没有lfuse 这个
自己手动编译后,没有生成libfuse.a
?
这个是有啊, 不过和fuse.h不是同一个目录的。
嗯,fuse.h
应该存在于include
目录中,libfuse.a
应该存在于libs
目录中