gpt4 book ai didi

android - ffmpeg编译时出错

转载 作者:行者123 更新时间:2023-11-29 02:06:34 24 4
gpt4 key购买 nike

我试图通过以下脚本编译 ffmpeg,但在编译时出现错误:(使用 windows 7 - android ndk 7rb 和 cygwin)

s@s-PC /cygdrive/f/export/ffmpeg-0.8.10
$ ./setup.sh
F:/Compiler/android-ndk-r7b/toolchains/arm-linux-androideabi-4.4.3/prebuilt/wind ows/bin/arm-linux-androideabi-gcc is unable to create an executable file.
C compiler test failed.

If you think configure made a mistake, make sure you are using the latest
version from Git. If the latest version fails, report the problem to the
ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.log" produced by configure as this will help
solving the problem.
./setup.sh: line 48: --extra-cflags=: command not found
./setup.sh: line 51: --extra-ldflags=: command not found
./setup.sh: line 53: --extra-ldflags=: command not found
Makefile:1: config.mak: No such file or directory
libavutil/Makefile:1: libavutil/../config.mak: No such file or directory
libavutil/../subdir.mak:96: warning: overriding recipe for target `libavutil/'
libavutil/../subdir.mak:26: warning: ignoring old recipe for target `libavutil/'
libavutil/../subdir.mak:96: warning: overriding recipe for target `libavutil/'
libavutil/../subdir.mak:96: warning: ignoring old recipe for target `libavutil/'
Makefile:239: /tests/fate.mak: No such file or directory
Makefile:240: /tests/fate2.mak: No such file or directory
Makefile:242: /tests/fate/aac.mak: No such file or directory
Makefile:243: /tests/fate/als.mak: No such file or directory
Makefile:244: /tests/fate/fft.mak: No such file or directory
Makefile:245: /tests/fate/h264.mak: No such file or directory
Makefile:246: /tests/fate/mp3.mak: No such file or directory
Makefile:247: /tests/fate/vorbis.mak: No such file or directory
Makefile:248: /tests/fate/vp8.mak: No such file or directory
make: *** No rule to make target `/tests/fate/vp8.mak'. Stop.
Makefile:1: config.mak: No such file or directory
libavutil/Makefile:1: libavutil/../config.mak: No such file or directory
libavutil/../subdir.mak:96: warning: overriding recipe for target `libavutil/'
libavutil/../subdir.mak:26: warning: ignoring old recipe for target `libavutil/'
libavutil/../subdir.mak:96: warning: overriding recipe for target `libavutil/'
libavutil/../subdir.mak:96: warning: ignoring old recipe for target `libavutil/'
Makefile:239: /tests/fate.mak: No such file or directory
Makefile:240: /tests/fate2.mak: No such file or directory
Makefile:242: /tests/fate/aac.mak: No such file or directory
Makefile:243: /tests/fate/als.mak: No such file or directory
Makefile:244: /tests/fate/fft.mak: No such file or directory
Makefile:245: /tests/fate/h264.mak: No such file or directory
Makefile:246: /tests/fate/mp3.mak: No such file or directory
Makefile:247: /tests/fate/vorbis.mak: No such file or directory
Makefile:248: /tests/fate/vp8.mak: No such file or directory
make: *** No rule to make target `/tests/fate/vp8.mak'. Stop.

这是我的脚本:

    #!/bin/bash

export TMPDIR=C:/cygwin/tmp

ANDROID_API=android-8
export ANDROID_NDK=F:/Compiler/android-ndk-r7b
export ANDROID_SDK=F:/Compiler/android-sdk
SYSROOT=$ANDROID_NDK/platforms/$ANDROID_API/arch-arm
ANDROID_BIN=$ANDROID_NDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/bin
CROSS_COMPILE=${ANDROID_BIN}/arm-linux-androideabi-
export PATH=$PATH:$ANDROID_SDK/tools:$ANDROID_SDK/platform-tools

export ARM_ROOT=$ANDROID_NDK
export ARM_INC=$ARM_ROOT/platforms/android-5/arch-arm/usr/include
export ARM_LIB=$ARM_ROOT/platforms/android-5/arch-arm/usr/lib
export LIB_INC=${HOME}/include
export LIB_LIB=${HOME}/lib


CFLAGS=" -I$ARM_INC -fPIC -DANDROID -fpic -mthumb-interwork -ffunction-sections -funwind-tables -fstack-protector -fno-short-enums -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__ -Wno-psabi -march=armv5te -mtune=xscale -msoft-float -mthumb -Os -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 -DANDROID -Wa,--noexecstack -MMD -MP "
LDFLAGS=" -nostdlib -Bdynamic -Wl,--no-undefined -Wl,-z,noexecstack -Wl,-z,nocopyreloc -Wl,-soname,/system/lib/libz.so -Wl,-rpath-link=$ARM_LIB,-dynamic-linker=/system/bin/linker -L$ARM_LIB -nostdlib $ARM_LIB/crtbegin_dynamic.o $ARM_LIB/crtend_android.o -lc -lm -ldl -lgcc "

FLAGS="--target-os=linux
--enable-cross-compile
--cross-prefix=$CROSS_COMPILE
--arch=arm --prefix=$HOME
--disable-shared
--enable-static
--extra-libs=-static
--extra-cflags=--static
--enable-small
--disable-asm
--disable-yasm
--disable-amd3dnow
--disable-amd3dnowext
--disable-mmx
--disable-mmx2
--disable-sse
--disable-ssse3
--disable-indevs"


export CFLAGS=$EXTRA_CFLAGS
export LDFLAGS=$EXTRA_LDFLAGS


./configure $FLAGS
--extra-cflags="$CFLAGS"
--extra-ldflags="$LDFLAGS" \
--cc="${CROSS_COMPILE}gcc
--sysroot=${SYSROOT}"
--extra-ldflags="$LDFLAGS" \
--cxx="${CROSS_COMPILE}g++ --sysroot=${SYSROOT}" \
--nm="${CROSS_COMPILE}nm" \
--ar="${CROSS_COMPILE}ar"


make clean
make -j4 || exit 1
make install || exit 1

有什么想法吗?

最佳答案

您没有在 ./configure 行(以及以下一些行)中转义换行符,因此标​​志被视为命令而不是标志。显然 --extra-cflags 不是有效命令,缺少这些标志也会导致配置失败。

关于android - ffmpeg编译时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9738987/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com