Issue 353 in webp: build failure with android ndk standalone toolchain

32 views
Skip to first unread message

jz… via monorail

unread,
Jul 20, 2017, 3:20:39 PM7/20/17
to webp-d...@webmproject.org
Status: Accepted
Owner: jz...@google.com
Labels: Type-Defect Priority-Medium

New issue 353 by jz...@google.com: build failure with android ndk standalone toolchain
https://bugs.chromium.org/p/webp/issues/detail?id=353

v0.6.0-148-g461ae555

We make the assumption of cpu-features.h availability in all android configurations. The standalone toolchain does not include the header presumably because it's given an architecture to target.
We should auto-detect this in cmake/configure and update the #ifdef or possibly remove the check as NEON has been required since M and in AOSP we strip this line to simplify the build; the flag as it's used currently assumes the NEON dsp files will be flagged correctly, which they aren't in the legacy armeabi targets.

$ ./android-ndk-r15b/build/tools/make_standalone_toolchain.py \
--arch arm --api 24 --stl gnustl --install-dir /tmp/android-arm-24
$ ../configure --build $(../config.guess) \
--host arm-linux-androideabi \
CC='/tmp/android-arm-24/bin/clang' \
CFLAGS='-O3 -fPIE' LDFLAGS='-Wl,-pie' --disable-shared
$ make
...

CC libwebpdsp_la-cpu.lo
../src/dsp/cpu.c:22:10: fatal error: 'cpu-features.h' file not found
#include <cpu-features.h>
^~~~~~~~~~~~~~~~


--
You received this message because:
1. The project was configured to send all issue notifications to this address

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

bugdro… via monorail

unread,
Aug 4, 2017, 2:26:26 PM8/4/17
to webp-d...@webmproject.org

Comment #1 on issue 353 by bugd...@chromium.org: build failure with android ndk standalone toolchain
https://bugs.chromium.org/p/webp/issues/detail?id=353#c1

The following revision refers to this bug:
https://chromium.googlesource.com/webm/libwebp/+/c6d1db4b36a3f45b55bd850589f4eefd191d4d35

commit c6d1db4b36a3f45b55bd850589f4eefd191d4d35
Author: James Zern <jz...@google.com>
Date: Wed Aug 02 05:59:03 2017

fix Android standalone toolchain build

add a check for cpu-features.h and rework some of the ifdef's around
android + neon. for android builds with cpu-features enabled the
*_neon.c files will still need to be flagged correctly (with e.g.,
.c.neon in Android.mk) to properly build them.

BUG=webp:353

Change-Id: I905ce305af0a204e560b915d8665093a3edaceb9

[modify] https://crrev.com/c6d1db4b36a3f45b55bd850589f4eefd191d4d35/build.gradle
[modify] https://crrev.com/c6d1db4b36a3f45b55bd850589f4eefd191d4d35/configure.ac
[modify] https://crrev.com/c6d1db4b36a3f45b55bd850589f4eefd191d4d35/Android.mk
[modify] https://crrev.com/c6d1db4b36a3f45b55bd850589f4eefd191d4d35/CMakeLists.txt
[modify] https://crrev.com/c6d1db4b36a3f45b55bd850589f4eefd191d4d35/src/dsp/dsp.h

jz… via monorail

unread,
Aug 15, 2017, 11:45:00 PM8/15/17
to webp-d...@webmproject.org
Updates:
Status: Fixed

Comment #2 on issue 353 by jz...@google.com: build failure with android ndk standalone toolchain
https://bugs.chromium.org/p/webp/issues/detail?id=353#c2

(No comment was entered for this change.)

bugdro… via monorail

unread,
Aug 22, 2017, 5:31:25 PM8/22/17
to webp-d...@webmproject.org
Updates:
Labels: merge-merged-portable-intrinsics

Comment #3 on issue 353 by bugd...@chromium.org: build failure with android ndk standalone toolchain
https://bugs.chromium.org/p/webp/issues/detail?id=353#c3


The following revision refers to this bug:
https://chromium.googlesource.com/webm/libwebp/+/0e8c3004bebea57e88d9efb4167b5920bf0950b6

commit 0e8c3004bebea57e88d9efb4167b5920bf0950b6
Author: James Zern <jz...@google.com>
Date: Tue Aug 22 19:23:25 2017


fix Android standalone toolchain build

add a check for cpu-features.h and rework some of the ifdef's around
android + neon. for android builds with cpu-features enabled the
*_neon.c files will still need to be flagged correctly (with e.g.,
.c.neon in Android.mk) to properly build them.

BUG=webp:353

Change-Id: I905ce305af0a204e560b915d8665093a3edaceb9
Reply all
Reply to author
Forward
0 new messages