Opened 11 years ago

Closed 11 years ago

#2888 closed defect (invalid)

Compile ffmpeg for Android on OSX failes

Reported by: Fabian Schuetz Owned by:
Priority: normal Component: undetermined
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

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.

Change History (6)

comment:1 by Hendrik, 11 years ago

A more recent gas-preprocessor can be found here:
https://github.com/libav/gas-preprocessor

comment:2 by Fabian Schuetz, 11 years ago

Tried that. Same result

comment:3 by Carl Eugen Hoyos, 11 years ago

Keywords: gas-preprocessor build make removed

What happens if you remove gas-preprocessor from your path?

comment:4 by Fabian Schuetz, 11 years ago

./configure complaines:


GNU assembler not found, install gas-preprocessor

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


but continues

make failes


AS libavcodec/arm/aacpsdsp_neon.o
/bin/sh: gas-preprocessor.pl: command not found
make: * [libavcodec/arm/aacpsdsp_neon.o] Error 127


comment:5 by Fabian Schuetz, 11 years ago

Obviously not the solution, but make runs fine, if i change configure option
--enable-asm
to
--disable-asm

comment:6 by Carl Eugen Hoyos, 11 years ago

Component: build systemundetermined
Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.