无法编译HTTP-Live-Video-Stream-Segmenter-and-Distributor

时间:2012-03-21 11:29:01

标签: ubuntu http-live-streaming

我在Ubuntu 11.10上运行,打算编译HTTP Live Video Stream Segment and Distrbutor

按照here的说明,我设法相应地设置FFMpeg。但是当我尝试配置它时遇到了错误。

gcc -v -Wall -g live_segmenter.c -o live_segmenter \     -lavformat -lavcodec -lavutil -lvorbis -ltheora \     -lbz2 -lm -lz -lfaac -lmp3lame \     -I / tmp / old_ffmpeg / include \     -L / TMP / old_ffmpeg / lib中

以下是错误消息:

    Using built-in specs.
    COLLECT_GCC=gcc
    COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6.1/lto-wrapper
    Target: x86_64-linux-gnu
    Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.1-9ubuntu3' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++,go --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
    Thread model: posix
    gcc version 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3) 
    COLLECT_GCC_OPTIONS='-v' '-Wall' '-g' '-o' 'live_segmenter' '-I' '/tmp/old_ffmpeg/include' '-L/tmp/old_ffmpeg/lib' '-mtune=generic' '-march=x86-64'
     /usr/lib/gcc/x86_64-linux-gnu/4.6.1/cc1 -quiet -v -I /tmp/old_ffmpeg/include -imultilib . -imultiarch x86_64-linux-gnu live_segmenter.c -quiet -dumpbase live_segmenter.c -mtune=generic -march=x86-64 -auxbase live_segmenter -g -Wall -version -fstack-protector -o /tmp/ccJ5ih1S.s
    GNU C (Ubuntu/Linaro 4.6.1-9ubuntu3) version 4.6.1 (x86_64-linux-gnu)
        compiled by GNU C version 4.6.1, GMP version 5.0.1, MPFR version 3.0.1-p3, MPC version 0.9
    GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
    ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"
    ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../../x86_64-linux-gnu/include"
    #include "..." search starts here:
    #include <...> search starts here:
     /tmp/old_ffmpeg/include
     /usr/lib/gcc/x86_64-linux-gnu/4.6.1/include
     /usr/local/include
     /usr/lib/gcc/x86_64-linux-gnu/4.6.1/include-fixed
     /usr/include/x86_64-linux-gnu
     /usr/include
    End of search list.
    GNU C (Ubuntu/Linaro 4.6.1-9ubuntu3) version 4.6.1 (x86_64-linux-gnu)
        compiled by GNU C version 4.6.1, GMP version 5.0.1, MPFR version 3.0.1-p3, MPC version 0.9
    GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
    Compiler executable checksum: 5dede901e38d49932d3155c3e888bca1
    COLLECT_GCC_OPTIONS='-v' '-Wall' '-g' '-o' 'live_segmenter' '-I' '/tmp/old_ffmpeg/include' '-L/tmp/old_ffmpeg/lib' '-mtune=generic' '-march=x86-64'
     as --64 -o /tmp/ccFEK6Gy.o /tmp/ccJ5ih1S.s
    COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/4.6.1/:/usr/lib/gcc/x86_64-linux-gnu/4.6.1/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/4.6.1/:/usr/lib/gcc/x86_64-linux-gnu/
    LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/4.6.1/:/usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../:/lib/:/usr/lib/
    COLLECT_GCC_OPTIONS='-v' '-Wall' '-g' '-o' 'live_segmenter' '-I' '/tmp/old_ffmpeg/include' '-L/tmp/old_ffmpeg/lib' '-mtune=generic' '-march=x86-64'
     /usr/lib/gcc/x86_64-linux-gnu/4.6.1/collect2 --build-id --no-add-needed --as-needed --eh-frame-hdr -m elf_x86_64 --hash-style=gnu -dynamic-linker /lib64/ld-linux-x86-64.so.2 -z relro -o live_segmenter /usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../x86_64-linux-gnu/crt1.o /usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/4.6.1/crtbegin.o -L/tmp/old_ffmpeg/lib -L/usr/lib/gcc/x86_64-linux-gnu/4.6.1 -L/usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../.. /tmp/ccFEK6Gy.o -lavformat -lavcodec -lavutil -lvorbis -ltheora -lbz2 -lm -lz -lfaac -lmp3lame -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/x86_64-linux-gnu/4.6.1/crtend.o /usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../x86_64-linux-gnu/crtn.o
    /tmp/old_ffmpeg/lib/libavcodec.a(vaapi.o): In function `commit_slices':
    /home/tony/Desktop/ffmpeg-export-2009-12-01/libavcodec/vaapi.c:97: undefined reference to `vaCreateBuffer'
    /home/tony/Desktop/ffmpeg-export-2009-12-01/libavcodec/vaapi.c:106: undefined reference to `vaCreateBuffer'
    /tmp/old_ffmpeg/lib/libavcodec.a(vaapi.o): In function `alloc_buffer':
    /home/tony/Desktop/ffmpeg-export-2009-12-01/libavcodec/vaapi.c:125: undefined reference to `vaCreateBuffer'
    /home/tony/Desktop/ffmpeg-export-2009-12-01/libavcodec/vaapi.c:127: undefined reference to `vaMapBuffer'
    /home/tony/Desktop/ffmpeg-export-2009-12-01/libavcodec/vaapi.c:125: undefined reference to `vaCreateBuffer'
    /home/tony/Desktop/ffmpeg-export-2009-12-01/libavcodec/vaapi.c:127: undefined reference to `vaMapBuffer'
    /home/tony/Desktop/ffmpeg-export-2009-12-01/libavcodec/vaapi.c:125: undefined reference to `vaCreateBuffer'
    /home/tony/Desktop/ffmpeg-export-2009-12-01/libavcodec/vaapi.c:127: undefined reference to `vaMapBuffer'
    /tmp/old_ffmpeg/lib/libavcodec.a(vaapi.o): In function `destroy_buffers':
    /home/tony/Desktop/ffmpeg-export-2009-12-01/libavcodec/vaapi.c:37: undefined reference to `vaDestroyBuffer'
    /home/tony/Desktop/ffmpeg-export-2009-12-01/libavcodec/vaapi.c:37: undefined reference to `vaDestroyBuffer'
    /home/tony/Desktop/ffmpeg-export-2009-12-01/libavcodec/vaapi.c:37: undefined reference to `vaDestroyBuffer'
    /home/tony/Desktop/ffmpeg-export-2009-12-01/libavcodec/vaapi.c:37: undefined reference to `vaDestroyBuffer'
    /tmp/old_ffmpeg/lib/libavcodec.a(vaapi.o): In function `render_picture':
    /home/tony/Desktop/ffmpeg-export-2009-12-01/libavcodec/vaapi.c:48: undefined reference to `vaUnmapBuffer'
    /home/tony/Desktop/ffmpeg-export-2009-12-01/libavcodec/vaapi.c:61: undefined reference to `vaBeginPicture'
    /home/tony/Desktop/ffmpeg-export-2009-12-01/libavcodec/vaapi.c:65: undefined reference to `vaRenderPicture'
    /home/tony/Desktop/ffmpeg-export-2009-12-01/libavcodec/vaapi.c:69: undefined reference to `vaRenderPicture'
    /home/tony/Desktop/ffmpeg-export-2009-12-01/libavcodec/vaapi.c:74: undefined reference to `vaEndPicture'
    /home/tony/Desktop/ffmpeg-export-2009-12-01/libavcodec/vaapi.c:52: undefined reference to `vaUnmapBuffer'
    /home/tony/Desktop/ffmpeg-export-2009-12-01/libavcodec/vaapi.c:57: undefined reference to `vaUnmapBuffer'
    collect2: ld returned 1 exit status

看起来有些库缺失,但我不知道它是什么。

如何解决此问题 - 已更新

只需添加-lva即可

gcc -v -Wall -g live_segmenter.c -o live_segmenter \     -lavformat -lavcodec -lavutil -lvorbis -ltheora \     -lbz2 -lm -lz -lfaac -lmp3lame -lva \     -I / tmp / old_ffmpeg / include \     -L / TMP / old_ffmpeg / lib中

1 个答案:

答案 0 :(得分:6)

你缺少了libva,你也不需要它。您可以将--disable-vaapi添加到ffmpeg配置中。否则,您需要将-lva添加到LDFLAGS。