【问题标题】:can't compile ffmpeg on Solaris 10 sparc无法在 Solaris 10 sparc 上编译 ffmpeg
【发布时间】:2014-06-09 21:07:30
【问题描述】:

有人为 Solaris 10 sparc 编译过 ffmpeg 0.6.1 吗?我收到以下错误:

    uname -a
SunOS SERVERNAME 5.10 Generic_118833-36 sun4u sparc SUNW,Sun-Fire-V440

bwddmadm@bwddmliv>/export/home/USERID/ffmpeg-0.6.1/configure --prefix=/export/home/USERID/ffmpegX --extra-cflags="-fPIC" --disable-mmx --disable-protocol=udp --disable-encoder=nellymoser
Broken shell detected.  Trying alternatives.
Trying shell bash
grep: illegal option -- q
Usage: grep -hblcnsviw pattern file . . .
grep: illegal option -- q
Usage: grep -hblcnsviw pattern file . . .
grep: illegal option -- q
Usage: grep -hblcnsviw pattern file . . .
grep: illegal option -- q
Usage: grep -hblcnsviw pattern file . . .
grep: illegal option -- q
Usage: grep -hblcnsviw pattern file . . .
grep: illegal option -- q
Usage: grep -hblcnsviw pattern file . . .
grep: illegal option -- q
Usage: grep -hblcnsviw pattern file . . .
grep: illegal option -- q
Usage: grep -hblcnsviw pattern file . . .
Unknown C compiler gcc
awk: syntax error near line 1
awk: illegal statement near line 1
grep: illegal option -- q
Usage: grep -hblcnsviw pattern file . . .
install prefix            /export/home/USERID/ffmpegX
source path               /export/home/USERID/ffmpeg-0.6.1
C compiler                gcc
.align is power-of-two    no
ARCH                      sparc (generic)
big-endian                no
runtime cpu detection     no
VIS enabled               yes
gprof enabled             no
debug symbols             yes
strip symbols             yes
optimizations             yes
static                    yes
shared                    no
postprocessing support    no
new filter support        no
filters using lavformat   no
network support           yes
threading support         no
SDL support               no
Sun medialib support      no
AVISynth enabled          no
libdc1394 support         no
libdirac enabled          no
libfaac enabled           no
libfaad enabled           no
libfaad dlopened          no
libgsm enabled            no
libmp3lame enabled        no
libnut enabled            no
libopencore-amrnb support no
libopencore-amrwb support no
libopenjpeg enabled       no
librtmp enabled           no
libschroedinger enabled   no
libspeex enabled          no
libtheora enabled         no
libvorbis enabled         no
libvpx enabled            no
libx264 enabled           no
libxvid enabled           no
zlib enabled              no
bzlib enabled             no

Enabled decoders:
pr:  -- empty file

Enabled encoders:
pr:  -- empty file

Enabled hwaccels:
pr:  -- empty file

Enabled parsers:
pr:  -- empty file

Enabled demuxers:
pr:  -- empty file

Enabled muxers:
pr:  -- empty file

Enabled protocols:
pr:  -- empty file

Enabled filters:
pr:  -- empty file

Enabled bsfs:
pr:  -- empty file

Enabled indevs:
pr:  -- empty file

Enabled outdevs:
pr:  -- empty file

License: LGPL version 2.1 or later
Creating config.mak and config.h...
bwddmadm@bwddmliv> gmake
/export/home/USERID/ffmpeg-0.6.1/version.sh: syntax error at line 4: `revision=$' unexpected
CC      libavdevice/alldevices.o
libavdevice/alldevices.c: In function `avdevice_register_all':
libavdevice/alldevices.c:42: error: `CONFIG_ALSA_OUTDEV' undeclared (first use in this function)
libavdevice/alldevices.c:42: error: (Each undeclared identifier is reported only once
libavdevice/alldevices.c:42: error: for each function it appears in.)
libavdevice/alldevices.c:42: error: `CONFIG_ALSA_INDEV' undeclared (first use in this function)
libavdevice/alldevices.c:43: error: `CONFIG_AUDIO_BEOS_OUTDEV' undeclared (first use in this function)
libavdevice/alldevices.c:43: error: `CONFIG_AUDIO_BEOS_INDEV' undeclared (first use in this function)
libavdevice/alldevices.c:44: error: `CONFIG_BKTR_INDEV' undeclared (first use in this function)
libavdevice/alldevices.c:45: error: `CONFIG_DV1394_INDEV' undeclared (first use in this function)
libavdevice/alldevices.c:46: error: `CONFIG_JACK_INDEV' undeclared (first use in this function)
libavdevice/alldevices.c:47: error: `CONFIG_OSS_OUTDEV' undeclared (first use in this function)
libavdevice/alldevices.c:47: error: `CONFIG_OSS_INDEV' undeclared (first use in this function)
libavdevice/alldevices.c:48: error: `CONFIG_V4L2_INDEV' undeclared (first use in this function)
libavdevice/alldevices.c:49: error: `CONFIG_V4L_INDEV' undeclared (first use in this function)
libavdevice/alldevices.c:50: error: `CONFIG_VFWCAP_INDEV' undeclared (first use in this function)
libavdevice/alldevices.c:51: error: `CONFIG_X11_GRAB_DEVICE_INDEV' undeclared (first use in this function)
libavdevice/alldevices.c:54: error: `CONFIG_LIBDC1394_INDEV' undeclared (first use in this function)
gmake: *** [libavdevice/alldevices.o] Error 1
bwddmadm@bwddmliv> exit

script done on Fri Jan 14 11:34:05 2011

【问题讨论】:

    标签: ffmpeg solaris sparc


    【解决方案1】:

    1.- 确保已安装 gcc

    install gcc if needed
    # pkg search gcc
    # pkg install pkg:/developer/gcc-45@4.5.2-0.175.1.0.0.24.0
    

    2.- 确保安装了山药

    install yams if needed
    download from http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz
    unzip, untar in local dir
    #./configure
    #make install
    add the path
    # PATH=$PATH:/usr/local/bin
    

    3.- 确保已安装 GNU Make

    Installed if required
    # pkg search gnu make
    # pkg install pkg:/developer/build/gnu-make@3.82-0.175.1.0.0.24.0
    

    4.- 确保它选择了正确的 grep

    e.g. by aliasing grep to /usr/sfw/bin/ggrep if you have the Sun Freeware package installed
    

    5.- 下载源代码:http://ffmpeg.org/releases/ffmpeg-1.0.tar.gz

    a.- unzip, untar in local dir
    b.- edit configure
        1.- replace awk by nawk
        2.- follow the patch configuration from https://trac.handbrake.fr/browser/trunk/contrib/patch-ffmpeg-solaris.patch?rev=1531
            Some details about the reasons here : http://www.techques.com/question/1-4690966/can't-compile-ffmpeg-on-Solaris-10-sparc
            Be careful the line numbers are not valid for version 1.0
            place the modifications suggested accordingly 
    c.- #./configure
    d.- # gmake
    

    诺埃尔·贾弗雷

    【讨论】:

      【解决方案2】:

      不幸的是,Solaris /usr/bin/grep does not support the -q flag,您似乎需要将路径设置为查找GNU grep 或符合 POSIX 的/usr/xpg4/bin/grep 作为 grep 命令。 Google 还可以找到一些人们为解决此问题而编写的 ffmpeg 补丁。

      这个problem的ffmpeg作者know,但拒绝更改他们的配置脚本,因为他们依赖于POSIX-compliance。

      【讨论】:

      • 谢谢,我今天去看看。我找不到你提到的补丁,你能提供一个链接吗?
      • 嗨,我尝试通过 alias='/usr/xpg4/bin/grep' 为 grep 创建别名,然后我重新进行了配置部分并收到了相同的错误。
      • configure 之类的脚本在新的 shell 进程中运行,并且不会从当前的 shell 进程中获取别名 - 您必须更改路径。我所指的补丁位于trac.handbrake.fr/browser/trunk/contrib/… 等链接中
      • 谢谢,这个补丁已经三年了,我下载的当前版本的ffmpeg中没有匹配的行。我用谷歌搜索,找不到这个版本 0.6.1 的补丁。我已经解决了很多问题(请参阅下面我与 ShiDoiSi 的对话)。配置工作正常,我被困在'make'部分。你安装了ffmpeg吗?再次感谢您的所有建议。
      • 不,我从未构建或使用过 ffmpeg,抱歉。
      【解决方案3】:

      看起来构建脚本希望找到像 grep 这样的 GNU 版本的帮助程序。确保它选择正确的,例如如果您安装了 the Sun Freeware package,则将 grep 别名为 /usr/sfw/bin/ggrep

      【讨论】:

      • 谢谢,我试试看
      • 我通过创建别名进行了尝试: alias grep='/usr/sfw/bin/ggrep' 然后重新进行了配置,但仍然出现上述错误。你还有什么建议我试试吗?谢谢。
      • 嗯,好问题。然后只需在某个名称为grep 的地方进行符号链接,并将该位置放在 PATH 的前面。
      • 感谢您的反馈,我会对此进行测试并告诉您进展如何。
      • 嗯,我想这让我更进一步。由于空间不足,我无法在此处发布。 pastebin.com/Z5LdsbbX如果你有任何进一步的建议会很有帮助,我很感激你到目前为止所做的一切。谢谢
      【解决方案4】:

      在这个话题上花了几个小时后,我终于在 Solaris 5.1 SPARC 上安装了 ffmpeg 2.2.2。步骤:

      • 从以下位置下载最新版本的 tar 源 http://www.ffmpeg.org/download.html
      • 解压焦油
      • Grep 应参考 GGREP - 别名 grep = /usr/sfw/bin/ggrep
      • 使用 bash 代替 sh - 配置和 version.sh 的第一行 文件需要修改
      • 使用 nawk 代替 awk
      • 配置将隐式函数声明警告视为错误。 这可能会导致问题 - 我不得不将其设置回警告级别 它导致有关缺少参考的错误(这是 标准库,所以它不应该是一个问题)
      • 关于 4-6 点应用以下命令
      • sed 's/\/bin\/sh/\/bin\/bash/' configure > configure.mod
      • sed 's/awk/nawk/' configure.mod > configure.mod2
      • sed '/implicit-function-declaration/d' configure.mod2 > configure.mod3

      • cp configure.mod3 configure

      • sed 's/\/bin\/sh/\/bin\/bash/' version.sh > version.sh.mod
      • cp version.sh.mod version.sh

      • 运行配置

      • 配置 --extra-cflags="-fpic" --disable-mmx --disable-protocol=udp --disable-encoder=nellymoser --disable-debug --arch=sparc --target-os=sunos

      • gmake 安装

      • 启动 ffmpeg:./ffmpeg

      【讨论】:

        猜你喜欢
        • 2019-11-03
        • 1970-01-01
        • 1970-01-01
        • 2019-10-30
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2019-11-06
        相关资源
        最近更新 更多