[FFmpeg-trac] #2888(build system:new): Compile ffmpeg for Android on OSX failes

FFmpeg trac at avcodec.org
Thu Aug 22 17:42:52 CEST 2013


#2888: Compile ffmpeg for Android on OSX failes
-------------------------------------+-------------------------------------
             Reporter:  fscz         |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:  build        |                  Version:  git-
  system                             |  master
             Keywords:  gas-         |               Blocked By:
  preprocessor build make            |  Reproduced by developer:  0
             Blocking:               |
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 Summary of the bug:
 make failes at this particular command.
 gas-preprocessor.pl arm-linux-androideabi-gcc -I. -I./ -D_ISOC99_SOURCE
 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Dstrtod=avpriv_strtod -DPIC
 -O3 -Wall -mthumb -pipe -fpic -fasm -finline-limit=300 -ffast-math
 -fstrict-aliasing -Werror=strict-aliasing -fmodulo-sched -fmodulo-sched-
 allow-regmoves -Wno-psabi -Wa,--noexecstack -DANDROID -DNDEBUG
 -march=armv7-a -mthumb -mthumb-interwork -mfpu=neon -mfloat-abi=softfp
 -mvectorize-with-neon-quad -march=armv7-a -fPIC -g -MMD -MF
 libavcodec/arm/aacpsdsp_neon.d -MT libavcodec/arm/aacpsdsp_neon.o -c -o
 libavcodec/arm/aacpsdsp_neon.o libavcodec/arm/aacpsdsp_neon.S
 libavcodec/arm/aacpsdsp_neon.S: Assembler messages:
 libavcodec/arm/aacpsdsp_neon.S:320: Error: junk at end of line, first
 unrecognized character is `f'
 libavcodec/arm/aacpsdsp_neon.S:321: Error: junk at end of line, first
 unrecognized character is `f'
 libavcodec/arm/aacpsdsp_neon.S:322: Error: junk at end of line, first
 unrecognized character is `f'
 libavcodec/arm/aacpsdsp_neon.S:323: Error: junk at end of line, first
 unrecognized character is `f'
 libavcodec/arm/aacpsdsp_neon.S:324: Error: junk at end of line, first
 unrecognized character is `f'
 make: *** [libavcodec/arm/aacpsdsp_neon.o] Error 1

 It is unclear to me, if this is a problem with the source file or with the
 gas-preprocessor.
 I used this gas-preprocessor:
 https://github.com/yuvi/gas-preprocessor.git

 How to reproduce:

 gas:
 checkout https://github.com/yuvi/gas-preprocessor.git
 chmod +x gas-preprocessor.pl
 sudo mv gas-preprocessor.pl /usr/local/bin

 ffmpeg
 checkout https://github.com/FFmpeg/FFmpeg
 exec following script:
 -------
 #!/bin/bash


 ##CONFIGURATION ###################################################

 NDK=/opt/android-ndk-r9
 TARGET_OS=darwin
 BUILD=$(pwd)/build/dest
 TOOLCHAIN=$(pwd)/build/toolchain
 SYSROOT=$TOOLCHAIN/sysroot

 FFMPEG_FLAGS="--prefix=${BUILD} \
   --target-os=${TARGET_OS} \
   --arch=arm \
   --enable-cross-compile \
   --cross-prefix=arm-linux-androideabi- \
   --disable-shared \
   --disable-symver \
   --disable-doc \
   --disable-ffplay \
   --disable-ffmpeg \
   --disable-ffprobe \
   --disable-ffserver \
   --disable-avdevice \
   --disable-avfilter \
   --disable-muxers \
   --disable-filters \
   --disable-devices \
   --disable-bsfs \
   --disable-network \
   --disable-swscale  \
   --disable-demuxer=sbg \
   --disable-everything \
   --enable-decoders \
   --enable-encoders  \
   --enable-asm \
   --enable-version3 \
   --enable-protocols  \
   --enable-parsers \
   --enable-demuxers"

 ##END ###################################################



 $NDK/build/tools/make-standalone-toolchain.sh --toolchain=arm-linux-
 androideabi-4.8 --platform=android-18 --install-dir=$TOOLCHAIN

 export PATH=$TOOLCHAIN/bin:$PATH
 export CC=arm-linux-androideabi-gcc
 export LD=arm-linux-androideabi-ld
 export AR=arm-linux-androideabi-ar

 CFLAGS="-O3 -Wall -mthumb -pipe -fpic -fasm \
   -finline-limit=300 -ffast-math \
   -fstrict-aliasing -Werror=strict-aliasing \
   -fmodulo-sched -fmodulo-sched-allow-regmoves \
   -Wno-psabi -Wa,--noexecstack \
   -DANDROID -DNDEBUG"

 EXTRA_CFLAGS="-march=armv7-a -mthumb -mthumb-interwork -mfpu=neon -mfloat-
 abi=softfp -mvectorize-with-neon-quad"
 EXTRA_LDFLAGS="-Wl,--fix-cortex-a8"


 ./configure $FFMPEG_FLAGS --extra-cflags="$CFLAGS $EXTRA_CFLAGS" --extra-
 ldflags="$EXTRA_LDFLAGS"

 make clean
 make -j V=1
 make V=1 install
 ------------------------

 {{{
 version off ffmpeg is head
 built on osx 10.8
 }}}
 Patches should be submitted to the ffmpeg-devel mailing list and not this
 bug tracker.

-- 
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/2888>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list