libvpx v1.3.1 release has compilation error for arm64-v8a build

514 views
Skip to first unread message

ChongMeng Eng

unread,
Nov 16, 2023, 10:17:07 PM11/16/23
to WebM Discussion
While building libvpx for aTalk, found error when doing arm64-v8a build; all other ABI build are OK.

** BUILD STARTED: libvpx (v1.13.1) for arm64-v8a **
**********************************************
### Use NDK=/opt/android/android-ndk-r18b
### Use ANDROID_API=21
### Install directory: PREFIX=/home/cmeng/workspace/android/atalk-android/aTalk/jni/static_library_built/libvpx/../../vpx/android/arm64-v8a
**********************************************
....
    [DEP] vpx_dsp/loopfilter.c.d
    [DEP] vpx_dsp/arm/vpx_convolve_neon_i8mm.c.d
    [DEP] vpx_dsp/arm/vpx_convolve8_neon_i8mm.c.d
clang70: error: the clang compiler does not support '-march=armv8.2-a+dotprod+i8mm'
    [DEP] vpx_dsp/arm/vpx_convolve_neon_dotprod.c.d
    [DEP] vpx_dsp/arm/vpx_convolve8_neon_dotprod.c.d
    [DEP] vpx_dsp/arm/vpx_convolve_neon.c.d
    [DEP] vpx_dsp/arm/vpx_convolve_avg_neon.c.d
    [DEP] vpx_dsp/arm/vpx_convolve8_neon.c.d
    [DEP] vpx_dsp/arm/vpx_convolve_copy_neon.c.d
    [DEP] vpx_dsp/arm/vpx_scaled_convolve8_neon.c.d
    [DEP] vpx_dsp/arm/highbd_vpx_convolve_neon.c.d
    [DEP] vpx_dsp/arm/highbd_vpx_convolve8_neon.c.d
clang70: error: the clang compiler does not support '-march=armv8.2-a+dotprod+i8mm'
    [DEP] vpx_dsp/arm/highbd_vpx_convolve_avg_neon.c.d
    [DEP] vpx_dsp/arm/highbd_vpx_convolve_copy_neon.c.d
    [DEP] vpx_dsp/vpx_convolve.c.d
    [DEP] vpx_dsp/arm/intrapred_neon.c.d
....
   
    [CC] vpx_dsp/loopfilter.c.o
clang70: error: the clang compiler does not support '-march=armv8.2-a+dotprod+i8mm'
make[1]: *** [vpx_dsp/arm/vpx_convolve8_neon_i8mm.c.o] Error 1
make[1]: *** Waiting for unfinished jobs....
clang70: error: the clang compiler does not support '-march=armv8.2-a+dotprod+i8mm'
make[1]: *** [vpx_dsp/arm/vpx_convolve_neon_i8mm.c.o] Error 1
vpx_dsp/arm/vpx_convolve8_neon_dotprod.c:74:12: warning: implicit declaration of function 'convolve8_4_sdot' [-Wimplicit-function-declaration]
      d0 = convolve8_4_sdot(s0, filters, correction, range_limit, perm_tbl);
           ^
vpx_dsp/arm/vpx_convolve8_neon_dotprod.c:74:10: error: assigning to 'int16x4_t' (vector of 4 'int16_t' values) from incompatible type 'int'
      d0 = convolve8_4_sdot(s0, filters, correction, range_limit, perm_tbl);
         ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vpx_dsp/arm/vpx_convolve8_neon_dotprod.c:75:10: error: assigning to 'int16x4_t' (vector of 4 'int16_t' values) from incompatible type 'int'
      d1 = convolve8_4_sdot(s1, filters, correction, range_limit, perm_tbl);
         ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vpx_dsp/arm/vpx_convolve8_neon_dotprod.c:76:10: error: assigning to 'int16x4_t' (vector of 4 'int16_t' values) from incompatible type 'int'
      d2 = convolve8_4_sdot(s2, filters, correction, range_limit, perm_tbl);
         ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vpx_dsp/arm/vpx_convolve8_neon_dotprod.c:77:10: error: assigning to 'int16x4_t' (vector of 4 'int16_t' values) from incompatible type 'int'
      d3 = convolve8_4_sdot(s3, filters, correction, range_limit, perm_tbl);
         ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vpx_dsp/arm/vpx_convolve8_neon_dotprod.c:93:10: warning: implicit declaration of function 'convolve8_4_sdot' [-Wimplicit-function-declaration]
    d0 = convolve8_4_sdot(s0, filters, correction, range_limit, perm_tbl);
         ^
vpx_dsp/arm/vpx_convolve8_neon_dotprod.c:93:8: error: assigning to 'int16x4_t' (vector of 4 'int16_t' values) from incompatible type 'int'
    d0 = convolve8_4_sdot(s0, filters, correction, range_limit, perm_tbl);
       ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vpx_dsp/arm/vpx_convolve8_neon_dotprod.c:94:8: error: assigning to 'int16x4_t' (vector of 4 'int16_t' values) from incompatible type 'int'
    d1 = convolve8_4_sdot(s1, filters, correction, range_limit, perm_tbl);
       ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vpx_dsp/arm/vpx_convolve8_neon_dotprod.c:95:8: error: assigning to 'int16x4_t' (vector of 4 'int16_t' values) from incompatible type 'int'
    d2 = convolve8_4_sdot(s2, filters, correction, range_limit, perm_tbl);
       ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vpx_dsp/arm/vpx_convolve8_neon_dotprod.c:115:14: warning: implicit declaration of function 'convolve8_8_sdot' [-Wimplicit-function-declaration]
        d0 = convolve8_8_sdot(s0, filters, correction, range_limit, perm_tbl);
             ^
vpx_dsp/arm/vpx_convolve8_neon_dotprod.c:115:12: error: assigning to 'uint8x8_t' (vector of 8 'uint8_t' values) from incompatible type 'int'
        d0 = convolve8_8_sdot(s0, filters, correction, range_limit, perm_tbl);
           ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vpx_dsp/arm/vpx_convolve8_neon_dotprod.c:116:12: error: assigning to 'uint8x8_t' (vector of 8 'uint8_t' values) from incompatible type 'int'
        d1 = convolve8_8_sdot(s1, filters, correction, range_limit, perm_tbl);
           ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vpx_dsp/arm/vpx_convolve8_neon_dotprod.c:117:12: error: assigning to 'uint8x8_t' (vector of 8 'uint8_t' values) from incompatible type 'int'
        d2 = convolve8_8_sdot(s2, filters, correction, range_limit, perm_tbl);
           ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vpx_dsp/arm/vpx_convolve8_neon_dotprod.c:118:12: error: assigning to 'uint8x8_t' (vector of 8 'uint8_t' values) from incompatible type 'int'
        d3 = convolve8_8_sdot(s3, filters, correction, range_limit, perm_tbl);
           ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vpx_dsp/arm/vpx_convolve8_neon_dotprod.c:139:12: warning: implicit declaration of function 'convolve8_8_sdot' [-Wimplicit-function-declaration]
      d0 = convolve8_8_sdot(s0, filters, correction, range_limit, perm_tbl);
           ^
vpx_dsp/arm/vpx_convolve8_neon_dotprod.c:139:10: error: assigning to 'uint8x8_t' (vector of 8 'uint8_t' values) from incompatible type 'int'
      d0 = convolve8_8_sdot(s0, filters, correction, range_limit, perm_tbl);
         ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vpx_dsp/arm/vpx_convolve8_neon_dotprod.c:140:10: error: assigning to 'uint8x8_t' (vector of 8 'uint8_t' values) from incompatible type 'int'
      d1 = convolve8_8_sdot(s1, filters, correction, range_limit, perm_tbl);
         ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vpx_dsp/arm/vpx_convolve8_neon_dotprod.c:141:10: error: assigning to 'uint8x8_t' (vector of 8 'uint8_t' values) from incompatible type 'int'
      d2 = convolve8_8_sdot(s2, filters, correction, range_limit, perm_tbl);
         ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vpx_dsp/arm/vpx_convolve8_neon_dotprod.c:43:6: warning: no previous prototype for function 'vpx_convolve8_2d_horiz_neon_dotprod' [-Wmissing-prototypes]
void vpx_convolve8_2d_horiz_neon_dotprod(const uint8_t *src,
     ^
vpx_dsp/arm/vpx_convolve8_neon_dotprod.c:181:12: warning: implicit declaration of function 'convolve8_4_sdot' [-Wimplicit-function-declaration]
      t0 = convolve8_4_sdot(s0, filters, correction, range_limit, perm_tbl);
           ^
vpx_dsp/arm/vpx_convolve8_neon_dotprod.c:181:10: error: assigning to 'int16x4_t' (vector of 4 'int16_t' values) from incompatible type 'int'
      t0 = convolve8_4_sdot(s0, filters, correction, range_limit, perm_tbl);
         ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vpx_dsp/arm/vpx_convolve8_neon_dotprod.c:182:10: error: assigning to 'int16x4_t' (vector of 4 'int16_t' values) from incompatible type 'int'
      t1 = convolve8_4_sdot(s1, filters, correction, range_limit, perm_tbl);
         ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vpx_dsp/arm/vpx_convolve8_neon_dotprod.c:183:10: error: assigning to 'int16x4_t' (vector of 4 'int16_t' values) from incompatible type 'int'
      t2 = convolve8_4_sdot(s2, filters, correction, range_limit, perm_tbl);
         ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vpx_dsp/arm/vpx_convolve8_neon_dotprod.c:184:10: error: assigning to 'int16x4_t' (vector of 4 'int16_t' values) from incompatible type 'int'
      t3 = convolve8_4_sdot(s3, filters, correction, range_limit, perm_tbl);
         ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vpx_dsp/arm/vpx_convolve8_neon_dotprod.c:209:14: warning: implicit declaration of function 'convolve8_8_sdot' [-Wimplicit-function-declaration]
        d0 = convolve8_8_sdot(s0, filters, correction, range_limit, perm_tbl);
             ^
vpx_dsp/arm/vpx_convolve8_neon_dotprod.c:209:12: error: assigning to 'uint8x8_t' (vector of 8 'uint8_t' values) from incompatible type 'int'
        d0 = convolve8_8_sdot(s0, filters, correction, range_limit, perm_tbl);
           ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fatal error: too many errors emitted, stopping now [-ferror-limit=]
7 warnings and 20 errors generated.
make[1]: *** [vpx_dsp/arm/vpx_convolve8_neon_dotprod.c.o] Error 1
vpx_dsp/arm/vpx_convolve_neon_dotprod.c:34:3: warning: implicit declaration of function 'vpx_convolve8_2d_horiz_neon_dotprod' [-Wimplicit-function-declaration]
  vpx_convolve8_2d_horiz_neon_dotprod(src - src_stride * 3, src_stride, temp, w,
  ^
vpx_dsp/arm/vpx_convolve_neon_dotprod.c:54:3: warning: implicit declaration of function 'vpx_convolve8_2d_horiz_neon_dotprod' [-Wimplicit-function-declaration]
  vpx_convolve8_2d_horiz_neon_dotprod(src - src_stride * 3, src_stride, temp, w,
  ^
2 warnings generated.
make: *** [.DEFAULT] Error 2
~/workspace/android/atalk-android/aTalk/jni/static_library_built/libvpx
** BUILD COMPLETED: libvpx for arm64-v8a **

James Zern

unread,
Nov 16, 2023, 10:40:33 PM11/16/23
to webm-d...@webmproject.org
Hi,

On Thu, Nov 16, 2023 at 7:17 PM ChongMeng Eng <cmen...@gmail.com> wrote:
While building libvpx for aTalk, found error when doing arm64-v8a build; all other ABI build are OK.

** BUILD STARTED: libvpx (v1.13.1) for arm64-v8a **
**********************************************
### Use NDK=/opt/android/android-ndk-r18b
### Use ANDROID_API=21
### Install directory: PREFIX=/home/cmeng/workspace/android/atalk-android/aTalk/jni/static_library_built/libvpx/../../vpx/android/arm64-v8a
**********************************************
....
    [DEP] vpx_dsp/loopfilter.c.d
    [DEP] vpx_dsp/arm/vpx_convolve_neon_i8mm.c.d
    [DEP] vpx_dsp/arm/vpx_convolve8_neon_i8mm.c.d
clang70: error: the clang compiler does not support '-march=armv8.2-a+dotprod+i8mm'
    [DEP] vpx_dsp/arm/vpx_convolve_neon_dotprod.c.d
    [DEP] vpx_dsp/arm/vpx_convolve8_neon_dotprod.c.d
    [DEP] vpx_dsp/arm/vpx_convolve_neon.c.d
    [DEP] vpx_dsp/arm/vpx_convolve_avg_neon.c.d
    [DEP] vpx_dsp/arm/vpx_convolve8_neon.c.d
    [DEP] vpx_dsp/arm/vpx_convolve_copy_neon.c.d
    [DEP] vpx_dsp/arm/vpx_scaled_convolve8_neon.c.d
    [DEP] vpx_dsp/arm/highbd_vpx_convolve_neon.c.d
    [DEP] vpx_dsp/arm/highbd_vpx_convolve8_neon.c.d
clang70: error: the clang compiler does not support '-march=armv8.2-a+dotprod+i8mm'

Your compiler looks like it's too old. You can disable these files at configure time with `--disable-neon-i8mm --disable-neon-dotprod` or update your NDK.
 
--
You received this message because you are subscribed to the Google Groups "WebM Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webm-discuss...@webmproject.org.
To view this discussion on the web visit https://groups.google.com/a/webmproject.org/d/msgid/webm-discuss/aabcefaa-2bf9-48c3-b493-d9830696ab61n%40webmproject.org.

ChongMeng Eng

unread,
Nov 18, 2023, 10:16:17 PM11/18/23
to WebM Discussion, James Zern
Hi,

Many thanks for the info.

> Your compiler looks like it's too old. You can disable these files at configure time with `--disable-neon-i8mm --disable-neon-dotprod` or update your NDK.
It seems the mentioned options are only applicable for master source/1.14.0 release. It is invalid in 1.13.1.

May I know which version of the android NDK did your team use for building libvpx.
I have tried all the available NDK from 20.x.x all the way to 26.x.x; however each has its own problem.

1. Using NDK 25.2.9519653:
   Found the strip command is no further available. llvm-strip is not compatible giving the following errors.
   e.g. strip: Unable to recognise the format of the input file `libvpx_g.a(vpx_decoder.c.o)'

   However it still output the libvpx.a properly. 
   Is strip absolutely required or can it be ignored?

2. Using NDK 21.4.7075529; the higher version that support Strip command
Found the following problem with aarch64-linux-android-strip: invalid option -- 'L'

/home/cmeng/workspace/android/atalk-android/aTalk/jni/static_library_built/libvpx/android-toolchain/bin/aarch64-linux-android30-clang -DANDROID -fpic -fpie -O3-march=armv8-a -O3 -fPIC -Wall -Wdisabled-optimization -Wextra-semi -Wextra-semi-stmt -Wfloat-conversion -Wformat=2 -Wparentheses-equality -Wpointer-arith -Wtype-limits -Wcast-qual -Wvla -Wimplicit-function-declaration -Wmissing-declarations -Wmissing-prototypes -Wshadow -Wuninitialized -Wunreachable-code-aggressive -Wunused -Wextra -Wundef -Wframe-larger-than=52000 -std=gnu99 -Wshorten-64-to-32 -c -o /tmp/vpx-conf-111594-4241.o /tmp/vpx-conf-111594-4241.c
/home/cmeng/workspace/android/atalk-android/aTalk/jni/static_library_built/libvpx/android-toolchain/bin/aarch64-linux-android-strip -L/home/cmeng/workspace/android/atalk-android/aTalk/jni/static_library_built/libvpx/android-toolchain/sysroot/usr/lib -static -o /tmp/vpx-conf-111594-4241.x /tmp/vpx-conf-111594-4241.o
/home/cmeng/workspace/android/atalk-android/aTalk/jni/static_library_built/libvpx/android-toolchain/bin/aarch64-linux-android-strip: invalid option -- 'L'
Usage: /home/cmeng/workspace/android/atalk-android/aTalk/jni/static_library_built/libvpx/android-toolchain/bin/aarch64-linux-android-strip <option(s)> in-file(s)


Your advice is appreciated.

ChongMeng Eng

unread,
Nov 19, 2023, 11:51:59 PM11/19/23
to WebM Discussion, ChongMeng Eng, James Zern
Finally get libvpx 1.3.1 to build successfully with android ndk '22.1.7171670' and API-30 for aTalk.

James Zern

unread,
Nov 20, 2023, 5:24:22 PM11/20/23
to WebM Discussion
Hi,

On Sun, Nov 19, 2023 at 8:51 PM ChongMeng Eng <cmen...@gmail.com> wrote:
Finally get libvpx 1.3.1 to build successfully with android ndk '22.1.7171670' and API-30 for aTalk.

On Sunday, November 19, 2023 at 11:16:17 AM UTC+8 ChongMeng Eng wrote:
Hi,

Many thanks for the info.

> Your compiler looks like it's too old. You can disable these files at configure time with `--disable-neon-i8mm --disable-neon-dotprod` or update your NDK.
It seems the mentioned options are only applicable for master source/1.14.0 release. It is invalid in 1.13.1.

May I know which version of the android NDK did your team use for building libvpx.

ChongMeng Eng

unread,
Nov 20, 2023, 6:35:45 PM11/20/23
to WebM Discussion, James Zern
I checked through the libvpx build info, but still cannot find the actual NDK version that is used in the build.
Found the parameter NDK_TOOLCHAIN_VERSION but no value is given.

ChongMeng Eng

unread,
Nov 20, 2023, 8:41:06 PM11/20/23
to WebM Discussion, ChongMeng Eng, James Zern
Incorrectly interpret the ANDROID_API for NDK build; per info in

### minSdkVersion set higher than device API level

The API level you build against with the NDK has a very different meaning than compileSdkVersion does for Java. The NDK API level is your app's minimum supported API level. In ndk-build, this is your APP_PLATFORM setting. With CMake, this is -DANDROID_PLATFORM.

Finally have to reset to '21', for aTalk-android, as to be the same as minSdkVersion. Otherwise face problems during .so build
ld: error: undefined symbol: stderr
>>> referenced by vp9_ext_ratectrl.c.o:(vp9_extrc_get_encodeframe_decision) in archive vpx/android/x86_64/lib/libvpx.a
>>> referenced by vp9_ext_ratectrl.c.o:(vp9_extrc_get_frame_rdmult) in archive vpx/android/x86_64/lib/libvpx.a
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [/opt/android/android-sdk/ndk/22.1.7171670/build/core/build-binary.mk:728: /home/cmeng/workspace/android/atalk-android/aTalk/build/intermediates/ndkBuild/playstoreDebug/obj/local/x86_64/libjnvpx.so] Error 1

James Zern

unread,
Nov 20, 2023, 9:25:49 PM11/20/23
to WebM Discussion
On Mon, Nov 20, 2023 at 3:35 PM ChongMeng Eng <cmen...@gmail.com> wrote:
I checked through the libvpx build info, but still cannot find the actual NDK version that is used in the build.
Found the parameter NDK_TOOLCHAIN_VERSION but no value is given.

It is set to clang for historical reasons. This was used to control selection between gcc and clang.
ndk-build APP_BUILD_SCRIPT=./libvpx/test/android/Android.mk APP_ABI=armeabi-v7a APP_PLATFORM=android-21 APP_OPTIM=debug APP_STL=c++_static NDK_TOOLCHAIN_VERSION=clang ENABLE_SHARED=0
Reply all
Reply to author
Forward
0 new messages