libvpx-1.8.0 uses incorrect gcc for compile and linkage for arm64-android-gcc

297 views
Skip to first unread message

ChongMeng Eng

unread,
Mar 12, 2019, 2:51:46 PM3/12/19
to webm-d...@webmproject.org
I am trying to build libvpx (v1.8.0) library for abi arm64-v8a to be used in aTalk. It seems that the configure option for arm64-android-gcc picks up the incorrect gcc for arch64 library build.

Below is the configure option specified i.e: 
./configure --sdk-path=/opt/android/android-ndk-r17c --prefix=/home/cmeng/workspace/ndk/ffmpeg-android/android/arm64-v8a --target=arm64-android-gcc --cpu=cortex-a57 --as=yasm --enable-static --disable-docs --disable-examples --disable-tools --disable-runtime-cpu-detect --enable-realtime-only --enable-vp8 --enable-vp9 --enable-vp9-postproc --enable-vp9-highbitdepth --extra-cflags=-isystem /opt/android/android-ndk-r17c/sysroot/usr/include/aarch64-linux-android -isystem /opt/android/android-ndk-r17c/sysroot/usr/include --disable-webm-io

However the generated lib-arm64-android-gcc.mk specifies an incorrect gcc for use (see attached) e.g. arm-linux-androideabi-gcc instead of aarch64-linux-android-gcc

Actually the build scripts exported the CC etc parameters for use, but seems to be ignored by libvpx configure.

Please refer to the following site for more info (note: local script changes yet to be push to online repository, I have attached herewith the latest main updated files:):

Would appreciate if you can provide a quick patch for the observed problem:

libs-arm64-android-gcc.mk
_settings.sh
_vpx_build.sh
ffmpeg-android_build.sh

Johann Koenig

unread,
Mar 12, 2019, 5:05:01 PM3/12/19
to webm-d...@webmproject.org
On Wed, Mar 13, 2019 at 3:51 AM ChongMeng Eng <cmen...@gmail.com> wrote:
> I am trying to build libvpx (v1.8.0) library for abi arm64-v8a to be used in aTalk. It seems that the configure option for arm64-android-gcc picks up the incorrect gcc for arch64 library build.

This target is built every night:
https://build.webmproject.org/jenkins/view/libvpx%20nightly/job/libvpx__compile_android/APP_ABI=arm64-v8a,APP_OPTIM=release,APP_STL=c++_static,NDK_TOOLCHAIN_VERSION=clang,build_type=ndk,shared=0/897/console

> Below is the configure option specified i.e:
> ./configure --sdk-path=/opt/android/android-ndk-r17c --prefix=/home/cmeng/workspace/ndk/ffmpeg-android/android/arm64-v8a --target=arm64-android-gcc --cpu=cortex-a57 --as=yasm --enable-static --disable-docs --disable-examples --disable-tools --disable-runtime-cpu-detect --enable-realtime-only --enable-vp8 --enable-vp9 --enable-vp9-postproc --enable-vp9-highbitdepth --extra-cflags=-isystem /opt/android/android-ndk-r17c/sysroot/usr/include/aarch64-linux-android -isystem /opt/android/android-ndk-r17c/sysroot/usr/include --disable-webm-io

Try:

./libvpx/configure --target=arm64-android-gcc --disable-docs
--sdk-path=/opt/android-ndk-r18/ --enable-external-build

ndk-build APP_BUILD_SCRIPT=./libvpx/test/android/Android.mk
APP_ABI=arm64-v8a APP_PLATFORM=android-21 APP_OPTIM=release
APP_STL=c++_static NDK_TOOLCHAIN_VERSION=clang ENABLE_SHARED=0

> However the generated lib-arm64-android-gcc.mk specifies an incorrect gcc for use (see attached) e.g. arm-linux-androideabi-gcc instead of aarch64-linux-android-gcc

I don't think ndk-build uses the CC specified there.

> Actually the build scripts exported the CC etc parameters for use, but seems to be ignored by libvpx configure.
>
> Please refer to the following site for more info (note: local script changes yet to be push to online repository, I have attached herewith the latest main updated files:):
> https://github.com/cmeng-git/ffmpeg-android
>
> Would appreciate if you can provide a quick patch for the observed problem:
>
> --
> 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 post to this group, send email to webm-d...@webmproject.org.
> Visit this group at https://groups.google.com/a/webmproject.org/group/webm-discuss/.
> For more options, visit https://groups.google.com/a/webmproject.org/d/optout.

ChongMeng Eng

unread,
Mar 12, 2019, 11:09:00 PM3/12/19
to webm-d...@webmproject.org
New update:
In order to use standalone toolchanis, must not specified --sdk-path option

Attached is the patch for configure.sh for arm64-v8a architecture support etc
Use of gcc/g++ for compilation or linkage will fail for arm64-v8a
/opt/android/android-ndk-r18b/platforms/android-28/arch-arm/usr/lib/crtbegin_dynamic.o: error adding symbols: File in wrong format

standalone toolchains uses clang can build armeabi-v7a and arm64-v8a without problem

11.libvpx_configure.sh.patch

Johann Koenig

unread,
Mar 12, 2019, 11:50:28 PM3/12/19
to webm-d...@webmproject.org
On Wed, Mar 13, 2019 at 12:09 PM ChongMeng Eng <cmen...@gmail.com> wrote:
>
> New update:
> In order to use standalone toolchanis, must not specified --sdk-path option
>
> Attached is the patch for configure.sh for arm64-v8a architecture support etc
> Use of gcc/g++ for compilation or linkage will fail for arm64-v8a
> /opt/android/android-ndk-r18b/platforms/android-28/arch-arm/usr/lib/crtbegin_dynamic.o: error adding symbols: File in wrong format

Thank you for the patch. Would you please upload it for review:
https://www.webmproject.org/code/contribute/submitting-patches/

> standalone toolchains uses clang can build armeabi-v7a and arm64-v8a without problem
>
>
> On Tue, Mar 12, 2019 at 10:58 AM ChongMeng Eng <cmen...@gmail.com> wrote:
>>
>> I am trying to build libvpx (v1.8.0) library for abi arm64-v8a to be used in aTalk. It seems that the configure option for arm64-android-gcc picks up the incorrect gcc for arch64 library build.
>>
>> Below is the configure option specified i.e:
>> ./configure --sdk-path=/opt/android/android-ndk-r17c --prefix=/home/cmeng/workspace/ndk/ffmpeg-android/android/arm64-v8a --target=arm64-android-gcc --cpu=cortex-a57 --as=yasm --enable-static --disable-docs --disable-examples --disable-tools --disable-runtime-cpu-detect --enable-realtime-only --enable-vp8 --enable-vp9 --enable-vp9-postproc --enable-vp9-highbitdepth --extra-cflags=-isystem /opt/android/android-ndk-r17c/sysroot/usr/include/aarch64-linux-android -isystem /opt/android/android-ndk-r17c/sysroot/usr/include --disable-webm-io
>>
>> However the generated lib-arm64-android-gcc.mk specifies an incorrect gcc for use (see attached) e.g. arm-linux-androideabi-gcc instead of aarch64-linux-android-gcc
>>
>> Actually the build scripts exported the CC etc parameters for use, but seems to be ignored by libvpx configure.
>>
>> Please refer to the following site for more info (note: local script changes yet to be push to online repository, I have attached herewith the latest main updated files:):
>> https://github.com/cmeng-git/ffmpeg-android
>>
>> Would appreciate if you can provide a quick patch for the observed problem:
>>

ChongMeng Eng

unread,
Mar 19, 2019, 8:22:14 PM3/19/19
to webm-d...@webmproject.org
Attached is the patch to resolve the issue;

11.libvpx_configure.sh.patch

Johann Koenig

unread,
Mar 19, 2019, 9:49:40 PM3/19/19
to webm-d...@webmproject.org
On Wed, Mar 20, 2019 at 9:22 AM ChongMeng Eng <cmen...@gmail.com> wrote:
> Attached is the patch to resolve the issue;

Reply all
Reply to author
Forward
0 new messages