libmp3lame.a中未定义的符号_init_xrpow_core_init

时间:2015-05-09 05:33:45

标签: android ffmpeg lame

我在我的android项目中使用ffmpeg tool with x264来编码视频。现在我想添加音频转换功能,从3gpp到mp3。据我所知,我应该将libmp3lame添加到ffmpeg bin。

我已下载last lame version并更新了一些文件:

android_build.sh

#!/bin/bash

. settings.sh

BASEDIR=$(pwd)
TOOLCHAIN_PREFIX=${BASEDIR}/toolchain-android

for i in "${SUPPORTED_ARCHITECTURES[@]}"
do
  rm -rf ${TOOLCHAIN_PREFIX}
  ./x264_build.sh $i $BASEDIR 0 || exit 1
  ./lame_build.sh $i $BASEDIR 0 || exit 1
  ./ffmpeg_build.sh $i $BASEDIR 0 || exit 1
done

rm -rf ${TOOLCHAIN_PREFIX}

lame_build.sh

#!/bin/bash

. abi_settings.sh $1 $2 $3

pushd lame

make clean

case $1 in
  armeabi-v7a | armeabi-v7a-neon)
    HOST=arm-linux
  ;;
  x86)
    HOST=i686-linux
  ;;
esac

echo $CFLAGS

./configure \
  --with-pic \
  --host="$HOST" \
  --enable-static \
  --disable-shared \
  --prefix="${TOOLCHAIN_PREFIX}" || exit 1

make -j${NUMBER_OF_CORES} install || exit 1

popd

ffmpeg_build.sh

#!/bin/bash
. abi_settings.sh $1 $2 $3

pushd ffmpeg

case $1 in
  armeabi-v7a | armeabi-v7a-neon)
    CPU='cortex-a8'
  ;;
  x86)
    CPU='i686'
  ;;
esac

make clean

./configure \
--target-os="$TARGET_OS" \
--cross-prefix="$CROSS_PREFIX" \
--arch="$NDK_ABI" \
--cpu="$CPU" \
--enable-runtime-cpudetect \
--sysroot="$NDK_SYSROOT" \
--enable-pic \
--enable-libx264 \
--enable-libmp3lame \
--enable-pthreads \
--disable-debug \
--disable-ffserver \
--enable-version3 \
--enable-hardcoded-tables \
--disable-ffplay \
--disable-ffprobe \
--enable-gpl \
--enable-yasm \
--disable-doc \
--disable-shared \
--enable-static \
--pkg-config="${2}/ffmpeg-pkg-config" \
--prefix="${2}/build/${1}" \
--extra-cflags="-I${TOOLCHAIN_PREFIX} -I${MP3LAME}/include $CFLAGS" \
--extra-ldflags="-L${TOOLCHAIN_PREFIX} -L${MP3LAME}/lib $LDFLAGS" \
--extra-libs="-lm" \
--extra-cxxflags="$CXX_FLAGS" || exit 1

make -j${NUMBER_OF_CORES} && make install || exit 1

popd

./ android_build.sh 的结果:

/bin/sh ../libtool --tag=CC   --mode=link gcc  -O3  -ffast-math             -funroll-loops -Wall  -fno-common      -static  -o lame lame_main.o main.o brhist.o console.o get_audio.o lametime.o parse.o timestatus.o ../libmp3lame/libmp3lame.la -lncurses  -liconv -lm 
libtool: link: gcc -O3 -ffast-math -funroll-loops -Wall -fno-common -o lame lame_main.o main.o brhist.o console.o get_audio.o lametime.o parse.o timestatus.o  ../libmp3lame/.libs/libmp3lame.a -lncurses -liconv -lm
Undefined symbols for architecture x86_64:
  "_init_xrpow_core_sse", referenced from:
      _init_xrpow_core_init in libmp3lame.a(quantize.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [lame] Error 1
make: *** [install-recursive] Error 1

我会很高兴你的回复!

0 个答案:

没有答案