[FFmpeg-user] compile fails using NDK r19 when arch is aarch64

Juha Heinanen jh at tutpro.com
Sun Feb 10 23:58:53 EET 2019


I'm able to build ffmpeg library using NDK r19 when architecture
is arm, but compilation fails at libavcodec when architecture is aarch64:

cd ffmpeg && \
CC="aarch64-linux-android21-clang --sysroot /usr/local/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/sysroot" \
RANLIB=aarch64-linux-android-ranlib AR=aarch64-linux-android-ar PATH=/usr/local/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin:/usr/bin:/bin \
PREFIX=/android/arm \
./configure \
--target-os=android \
--arch=aarch64 \
--enable-cross-compile \
--cc=aarch64-linux-android21-clang \
--strip=aarch64-linux-android-strip \
--enable-decoder=hevc && \
CC="aarch64-linux-android21-clang --sysroot /usr/local/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/sysroot" \
RANLIB=aarch64-linux-android-ranlib AR=aarch64-linux-android-ar PATH=/usr/local/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin:/usr/bin:/bin \
make -j4
install prefix            /usr/local
source path               .
C compiler                aarch64-linux-android21-clang
C library                 bionic
host C compiler           gcc
host C library            glibc
ARCH                      aarch64 (generic)
big-endian                no
runtime cpu detection     yes
NEON enabled              yes
VFP enabled               yes
debug symbols             yes
strip symbols             yes
optimize for size         no
optimizations             yes
static                    yes
shared                    no
postprocessing support    no
network support           yes
threading support         pthreads
safe bitstream reader     yes
texi2html enabled         no
perl enabled              yes
pod2man enabled           yes
makeinfo enabled          no
makeinfo supports HTML    no

...

CC	libavcodec/aarch64/vorbisdsp_init.o
AS	libavcodec/aarch64/vorbisdsp_neon.o
CC	libavcodec/aarch64/vp8dsp_init_aarch64.o
AS	libavcodec/aarch64/vp8dsp_neon.o
libavcodec/aarch64/vp8dsp_neon.S:34:35: error: invalid operand for instruction
        smull v26.4s, v1.4h, v4.4h[0]
                                  ^
libavcodec/aarch64/vp8dsp_neon.S:35:35: error: invalid operand for instruction
        smull v27.4s, v3.4h, v4.4h[0]
                                  ^
libavcodec/aarch64/vp8dsp_neon.S:36:37: error: invalid operand for instruction
        sqdmulh v20.4h, v1.4h, v4.4h[1]
...

Any ideas what might cause the issue?

-- Juha


More information about the ffmpeg-user mailing list