Opened 5 years ago

Closed 5 years ago

#7728 closed defect (fixed)

Android arm64 compilation fails

Reported by: Taner Sener Owned by:
Priority: normal Component: avcodec
Version: git-master Keywords: android arm64
Cc: tanersener@gmail.com Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

Summary of the bug:

Cross-compiling master fails for Android arm64 architecture.

How to reproduce using Android NDK r18b:

cd $ANDROID_NDK_ROOT/build/tools
./make_standalone_toolchain.py --arch arm64 --api 21 --stl libc++ --install-dir $ANDROID_NDK_ROOT/toolchains/test-arm64

./configure --cross-prefix=$ANDROID_NDK_ROOT/toolchains/test-arm64/bin/aarch64-linux-android- --sysroot=$ANDROID_NDK_ROOT/toolchains/test-arm64/sysroot --arch=arm64 --target-os=android

make -j4

make fails with these errors.

...

CC	libavcodec/aarch64/synth_filter_init.o
AS	libavcodec/aarch64/synth_filter_neon.o
CC	libavcodec/aarch64/vc1dsp_init_aarch64.o
AS	libavcodec/aarch64/videodsp.o
CC	libavcodec/aarch64/videodsp_init.o
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
CC	libavcodec/aarch64/vp9dsp_init_10bpp_aarch64.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]
                                    ^
libavcodec/aarch64/vp8dsp_neon.S:37:37: error: invalid operand for instruction
        sqdmulh v23.4h, v3.4h, v4.4h[1]
                                    ^
libavcodec/aarch64/vp8dsp_neon.S:57:35: error: invalid operand for instruction
        smull v26.4s, v1.4h, v4.4h[0]
                                  ^
libavcodec/aarch64/vp8dsp_neon.S:59:35: error: invalid operand for instruction
        smull v27.4s, v3.4h, v4.4h[0]
                                  ^
libavcodec/aarch64/vp8dsp_neon.S:61:37: error: invalid operand for instruction
        sqdmulh v21.4h, v1.4h, v4.4h[1]
                                    ^
libavcodec/aarch64/vp8dsp_neon.S:62:37: error: invalid operand for instruction
        sqdmulh v23.4h, v3.4h, v4.4h[1]

Attachments (1)

full_output.txt.gz (13.5 KB ) - added by Taner Sener 5 years ago.
./configure and make output

Download all attachments as: .zip

Change History (4)

by Taner Sener, 5 years ago

Attachment: full_output.txt.gz added

./configure and make output

comment:1 by Carl Eugen Hoyos, 5 years ago

Component: build systemavcodec
Keywords: android,arm64 → android arm64
Reproduced by developer: set

Either use a patch by Martin Storsjö or --extra-cflags=-fno-integrated-as:
https://patchwork.libav.org/patch/64417/

comment:2 by Taner Sener, 5 years ago

Thanks, --extra-cflags=-fno-integrated-as fixed errors for me.

I tried to build with patch too, but it failed with these.

AS	libavcodec/aarch64/vp8dsp_neon.o
CC	libavcodec/aarch64/vp9dsp_init_10bpp_aarch64.o
<instantiation>:2:9: error: invalid symbol kind for ADRP relocation
        adrp x17, subpel_filters-16+(0)
        ^
<instantiation>:2:9: error: invalid symbol kind for ADRP relocation
        adrp x17, subpel_filters-16+(0)
        ^
<instantiation>:2:9: error: invalid symbol kind for ADRP relocation
        adrp x17, subpel_filters-16+(0)
        ^
<instantiation>:2:9: error: invalid symbol kind for ADRP relocation
        adrp x17, subpel_filters-16+(0)
        ^
<instantiation>:2:9: error: invalid symbol kind for ADRP relocation
        adrp x17, subpel_filters-16+(0)
        ^
<instantiation>:2:9: error: invalid symbol kind for ADRP relocation
        adrp x17, subpel_filters-16+(0)
        ^
./libavutil/aarch64/asm.S:95:9: error: invalid symbol kind for ADRP relocation
        adrp x17, subpel_filters-16+(0)
        ^

comment:3 by Carl Eugen Hoyos, 5 years ago

Resolution: fixed
Status: newclosed

This should be fixed now by Martin Storsjö in c8bc9d1380dd686a4ee97d3415c976707904e945 and/or the three commits before.

Note: See TracTickets for help on using tickets.