如何用x11grab编译ffmpeg? xlib缺失

时间:2015-12-10 16:16:27

标签: compiler-errors ffmpeg centos

我正在使用centos 7.1 x64编译ffmpeg。我收到的错误信息是

user = ... # get user somehow
batch = [{name: "dsfdf" },{name: "dfsdfh"}].collect { |msg| {name: msg.fetch(:name), user_id: user.id} }
Message.collection.insert(batch)

的config.log

#### FFmpeg static build, by STVS SA ####
*** Building FFmpeg ***
ERROR: Xlib not found

但是我已经安装了libxcb yum,这可能是什么原因?

编辑:

gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -I/home/shuman/github/ffmpeg-static/target/include -I/home/shuman/github/ffmpeg-static/target/include -static --static -std=c99 -fomit-frame-pointer -pthread -I/home/shuman/github/ffmpeg-static/target/include/opus -I/home/shuman/github/ffmpeg-static/target/include -I/home/shuman/github/ffmpeg-static/target/include -I/home/shuman/github/ffmpeg-static/target/include -I/home/shuman/github/ffmpeg-static/target/include -I/home/shuman/github/ffmpeg-static/target/include -I/home/shuman/github/ffmpeg-static/target/include -c -o /tmp/ffconf.eYdD6TBQ.o /tmp/ffconf.UnBT7bp1.c
gcc -L/home/shuman/github/ffmpeg-static/target/lib -lm -L/home/shuman/github/ffmpeg-static/target/lib -lm -static -Wl,--as-needed -Wl,-z,noexecstack -o /tmp/ffconf.6gKhjd90 /tmp/ffconf.eYdD6TBQ.o -lxcb -lxvidcore -L/home/shuman/github/ffmpeg-static/target/lib -lx264 -lpthread -lm -L/home/shuman/github/ffmpeg-static/target/lib -lvpx -lm -L/home/shuman/github/ffmpeg-static/target/lib -lvpx -lm -L/home/shuman/github/ffmpeg-static/target/lib -lvpx -lm -L/home/shuman/github/ffmpeg-static/target/lib -lvpx -lm -lvorbisenc -lvorbis -logg -ltheoraenc -ltheoradec -logg -L/home/shuman/github/ffmpeg-static/target/lib -lrtmp -lz -lssl -lcrypto -L/home/shuman/github/ffmpeg-static/target/lib -lopus -lmp3lame -lfaac -lm -lbz2 -lz -pthread -ldl -lXext
/usr/bin/ld: cannot find -lxcb
collect2: error: ld returned 1 exit status
ERROR: Xlib not found

编辑:事实证明这是因为我没有使用正确的配置命令行,在执行此guide后,它现在可以使用

$ rpm -qa | grep libxcb
libxcb-devel-1.11-4.el7.x86_64
libxcb-1.11-4.el7.i686
libxcb-1.11-4.el7.x86_64
compat-libxcb-1.9-1.el7.x86_64

$ locate xcb.h
/home/shuman/Downloads/buildroot/package/x11r7/libxcb/libxcb.hash
/usr/include/X11/Xlib-xcb.h
/usr/include/cairo/cairo-xcb.h
/usr/include/xcb/xcb.h

$ locate xcb.so
/home/shuman/.dropbox-dist/dropbox-lnx.x86_64-3.10.11/libX11-xcb.so.1
/home/shuman/.dropbox-dist/dropbox-lnx.x86_64-3.10.11/plugins/platforms/libqxcb.so
/usr/lib/libX11-xcb.so
/usr/lib/libX11-xcb.so.1
/usr/lib/libX11-xcb.so.1.0.0
/usr/lib/libxcb.so.1
/usr/lib/libxcb.so.1.1.0
/usr/lib64/libX11-xcb.so
/usr/lib64/libX11-xcb.so.1
/usr/lib64/libX11-xcb.so.1.0.0
/usr/lib64/libxcb.so
/usr/lib64/libxcb.so.1
/usr/lib64/libxcb.so.1.1.0

其中,$ TARGET_DIR是所有依赖库安装的地方,这是我的静态ffmpeg build script的一部分(使用librtmp和libx265和x11grab)

0 个答案:

没有答案