ubuntu 20.04 编译安装ffmpge 出错

被淹死的鱼
  • 2
新手上路,请多包涵

因为是docker 里配置的, 这个库其实是已经安装了
这是安装步骤

apt-get install libvpx-dev
cd ~/ffmpeg_sources
wget http://storage.googleapis.com/downloads.webmproject.org/releases/webm/libvpx-1.6.1.tar.bz2
tar xjvf libvpx-1.6.1.tar.bz2
cd llibvpx-1.6.1
PATH="$HOME/bin:$PATH" ./configure --prefix="$HOME/ffmpeg_build" --disable-examples --disable-unit-tests
PATH="$HOME/bin:$PATH" make
make install
make clean

设置配置如下

./configure --prefix=/root/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/root/ffmpeg_build/include --extra-ldflags=-L/root/ffmpeg_build/lib --bindir=/root/bin --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree

错误日志

./configure --prefix=/root/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/root/ffmpeg_build/include --extra-ldflags=-L/root/ffmpeg_build/lib --bindir=/root/bin --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree
ALL_COMPONENTS='

    aac_adtstoasc_bsf
av1_frame_merge_bsf
av1_frame_split_bsf
av1_metadata_bsf
chomp_bsf
dump_extradata_bsf
dca_core_bsf
eac3_core_bsf
extract_extradata_bsf
filter_units_bsf
h264_metadata_bsf
h264_mp4toannexb_bsf
h264_redundant_pps_bsf
hapqa_extract_bsf
hevc_metadata_bsf
hevc_mp4toannexb_bsf
imx_dump_header_bsf
mjpeg2jpeg_bsf
mjpega_dump_header_bsf
mp3_header_decompress_bsf
mpeg2_metadata_bsf
mpeg4_unpack_bframes_bsf
mov2textsub_bsf
noise_bsf
null_bsf
opus_metadata_bsf
pcm_rechunk_bsf
prores_metadata_bsf
remove_extradata_bsf
setts_bsf
"ffbuild/config.log" 17082L, 434998C                                                                                 1,1           Top
/usr/bin/ld: /root/ffmpeg_build/lib/libvpx.a(subpel_variance_sse2.asm.o): relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIE
collect2: error: ld returned 1 exit status
check_lib libvpx_vp9_encoder vpx/vpx_encoder.h vpx/vp8cx.h vpx_codec_vp9_cx VPX_IMG_FMT_HIGHBITDEPTH -lvpx -lm -pthread
check_func_headers vpx/vpx_encoder.h vpx/vp8cx.h vpx_codec_vp9_cx VPX_IMG_FMT_HIGHBITDEPTH -lvpx -lm -pthread
test_ld cc -lvpx -lm -pthread
test_cc -pthread
BEGIN /tmp/ffconf.xhTzeSSn/test.c
    1   #include <vpx/vpx_encoder.h>
    2   #include <vpx/vp8cx.h>
    3   #include <stdint.h>
    4   long check_vpx_codec_vp9_cx(void) { return (long) vpx_codec_vp9_cx; }
    5   long check_VPX_IMG_FMT_HIGHBITDEPTH(void) { return (long) VPX_IMG_FMT_HIGHBITDEPTH; }
    6   int main(void) { int ret = 0;
    7    ret |= ((intptr_t)check_vpx_codec_vp9_cx) & 0xFFFF;
    8    ret |= ((intptr_t)check_VPX_IMG_FMT_HIGHBITDEPTH) & 0xFFFF;
    9   return ret; }
END /tmp/ffconf.xhTzeSSn/test.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DPIC -I/root/ffmpeg_build/include -std=c11 -fomit-frame-pointer -fPIC -pthread -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/uuid -I/usr/include/fribidi -I/usr/include/freetype2 -I/usr/include/libpng16 -I/root/ffmpeg_build/include -I/usr/include/freetype2 -I/usr/include/libpng16 -I/root/ffmpeg_build/include/opus -I/root/ffmpeg_build/include/opus -pthread -c -o /tmp/ffconf.xhTzeSSn/test.o /tmp/ffconf.xhTzeSSn/test.c
gcc -L/root/ffmpeg_build/lib -Wl,--as-needed -Wl,-z,noexecstack -pthread -o /tmp/ffconf.xhTzeSSn/test /tmp/ffconf.xhTzeSSn/test.o -lvpx -lm
/usr/bin/ld: /root/ffmpeg_build/lib/libvpx.a(fwd_txfm_ssse3_x86_64.asm.o): relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /root/ffmpeg_build/lib/libvpx.a(inv_txfm_ssse3_x86_64.asm.o): relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /root/ffmpeg_build/lib/libvpx.a(quantize_ssse3_x86_64.asm.o): relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /root/ffmpeg_build/lib/libvpx.a(subpel_variance_sse2.asm.o): relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIE
collect2: error: ld returned 1 exit status
libvpx enabled but no supported decoders found
回复
阅读 333
你知道吗?

宣传栏