mplayer 配置错误:共享 FFmpeg 需要 libavutil/x86/asm.h 标头

mplayer 配置错误:共享 FFmpeg 需要 libavutil/x86/asm.h 标头

在 Ubuntu 14.04 中,我运行./configure --enable-gui --enable-xvid-lavc --enable-xv --enable-alsa安装mplayer,然后Checking for FFmpeg ....出现错误。cat config.log错误详细信息如下:

============ Checking for FFmpeg ============

 #include 'libavutil/x86/asm.h'

 int main(void) { return 0; }

cc -Wundef -Wall -Wno-switch -Wno-parentheses -Wpointer-arith -Wredundant-decls -Wstrict-prototypes -Wmissing-prototypes -Wdisabled-optimization -Wno-pointer-sign -Wdeclaration-after-statement -std=gnu99 -Werror-implicit-function-declaration -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ISOC99_SOURCE -I. -Iffmpeg -O4 -march=native -mtune=native -pipe -ffast-math -fomit-frame-pointer -fno-tree-vectorize /tmp/mplayer-configure--1996/tmp.c -Ilibdvdread4  -fpie -DPIC -D_REENTRANT   -ffast-math -fpie -pie   -lrt -lasound -ldl -lpthread  -lXv  -o /tmp/mplayer-configure--1996/tmp  -lm

In file included from /tmp/mplayer-configure--1996/tmp.c:1:0:

ffmpeg/libavutil/x86/asm.h:30:5: warning: "ARCH_X86_64" is not defined [-Wundef]

 #if ARCH_X86_64

ffmpeg/libavutil/x86/asm.h:50:7: warning: "ARCH_X86_32" is not defined [-Wundef]

 #elif ARCH_X86_32

ffmpeg/libavutil/x86/asm.h:77:5: warning: "ARCH_X86_64" is not defined [-Wundef]

 #if ARCH_X86_64 && defined(PIC)

ffmpeg/libavutil/x86/asm.h:93:5: warning: "HAVE_XMM_CLOBBERS" is not defined [-Wundef]

 #if HAVE_XMM_CLOBBERS

ffmpeg/libavutil/x86/asm.h:105:5: warning: "ARCH_X86_64" is not defined [-Wundef]

 #if ARCH_X86_64 && defined(PIC)

ffmpeg/libavutil/x86/asm.h:111:5: warning: "HAVE_INLINE_ASM_DIRECT_SYMBOL_REFS" is not defined [-Wundef]

 #if HAVE_INLINE_ASM_DIRECT_SYMBOL_REFS

/usr/bin/ld: cannot find -lasound

collect2: error: ld returned 1 exit status

我不知道发生了什么,请帮忙

答案1

如果您想mplayer从源代码构建,我会安装其所有构建依赖项:

sudo apt-get build-dep mplayer

答案2

实际错误是:

/usr/bin/ld: cannot find -lasound

我认为你需要安装libasound2-dev

sudo apt-get install libasound2-dev

答案3

按照 Ubuntu 论坛上的这个指南操作可能是最简单的:

如何:在 Ubuntu 最新发布版本下构建 svn MPlayer

http://ubuntuforums.org/showthread.php?t=2149564

这将保证 MPlayer 和最新的 SMPlayer 能够正常工作且功能齐全...

相关内容