build valgrind for Android using NDK21 - android

I am trying to build valgrind for Android. According to the official documentation AARCH64/Android is a supported platform, but the documentation on how to build was last updated to 2014.
What I am trying to do:
On a WSl2 with ubuntu:
Below the configuration and the build log.
Some notes about the output:
it seems valgrind is supposed to be using only gcc
the flag -m64 is added when it shouldn't be there
While building I see both -m32 and -m64 flags
I am not able to read assembly code, but it seems the build is using x86 assembly
Questions
What Am I doing wrong?
Is it possible to build Valgrind for Android using the modern NDK?
What alternatives do I have?
git clone git://sourceware.org/git/valgrind.git
cd valgrind
export NDK_ROOT=/opt/ndk/android-ndk-r21e
export TOOLCHAIN_ROOT=${NDK_ROOT}/toolchains/llvm/prebuilt/linux-x86_64/bin
ANDROID_API=23
TARGET=aarch64-linux-android
PREFIX=${TARGET}${ANDROID_API}
export CC=${TOOLCHAIN_ROOT}/${PREFIX}-clang
export CXX=${TOOLCHAIN_ROOT}/${PREFIX}-clang++
export AR=${TOOLCHAIN_ROOT}/${TARGET}-ar
export LD=${TOOLCHAIN_ROOT}/${TARGET}-ld
export STRIPE=${TOOLCHAIN_ROOT}/${TARGET}-strip
export NM=${TOOLCHAIN_ROOT}/${TARGET}-nm
export RANLIB=${TOOLCHAIN_ROOT}/${TARGET}-ranlib
./autogen.sh
mkdir build && cd build
../configure --host=${TARGET} --target=${TARGET} --prefix=${PWD}/inst
Configure output:
Version: 3.21.0.GIT
Maximum build arch: arm64
Primary build arch: arm64
Secondary build arch: arm
Build OS: linux
Link Time Optimisation: no
Primary build target: ARM64_LINUX
Secondary build target: ARM_LINUX
Platform variant: android
Primary -DVGPV string: -DVGPV_arm64_linux_android=1
Default supp files: ../xfree-3.supp ../xfree-4.supp ../bionic.supp
Build log:
[...]
make[3]: Entering directory '/home/edukaj/qcom/valgrind/build/VEX'
/opt/ndk/android-ndk-r21e/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android23-clang -DHAVE_CONFIG_H -I. -I../../VEX -I.. -I../.. -I../../include -I../include -I../../VEX/pub -I../VEX/pub -DVGA_arm64=1 -DVGO_linux=1 -DVGP_arm64_linux=1 -DVGPV_arm64_linux_android=1 -Ipriv -m64 -O2 -g -Wall -Wmissing-prototypes -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wcast-align -Wcast-qual -Wwrite-strings -Wempty-body -Wformat -Wformat-security -Wignored-qualifiers -Wenum-conversion -finline-functions -fno-stack-protector -fno-strict-aliasing -fno-builtin -Wno-cast-align -Wno-self-assign -Wno-tautological-compare -Wbad-function-cast -fstrict-aliasing -MT priv/libvex_arm64_linux_a-main_globals.o -MD -MP -MF priv/.deps/libvex_arm64_linux_a-main_globals.Tpo -c -o priv/libvex_arm64_linux_a-main_globals.o `test -f 'priv/main_globals.c' || echo '../../VEX/'`priv/main_globals.c
mv -f priv/.deps/libvex_arm64_linux_a-main_globals.Tpo priv/.deps/libvex_arm64_linux_a-main_globals.Po
/opt/ndk/android-ndk-r21e/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android23-clang -DHAVE_CONFIG_H -I. -I../../VEX -I.. -I../.. -I../../include -I../include -I../../VEX/pub -I../VEX/pub -DVGA_arm64=1 -DVGO_linux=1 -DVGP_arm64_linux=1 -DVGPV_arm64_linux_android=1 -Ipriv -m64 -O2 -g -Wall -Wmissing-prototypes -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wcast-align -Wcast-qual -Wwrite-strings -Wempty-body -Wformat -Wformat-security -Wignored-qualifiers -Wenum-conversion -finline-functions -fno-stack-protector -fno-strict-aliasing -fno-builtin -Wno-cast-align -Wno-self-assign -Wno-tautological-compare -Wbad-function-cast -fstrict-aliasing -MT priv/libvex_arm64_linux_a-main_main.o -MD -MP -MF priv/.deps/libvex_arm64_linux_a-main_main.Tpo -c -o priv/libvex_arm64_linux_a-main_main.o `test -f 'priv/main_main.c' || echo '../../VEX/'`priv/main_main.c
mv -f priv/.deps/libvex_arm64_linux_a-main_main.Tpo priv/.deps/libvex_arm64_linux_a-main_main.Po
[...]
/opt/ndk/android-ndk-r21e/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android23-clang -DHAVE_CONFIG_H -I. -I../../VEX -I.. -I../.. -I../../include -I../include -I../../VEX/pub -I../VEX/pub -DVGA_arm=1 -DVGO_linux=1 -DVGP_arm_linux=1 -DVGPV_arm_linux_android=1 -Ipriv -m32 -O2 -g -Wall -Wmissing-prototypes -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wcast-align -Wcast-qual -Wwrite-strings -Wempty-body -Wformat -Wformat-security -Wignored-qualifiers -Wenum-conversion -finline-functions -fno-stack-protector -fno-strict-aliasing -fno-builtin -Wno-cast-align -Wno-self-assign -Wno-tautological-compare -marm -mcpu=cortex-a8 -Wbad-function-cast -fstrict-aliasing -MT priv/libvex_arm_linux_a-host_ppc_defs.o -MD -MP -MF priv/.deps/libvex_arm_linux_a-host_ppc_defs.Tpo -c -o priv/libvex_arm_linux_a-host_ppc_defs.o `test -f 'priv/host_ppc_defs.c' || echo '../../VEX/'`priv/host_ppc_defs.c
mv -f priv/.deps/libvex_arm_linux_a-host_ppc_defs.Tpo priv/.deps/libvex_arm_linux_a-host_ppc_defs.Po
[...]
/opt/ndk/android-ndk-r21e/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android23-clang -m64 -O2 -g -Wall -Wmissing-prototypes -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wcast-align -Wcast-qual -Wwrite-strings -Wempty-body -Wformat -Wformat-security -Wignored-qualifiers -Wenum-conversion -finline-functions -fno-stack-protector -fno-strict-aliasing -fno-builtin -Wno-cast-align -Wno-self-assign -Wno-tautological-compare -static -m64 -O2 -g -Wall -Wmissing-prototypes -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wcast-align -Wcast-qual -Wwrite-strings -Wempty-body -Wformat -Wformat-security -Wignored-qualifiers -Wenum-conversion -finline-functions -fno-stack-protector -fno-strict-aliasing -fno-builtin -Wno-cast-align -Wno-self-assign -Wno-tautological-compare -o vgdb vgdb-vgdb.o vgdb-vgdb-invoker-none.o
/opt/ndk/android-ndk-r21e/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android23-clang -DHAVE_CONFIG_H -I. -I../../coregrind -I.. -I../.. -I../../include -I../include -I../../VEX/pub -I../VEX/pub -DVGA_arm64=1 -DVGO_linux=1 -DVGP_arm64_linux=1 -DVGPV_arm64_linux_android=1 -I../../coregrind -DVG_LIBDIR="\"/home/edukaj/qcom/valgrind/build/inst/libexec/valgrind"\" -DVG_PLATFORM="\"arm64-linux\"" -m64 -O2 -g -Wall -Wmissing-prototypes -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wcast-align -Wcast-qual -Wwrite-strings -Wempty-body -Wformat -Wformat-security -Wignored-qualifiers -Wenum-conversion -finline-functions -fno-stack-protector -fno-strict-aliasing -fno-builtin -Wno-cast-align -Wno-self-assign -Wno-tautological-compare -O -g -fno-omit-frame-pointer -fno-strict-aliasing -fpic -fno-builtin -MT vgpreload_core_arm64_linux_so-vg_preloaded.o -MD -MP -MF .deps/vgpreload_core_arm64_linux_so-vg_preloaded.Tpo -c -o vgpreload_core_arm64_linux_so-vg_preloaded.o `test -f 'vg_preloaded.c' || echo '../../coregrind/'`vg_preloaded.c
../../coregrind/vg_preloaded.c:118:5: warning: inline asm clobber list contains reserved registers: X18 [-Winline-asm]
CALL_FN_W_v(result, fn);
^
../include/valgrind.h:4316:10: note: expanded from macro 'CALL_FN_W_v'
VALGRIND_ALIGN_STACK \
^
../include/valgrind.h:4301:7: note: expanded from macro 'VALGRIND_ALIGN_STACK'
"mov x21, sp\n\t" \
^
<inline asm>:1:1: note: instantiated into assembly here
mov x21, sp
^
../../coregrind/vg_preloaded.c:118:5: note: Reserved registers on the clobber list may not be preserved across the asm statement, and clobbering them may lead to undefined behaviour.
CALL_FN_W_v(result, fn);
^
../include/valgrind.h:4316:10: note: expanded from macro 'CALL_FN_W_v'
VALGRIND_ALIGN_STACK \
^
../include/valgrind.h:4301:7: note: expanded from macro 'VALGRIND_ALIGN_STACK'
"mov x21, sp\n\t" \
^
<inline asm>:1:1: note: instantiated into assembly here
mov x21, sp
^
1 warning generated.
mv -f .deps/vgpreload_core_arm64_linux_so-vg_preloaded.Tpo .deps/vgpreload_core_arm64_linux_so-vg_preloaded.Po
/opt/ndk/android-ndk-r21e/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android23-clang -m64 -O2 -g -Wall -Wmissing-prototypes -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wcast-align -Wcast-qual -Wwrite-strings -Wempty-body -Wformat -Wformat-security -Wignored-qualifiers -Wenum-conversion -finline-functions -fno-stack-protector -fno-strict-aliasing -fno-builtin -Wno-cast-align -Wno-self-assign -Wno-tautological-compare -O -g -fno-omit-frame-pointer -fno-strict-aliasing -fpic -fno-builtin -nodefaultlibs -shared -Wl,-z,interpose,-z,initfirst -nostdlib -m64 -o vgpreload_core-arm64-linux.so vgpreload_core_arm64_linux_so-vg_preloaded.o
/opt/ndk/android-ndk-r21e/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android23-clang -DHAVE_CONFIG_H -I. -I../../coregrind -I.. -I../.. -I../../include -I../include -I../../VEX/pub -I../VEX/pub -DVGA_arm=1 -DVGO_linux=1 -DVGP_arm_linux=1 -DVGPV_arm_linux_android=1 -I../../coregrind -DVG_LIBDIR="\"/home/edukaj/qcom/valgrind/build/inst/libexec/valgrind"\" -DVG_PLATFORM="\"arm-linux\"" -m32 -O2 -g -Wall -Wmissing-prototypes -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wcast-align -Wcast-qual -Wwrite-strings -Wempty-body -Wformat -Wformat-security -Wignored-qualifiers -Wenum-conversion -finline-functions -fno-stack-protector -fno-strict-aliasing -fno-builtin -Wno-cast-align -Wno-self-assign -Wno-tautological-compare -marm -mcpu=cortex-a8 -O -g -fno-omit-frame-pointer -fno-strict-aliasing -fpic -fno-builtin -MT vgpreload_core_arm_linux_so-vg_preloaded.o -MD -MP -MF .deps/vgpreload_core_arm_linux_so-vg_preloaded.Tpo -c -o vgpreload_core_arm_linux_so-vg_preloaded.o `test -f 'vg_preloaded.c' || echo '../../coregrind/'`vg_preloaded.c
<inline asm>:1:41: error: expected '%<type>' or "<type>"
.pushsection ".debug_gdb_scripts", "MS",#progbits,1
^
<inline asm>:4:13: error: .popsection without corresponding .pushsection
.popsection
^
2 errors generated.
make[3]: *** [Makefile:9394: vgpreload_core_arm_linux_so-vg_preloaded.o] Error 1
make[3]: Leaving directory '/home/edukaj/qcom/valgrind/build/coregrind'
make[2]: *** [Makefile:2484: all] Error 2
make[2]: Leaving directory '/home/edukaj/qcom/valgrind/build/coregrind'
make[1]: *** [Makefile:907: all-recursive] Error 1
make[1]: Leaving directory '/home/edukaj/qcom/valgrind/build'
make: *** [Makefile:770: all] Error 2

Related

Lunch and Make fails in building AOSP (Android N) for Nexus 6p

Here is my build environment:
I build android N on my mac using case-sensitive image. On the same image, I can successfully android 5.0.1 for nexus5. Now I want to do that for nexus 6p using android 7.0.0_r6. Repo sync is successful.
There are multiple errors:
1
Unknown option: -C
usage: git [--version] [--help] [-c name=value]
           [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
           [-p|--paginate|--no-pager] [--no-replace-objects] [--bare]
           [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
           <command> [<args>]
2
localhost:n_android guest$ make -j12
date: 1475895550: No such file or directory
date: 1475895550: No such file or directory
3
build/kati/eval.h:18:10: fatal error: 'unordered_map' file not found
From the full log below, the first issue is in "lunch" command.
Has anybody seen this kind of error? Any comment is welcome! Thanks!
localhost:n_android guest$ source build/envsetup.sh
including device/asus/fugu/vendorsetup.sh
including device/generic/mini-emulator-arm64/vendorsetup.sh
including device/generic/mini-emulator-armv7-a-neon/vendorsetup.sh
including device/generic/mini-emulator-mips/vendorsetup.sh
including device/generic/mini-emulator-mips64/vendorsetup.sh
including device/generic/mini-emulator-x86/vendorsetup.sh
including device/generic/mini-emulator-x86_64/vendorsetup.sh
including device/google/dragon/vendorsetup.sh
including device/htc/flounder/vendorsetup.sh
including device/huawei/angler/vendorsetup.sh
including device/lge/bullhead/vendorsetup.sh
including device/linaro/hikey/vendorsetup.sh
including device/moto/shamu/vendorsetup.sh
including sdk/bash_completion/adb.bash
localhost:n_android guest$ lunch aosp_angler-userdebug
date: 1475895540: No such file or directory
date: 1475895540: No such file or directory
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=7.0
TARGET_PRODUCT=aosp_angler
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=cortex-a53
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv7-a-neon
TARGET_2ND_CPU_VARIANT=cortex-a53.a57
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=darwin
HOST_OS_EXTRA=Darwin-15.3.0-x86_64-i386-64bit
HOST_CROSS_OS=
HOST_CROSS_ARCH=
HOST_CROSS_2ND_ARCH=
HOST_BUILD_TYPE=release
BUILD_ID=NRD90U
OUT_DIR=out
============================================
localhost:n_android guest$ make -j12
date: 1475895550: No such file or directory
date: 1475895550: No such file or directory
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=7.0
TARGET_PRODUCT=aosp_angler
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=cortex-a53
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv7-a-neon
TARGET_2ND_CPU_VARIANT=cortex-a53.a57
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=darwin
HOST_OS_EXTRA=Darwin-15.3.0-x86_64-i386-64bit
HOST_CROSS_OS=
HOST_CROSS_ARCH=
HOST_CROSS_2ND_ARCH=
HOST_BUILD_TYPE=release
BUILD_ID=NRD90U
OUT_DIR=out
============================================
Unknown option: -C
usage: git [--version] [--help] [-c name=value]
[--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
[-p|--paginate|--no-pager] [--no-replace-objects] [--bare]
[--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
<command> [<args>]
prebuilts/clang/host/darwin-x86/clang-2690385/bin/clang++ -fno-exceptions -Wno-multichar -m64 -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS -isysroot /Applications/Xcode-5.0.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -mmacosx-version-min=10.8 -DMACOSX_DEPLOYMENT_TARGET=10.8 -fPIC -funwind-tables -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -O2 -g -fno-strict-aliasing -DNDEBUG -UDEBUG -D__compiler_offsetof=__builtin_offsetof -Werror=int-conversion -Wno-reserved-id-macro -Wno-format-pedantic -Wno-unused-command-line-argument -integrated-as -fstack-protector-strong -integrated-as -target x86_64-apple-darwin -isystem /Applications/Xcode-5.0.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1 -Wsign-promo -Wno-inconsistent-missing-override -target x86_64-apple-darwin -c -std=c++11 -g -W -Wall -MMD -MP -O -DNOLOG -march=native -o out/host/darwin-x86/obj/EXECUTABLES/ckati_intermediates/dep.o build/kati/dep.cc
prebuilts/clang/host/darwin-x86/clang-2690385/bin/clang++ -fno-exceptions -Wno-multichar -m64 -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS -isysroot /Applications/Xcode-5.0.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -mmacosx-version-min=10.8 -DMACOSX_DEPLOYMENT_TARGET=10.8 -fPIC -funwind-tables -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -O2 -g -fno-strict-aliasing -DNDEBUG -UDEBUG -D__compiler_offsetof=__builtin_offsetof -Werror=int-conversion -Wno-reserved-id-macro -Wno-format-pedantic -Wno-unused-command-line-argument -integrated-as -fstack-protector-strong -integrated-as -target x86_64-apple-darwin -isystem /Applications/Xcode-5.0.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1 -Wsign-promo -Wno-inconsistent-missing-override -target x86_64-apple-darwin -c -std=c++11 -g -W -Wall -MMD -MP -O -DNOLOG -march=native -o out/host/darwin-x86/obj/EXECUTABLES/ckati_intermediates/eval.o build/kati/eval.cc
prebuilts/clang/host/darwin-x86/clang-2690385/bin/clang++ -fno-exceptions -Wno-multichar -m64 -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS -isysroot /Applications/Xcode-5.0.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -mmacosx-version-min=10.8 -DMACOSX_DEPLOYMENT_TARGET=10.8 -fPIC -funwind-tables -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -O2 -g -fno-strict-aliasing -DNDEBUG -UDEBUG -D__compiler_offsetof=__builtin_offsetof -Werror=int-conversion -Wno-reserved-id-macro -Wno-format-pedantic -Wno-unused-command-line-argument -integrated-as -fstack-protector-strong -integrated-as -target x86_64-apple-darwin -isystem /Applications/Xcode-5.0.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1 -Wsign-promo -Wno-inconsistent-missing-override -target x86_64-apple-darwin -c -std=c++11 -g -W -Wall -MMD -MP -O -DNOLOG -march=native -o out/host/darwin-x86/obj/EXECUTABLES/ckati_intermediates/exec.o build/kati/exec.cc
prebuilts/clang/host/darwin-x86/clang-2690385/bin/clang++ -fno-exceptions -Wno-multichar -m64 -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS -isysroot /Applications/Xcode-5.0.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -mmacosx-version-min=10.8 -DMACOSX_DEPLOYMENT_TARGET=10.8 -fPIC -funwind-tables -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -O2 -g -fno-strict-aliasing -DNDEBUG -UDEBUG -D__compiler_offsetof=__builtin_offsetof -Werror=int-conversion -Wno-reserved-id-macro -Wno-format-pedantic -Wno-unused-command-line-argument -integrated-as -fstack-protector-strong -integrated-as -target x86_64-apple-darwin -isystem /Applications/Xcode-5.0.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1 -Wsign-promo -Wno-inconsistent-missing-override -target x86_64-apple-darwin -c -std=c++11 -g -W -Wall -MMD -MP -O -DNOLOG -march=native -o out/host/darwin-x86/obj/EXECUTABLES/ckati_intermediates/file.o build/kati/file.cc
prebuilts/clang/host/darwin-x86/clang-2690385/bin/clang++ -fno-exceptions -Wno-multichar -m64 -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS -isysroot /Applications/Xcode-5.0.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -mmacosx-version-min=10.8 -DMACOSX_DEPLOYMENT_TARGET=10.8 -fPIC -funwind-tables -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -O2 -g -fno-strict-aliasing -DNDEBUG -UDEBUG -D__compiler_offsetof=__builtin_offsetof -Werror=int-conversion -Wno-reserved-id-macro -Wno-format-pedantic -Wno-unused-command-line-argument -integrated-as -fstack-protector-strong -integrated-as -target x86_64-apple-darwin -isystem /Applications/Xcode-5.0.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1 -Wsign-promo -Wno-inconsistent-missing-override -target x86_64-apple-darwin -c -std=c++11 -g -W -Wall -MMD -MP -O -DNOLOG -march=native -o out/host/darwin-x86/obj/EXECUTABLES/ckati_intermediates/file_cache.o build/kati/file_cache.cc
prebuilts/clang/host/darwin-x86/clang-2690385/bin/clang++ -fno-exceptions -Wno-multichar -m64 -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS -isysroot /Applications/Xcode-5.0.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -mmacosx-version-min=10.8 -DMACOSX_DEPLOYMENT_TARGET=10.8 -fPIC -funwind-tables -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -O2 -g -fno-strict-aliasing -DNDEBUG -UDEBUG -D__compiler_offsetof=__builtin_offsetof -Werror=int-conversion -Wno-reserved-id-macro -Wno-format-pedantic -Wno-unused-command-line-argument -integrated-as -fstack-protector-strong -integrated-as -target x86_64-apple-darwin -isystem /Applications/Xcode-5.0.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1 -Wsign-promo -Wno-inconsistent-missing-override -target x86_64-apple-darwin -c -std=c++11 -g -W -Wall -MMD -MP -O -DNOLOG -march=native -o out/host/darwin-x86/obj/EXECUTABLES/ckati_intermediates/expr.o build/kati/expr.cc
prebuilts/clang/host/darwin-x86/clang-2690385/bin/clang++ -fno-exceptions -Wno-multichar -m64 -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS -isysroot /Applications/Xcode-5.0.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -mmacosx-version-min=10.8 -DMACOSX_DEPLOYMENT_TARGET=10.8 -fPIC -funwind-tables -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -O2 -g -fno-strict-aliasing -DNDEBUG -UDEBUG -D__compiler_offsetof=__builtin_offsetof -Werror=int-conversion -Wno-reserved-id-macro -Wno-format-pedantic -Wno-unused-command-line-argument -integrated-as -fstack-protector-strong -integrated-as -target x86_64-apple-darwin -isystem /Applications/Xcode-5.0.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1 -Wsign-promo -Wno-inconsistent-missing-override -target x86_64-apple-darwin -c -std=c++11 -g -W -Wall -MMD -MP -O -DNOLOG -march=native -o out/host/darwin-x86/obj/EXECUTABLES/ckati_intermediates/command.o build/kati/command.cc
prebuilts/clang/host/darwin-x86/clang-2690385/bin/clang++ -fno-exceptions -Wno-multichar -m64 -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS -isysroot /Applications/Xcode-5.0.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -mmacosx-version-min=10.8 -DMACOSX_DEPLOYMENT_TARGET=10.8 -fPIC -funwind-tables -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -O2 -g -fno-strict-aliasing -DNDEBUG -UDEBUG -D__compiler_offsetof=__builtin_offsetof -Werror=int-conversion -Wno-reserved-id-macro -Wno-format-pedantic -Wno-unused-command-line-argument -integrated-as -fstack-protector-strong -integrated-as -target x86_64-apple-darwin -isystem /Applications/Xcode-5.0.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1 -Wsign-promo -Wno-inconsistent-missing-override -target x86_64-apple-darwin -c -std=c++11 -g -W -Wall -MMD -MP -O -DNOLOG -march=native -o out/host/darwin-x86/obj/EXECUTABLES/ckati_intermediates/find.o build/kati/find.cc
prebuilts/clang/host/darwin-x86/clang-2690385/bin/clang++ -fno-exceptions -Wno-multichar -m64 -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS -isysroot /Applications/Xcode-5.0.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -mmacosx-version-min=10.8 -DMACOSX_DEPLOYMENT_TARGET=10.8 -fPIC -funwind-tables -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -O2 -g -fno-strict-aliasing -DNDEBUG -UDEBUG -D__compiler_offsetof=__builtin_offsetof -Werror=int-conversion -Wno-reserved-id-macro -Wno-format-pedantic -Wno-unused-command-line-argument -integrated-as -fstack-protector-strong -integrated-as -target x86_64-apple-darwin -isystem /Applications/Xcode-5.0.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1 -Wsign-promo -Wno-inconsistent-missing-override -target x86_64-apple-darwin -c -std=c++11 -g -W -Wall -MMD -MP -O -DNOLOG -march=native -o out/host/darwin-x86/obj/EXECUTABLES/ckati_intermediates/fileutil.o build/kati/fileutil.cc
prebuilts/clang/host/darwin-x86/clang-2690385/bin/clang++ -fno-exceptions -Wno-multichar -m64 -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS -isysroot /Applications/Xcode-5.0.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -mmacosx-version-min=10.8 -DMACOSX_DEPLOYMENT_TARGET=10.8 -fPIC -funwind-tables -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -O2 -g -fno-strict-aliasing -DNDEBUG -UDEBUG -D__compiler_offsetof=__builtin_offsetof -Werror=int-conversion -Wno-reserved-id-macro -Wno-format-pedantic -Wno-unused-command-line-argument -integrated-as -fstack-protector-strong -integrated-as -target x86_64-apple-darwin -isystem /Applications/Xcode-5.0.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1 -Wsign-promo -Wno-inconsistent-missing-override -target x86_64-apple-darwin -c -std=c++11 -g -W -Wall -MMD -MP -O -DNOLOG -march=native -o out/host/darwin-x86/obj/EXECUTABLES/ckati_intermediates/affinity.o build/kati/affinity.cc
prebuilts/clang/host/darwin-x86/clang-2690385/bin/clang++ -fno-exceptions -Wno-multichar -m64 -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS -isysroot /Applications/Xcode-5.0.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -mmacosx-version-min=10.8 -DMACOSX_DEPLOYMENT_TARGET=10.8 -fPIC -funwind-tables -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -O2 -g -fno-strict-aliasing -DNDEBUG -UDEBUG -D__compiler_offsetof=__builtin_offsetof -Werror=int-conversion -Wno-reserved-id-macro -Wno-format-pedantic -Wno-unused-command-line-argument -integrated-as -fstack-protector-strong -integrated-as -target x86_64-apple-darwin -isystem /Applications/Xcode-5.0.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1 -Wsign-promo -Wno-inconsistent-missing-override -target x86_64-apple-darwin -c -std=c++11 -g -W -Wall -MMD -MP -O -DNOLOG -march=native -o out/host/darwin-x86/obj/EXECUTABLES/ckati_intermediates/flags.o build/kati/flags.cc
prebuilts/clang/host/darwin-x86/clang-2690385/bin/clang++ -fno-exceptions -Wno-multichar -m64 -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS -isysroot /Applications/Xcode-5.0.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -mmacosx-version-min=10.8 -DMACOSX_DEPLOYMENT_TARGET=10.8 -fPIC -funwind-tables -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -O2 -g -fno-strict-aliasing -DNDEBUG -UDEBUG -D__compiler_offsetof=__builtin_offsetof -Werror=int-conversion -Wno-reserved-id-macro -Wno-format-pedantic -Wno-unused-command-line-argument -integrated-as -fstack-protector-strong -integrated-as -target x86_64-apple-darwin -isystem /Applications/Xcode-5.0.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1 -Wsign-promo -Wno-inconsistent-missing-override -target x86_64-apple-darwin -c -std=c++11 -g -W -Wall -MMD -MP -O -DNOLOG -march=native -o out/host/darwin-x86/obj/EXECUTABLES/ckati_intermediates/func.o build/kati/func.cc
In file included from build/kati/eval.cc:17:
build/kati/eval.h:18:10: fatal error: 'unordered_map' file not found
#include <unordered_map>
^
build/kati/exec.cc:23:10: fatal error: 'unordered_map' file not found
#include <unordered_map>
^
In file included from build/kati/fileutil.cc:17:
build/kati/fileutil.h:20:10: fatal error: 'unordered_map' file not found
#include <unordered_map>
^
In file included from build/kati/file_cache.cc:17:
build/kati/file_cache.h:20:10: fatal error: 'unordered_set' file not found
#include <unordered_set>
^
In file included from build/kati/dep.cc:17:
build/kati/dep.h:19:10: fatal error: 'unordered_map' file not found
#include <unordered_map>
^
In file included from build/kati/find.cc:17:
build/kati/find.h:20:10: fatal error: 'unordered_set' file not found
#include <unordered_set>
^
1 error generated.
In file included from build/kati/expr.cc:17:
In file included from build/kati/expr.h:21:
build/kati/string_piece.h:213:19: error: explicit specialization of non-template struct 'hash'
template<> struct hash<StringPiece> {
^ ~~~~~~~~~~~~~
make: *** [out/host/darwin-x86/obj/EXECUTABLES/ckati_intermediates/file_cache.o] Error 1
make: *** Waiting for unfinished jobs....
In file included from build/kati/expr.cc:21:
build/kati/eval.h:18:10: fatal error: 'unordered_map' file not found
#include <unordered_map>
^
In file included from build/kati/affinity.cc:17:
In file included from build/kati/flags.h:21:
build/kati/string_piece.h:213:19: error: explicit specialization of non-template struct 'hash'
template<> struct hash<StringPiece> {
^ ~~~~~~~~~~~~~
In file included from build/kati/flags.cc:17:
In file included from build/kati/flags.h:21:
build/kati/string_piece.h:213:19: error: explicit specialization of non-template struct 'hash'
template<> struct hash<StringPiece> {
^ ~~~~~~~~~~~~~
In file included from build/kati/affinity.cc:17:
In file included from build/kati/flags.h:22:
build/kati/symtab.h:88:19: error: explicit specialization of non-template struct 'hash'
template<> struct hash<Symbol> {
^ ~~~~~~~~
In file included from build/kati/command.cc:17:
In file included from build/kati/command.h:20:
In file included from build/kati/symtab.h:21:
build/kati/string_piece.h:213:19: error: explicit specialization of non-template struct 'hash'
template<> struct hash<StringPiece> {In file included from
build/kati/flags.cc: ^ ~~~~~~~~~~~~~17
:
In file included from build/kati/flags.h:22:
build/kati/symtab.h:88:19: error: explicit specialization of non-template struct 'hash'
template<> struct hash<Symbol> {
^ ~~~~~~~~
build/kati/symtab.h:88:19: error: redefinition of 'hash'
build/kati/string_piece.h:213:19: note: previous definition is here
template<> struct hash<StringPiece> {
^
build/kati/symtab.h:88:19: error: redefinition of 'hash'
build/kati/string_piece.h:213:19: note: previous definition is here
template<> struct hash<StringPiece> {
^
In file included from build/kati/file.cc:24:
In file included from build/kati/log.h:23:
In file included from build/kati/flags.h:21:
build/kati/string_piece.h:213:19: error: explicit specialization of non-template struct 'hash'
template<> struct hash<StringPiece> {
^ ~~~~~~~~~~~~~
In file included from build/kati/command.cc:17:
In file included from build/kati/command.h:20:
build/kati/symtab.h:88:19: error: explicit specialization of non-template struct 'hash'
template<> struct hash<Symbol> {
^ ~~~~~~~~
build/kati/symtab.h:88:19: error: redefinition of 'hash'
build/kati/string_piece.h:213:19: note: previous definition is here
template<> struct hash<StringPiece> {
^
In file included from build/kati/file.cc:24:
In file included from build/kati/log.h:23:
In file included from build/kati/flags.h:22:
build/kati/symtab.h:88:19: error: explicit specialization of non-template struct 'hash'
template<> struct hash<Symbol> {
^ ~~~~~~~~
build/kati/symtab.h:88:19: error: redefinition of 'hash'
build/kati/string_piece.h:213:19: note: previous definition is here
template<> struct hash<StringPiece> {
^
build/kati/command.cc:19:10: fatal error: 'unordered_map' file not found
#include <unordered_map>
^
3 errors generated.
1 error generated.
In file included from build/kati/func.cc:17:
In file included from build/kati/func.h:22:
In file included from build/kati/expr.h:21:
build/kati/string_piece.h:213:19: error: explicit specialization of non-template struct 'hash'
template<> struct hash<StringPiece> {
^ ~~~~~~~~~~~~~
make: *** [out/host/darwin-x86/obj/EXECUTABLES/ckati_intermediates/affinity.o] Error 1
make: *** [out/host/darwin-x86/obj/EXECUTABLES/ckati_intermediates/eval.o] Error 1
In file included from build/kati/func.cc:17:
build/kati/func.h:46:3: error: unknown type name 'unique_ptr'
unique_ptr<FindCommand> find;
^
build/kati/func.h:46:13: error: expected member name or ';' after declaration specifiers
unique_ptr<FindCommand> find;
~~~~~~~~~~^
1 error generated.
make: *** [out/host/darwin-x86/obj/EXECUTABLES/ckati_intermediates/exec.o] Error 1
3 errors generated.
3 errors generated.
make: *** [out/host/darwin-x86/obj/EXECUTABLES/ckati_intermediates/flags.o] Error 1
make: *** [out/host/darwin-x86/obj/EXECUTABLES/ckati_intermediates/file.o] Error 1
4 errors generated.
2 errors generated.
make: *** [out/host/darwin-x86/obj/EXECUTABLES/ckati_intermediates/command.o] Error 1
make: *** [out/host/darwin-x86/obj/EXECUTABLES/ckati_intermediates/expr.o] Error 1
1 error generated.
1 error generated.
make: *** [out/host/darwin-x86/obj/EXECUTABLES/ckati_intermediates/fileutil.o] Error 1
make: *** [out/host/darwin-x86/obj/EXECUTABLES/ckati_intermediates/find.o] Error 1
build/kati/func.cc:28:10: fatal error: 'unordered_map' file not found
#include <unordered_map>
^
4 errors generated.
make: *** [out/host/darwin-x86/obj/EXECUTABLES/ckati_intermediates/func.o] Error 1
1 error generated.
make: *** [out/host/darwin-x86/obj/EXECUTABLES/ckati_intermediates/dep.o] Error 1
#### make failed to build some targets (1 seconds) ####
localhost:n_android guest$
I think I have found way for it.
Update your Xcode, port to latest you can find.
Below command, you may also need it.
sudo port install gmake libsdl gnupg git
Check if you have install multiple Xcode. If so, use /usr/bin/xcode-select to choose latest one. For example, Xcode 8.0.
You will find there is not 10.11 in Xcode 8.0. You can download it from xcode SDKs repo. Put it to /Applications/XCode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk.
Then, you will find the world is better. Enjoy.

Running telegram messaging project in android studio, can't fix errors

I am not able to find any appropriate solution for below issue. I just want to run telegram messaging app in my android studio. I already obtained the neccesary data from telegram like api_id and api_hash, and put it in BuildVars.java. Now I m getting 2 errors, which I cant solve a few days.
Errors are:
1)
Error:Execution failed for task
':TMessagesProj:externalNativeBuildArmv7Debug'.
Build command failed. Error while executing 'C:\android-sdk_r24.0.2-windows\ndk-bundle\ndk-build.cmd' with
arguments {NDK_PROJECT_PATH=null
APP_BUILD_SCRIPT=D:\AndroidProjects\Telegram-master\TMessagesProj\jni\Android.mk
NDK_APPLICATION_MK=D:\AndroidProjects\Telegram-master\TMessagesProj\jni\Application.mk
APP_ABI=armeabi-v7a NDK_ALL_ABIS=armeabi-v7a NDEBUG=1
APP_PLATFORM=android-14
NDK_OUT=D:/AndroidProjects/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/armv7/debug/obj
NDK_LIBS_OUT=D:\AndroidProjects\Telegram-master\TMessagesProj\build\intermediates\ndkBuild\armv7\debug\lib
NDK_APPLICATION_MK:=jni/Application.mk APP_PLATFORM:=android-14
D:/AndroidProjects/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/armv7/debug/obj/local/armeabi-v7a/libtmessages.24.so}
[armeabi-v7a] "Compile arm ": "tmessages.24 <= opus.c"
process_begin: CreateProcess(NULL,
C:/android-sdk_r24.0.2-windows/ndk-bundle/build//../toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/arm-linux-androideabi-gcc -MMD -MP -MF D:/AndroidProjects/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/armv7/debug/obj/local/armeabi-v7a/objs/tmessages.24/./opus/src/opus.o.d
-fpic -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -g -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=softfp -marm -O2 -DNDEBUG -I./jni/opus/include -I./jni/opus/silk -I./jni/opus/silk/fixed -I./jni/opus/celt -I./jni/opus/ -I./jni/opus/opusfile -I./jni/libyuv/include -I./jni/boringssl/include -I./jni/breakpad/common/android/include -I./jni/breakpad -I./jni/ffmpeg/include -IC:/android-sdk_r24.0.2-windows/ndk-bundle/build//../sources/cxx-stl/gnu-libstdc++/4.9/include
-IC:/android-sdk_r24.0.2-windows/ndk-bundle/build//../sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/include
-IC:/android-sdk_r24.0.2-windows/ndk-bundle/build//../sources/cxx-stl/gnu-libstdc++/4.9/include/backward
-IC:/android-sdk_r24.0.2-windows/ndk-bundle/build//../sources/cxx-stl/gnu-libstdc++/4.9/include
-IC:/android-sdk_r24.0.2-windows/ndk-bundle/build//../sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/include
-IC:/android-sdk_r24.0.2-windows/ndk-bundle/build//../sources/cxx-stl/gnu-libstdc++/4.9/include/backward
-IC:/android-sdk_r24.0.2-windows/ndk-bundle/build//../sources/android/cpufeatures
-ID:/AndroidProjects/Telegram-master/TMessagesProj/jni -DANDROID -w -std=c11 -Os -DNULL=0 -DSOCKLEN_T=socklen_t -DLOCALE_NOT_USED -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -Drestrict= -D__EMX__ -DOPUS_BUILD -DFIXED_POINT -DUSE_ALLOCA -DHAVE_LRINT -DHAVE_LRINTF -fno-math-errno -DANDROID_NDK -DDISABLE_IMPORTGL -fno-strict-aliasing -fprefetch-loop-arrays -DAVOID_TABLES -DANDROID_TILE_BASED_DECODE -DANDROID_ARMV6_IDCT -ffast-math -D__STDC_CONSTANT_MACROS -DLIBYUV_NEON -DLIBYUV_NEON -Wa,--noexecstack -Wformat -Werror=format-security -isystem C:/android-sdk_r24.0.2-windows/ndk-bundle/build//../platforms/android-14/arch-arm/usr/include
-c D:/AndroidProjects/Telegram-master/TMessagesProj/jni/./opus/src/opus.c
-o D:/AndroidProjects/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/armv7/debug/obj/local/armeabi-v7a/objs/tmessages.24/./opus/src/opus.o,
...) failed. make (e=2): ?? ??????? ????? ????????? ????. make: ***
[D:/AndroidProjects/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/armv7/debug/obj/local/armeabi-v7a/objs/tmessages.24/./opus/src/opus.o]
Error 2
2)
Error:Note: Some input files use or override a deprecated API. Note:
Recompile with -Xlint:deprecation for details. Note: Some input files
use unchecked or unsafe operations. Note: Recompile with
-Xlint:unchecked for details. process_begin: CreateProcess(NULL, C:/android-sdk_r24.0.2-windows/ndk-bundle/build//../toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/arm-linux-androideabi-gcc -MMD -MP -MF D:/AndroidProjects/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/armv7/debug/obj/local/armeabi-v7a/objs/tmessages.24/./opus/src/opus.o.d
-fpic -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -g -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=softfp -marm -O2 -DNDEBUG -I./jni/opus/include -I./jni/opus/silk -I./jni/opus/silk/fixed -I./jni/opus/celt -I./jni/opus/ -I./jni/opus/opusfile -I./jni/libyuv/include -I./jni/boringssl/include -I./jni/breakpad/common/android/include -I./jni/breakpad -I./jni/ffmpeg/include -IC:/android-sdk_r24.0.2-windows/ndk-bundle/build//../sources/cxx-stl/gnu-libstdc++/4.9/include
-IC:/android-sdk_r24.0.2-windows/ndk-bundle/build//../sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/include
-IC:/android-sdk_r24.0.2-windows/ndk-bundle/build//../sources/cxx-stl/gnu-libstdc++/4.9/include/backward
-IC:/android-sdk_r24.0.2-windows/ndk-bundle/build//../sources/cxx-stl/gnu-libstdc++/4.9/include
-IC:/android-sdk_r24.0.2-windows/ndk-bundle/build//../sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/include
-IC:/android-sdk_r24.0.2-windows/ndk-bundle/build//../sources/cxx-stl/gnu-libstdc++/4.9/include/backward
-IC:/android-sdk_r24.0.2-windows/ndk-bundle/build//../sources/android/cpufeatures
-ID:/AndroidProjects/Telegram-master/TMessagesProj/jni -DANDROID -w -std=c11 -Os -DNULL=0 -DSOCKLEN_T=socklen_t -DLOCALE_NOT_USED -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -Drestrict= -D__EMX__ -DOPUS_BUILD -DFIXED_POINT -DUSE_ALLOCA -DHAVE_LRINT -DHAVE_LRINTF -fno-math-errno -DANDROID_NDK -DDISABLE_IMPORTGL -fno-strict-aliasing -fprefetch-loop-arrays -DAVOID_TABLES -DANDROID_TILE_BASED_DECODE -DANDROID_ARMV6_IDCT -ffast-math -D__STDC_CONSTANT_MACROS -DLIBYUV_NEON -DLIBYUV_NEON -Wa,--noexecstack -Wformat -Werror=format-security -isystem C:/android-sdk_r24.0.2-windows/ndk-bundle/build//../platforms/android-14/arch-arm/usr/include
-c D:/AndroidProjects/Telegram-master/TMessagesProj/jni/./opus/src/opus.c
-o D:/AndroidProjects/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/armv7/debug/obj/local/armeabi-v7a/objs/tmessages.24/./opus/src/opus.o,
...) failed. make (e=2): ?? ??????? ????? ????????? ????.
make: ***
[D:/AndroidProjects/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/armv7/debug/obj/local/armeabi-v7a/objs/tmessages.24/./opus/src/opus.o]
Error 2
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':TMessagesProj:externalNativeBuildArmv7Debug'.
Build command failed. Error while executing 'C:\android-sdk_r24.0.2-windows\ndk-bundle\ndk-build.cmd' with
arguments {NDK_PROJECT_PATH=null
APP_BUILD_SCRIPT=D:\AndroidProjects\Telegram-master\TMessagesProj\jni\Android.mk
NDK_APPLICATION_MK=D:\AndroidProjects\Telegram-master\TMessagesProj\jni\Application.mk
APP_ABI=armeabi-v7a NDK_ALL_ABIS=armeabi-v7a NDEBUG=1
APP_PLATFORM=android-14
NDK_OUT=D:/AndroidProjects/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/armv7/debug/obj
NDK_LIBS_OUT=D:\AndroidProjects\Telegram-master\TMessagesProj\build\intermediates\ndkBuild\armv7\debug\lib
NDK_APPLICATION_MK:=jni/Application.mk APP_PLATFORM:=android-14
D:/AndroidProjects/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/armv7/debug/obj/local/armeabi-v7a/libtmessages.24.so}
[armeabi-v7a] "Compile arm ": "tmessages.24 <= opus.c"
process_begin: CreateProcess(NULL,
C:/android-sdk_r24.0.2-windows/ndk-bundle/build//../toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/arm-linux-androideabi-gcc -MMD -MP -MF D:/AndroidProjects/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/armv7/debug/obj/local/armeabi-v7a/objs/tmessages.24/./opus/src/opus.o.d
-fpic -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -g -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=softfp -marm -O2 -DNDEBUG -I./jni/opus/include -I./jni/opus/silk -I./jni/opus/silk/fixed -I./jni/opus/celt -I./jni/opus/ -I./jni/opus/opusfile -I./jni/libyuv/include -I./jni/boringssl/include -I./jni/breakpad/common/android/include -I./jni/breakpad -I./jni/ffmpeg/include -IC:/android-sdk_r24.0.2-windows/ndk-bundle/build//../sources/cxx-stl/gnu-libstdc++/4.9/include
-IC:/android-sdk_r24.0.2-windows/ndk-bundle/build//../sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/include
-IC:/android-sdk_r24.0.2-windows/ndk-bundle/build//../sources/cxx-stl/gnu-libstdc++/4.9/include/backward
-IC:/android-sdk_r24.0.2-windows/ndk-bundle/build//../sources/cxx-stl/gnu-libstdc++/4.9/include
-IC:/android-sdk_r24.0.2-windows/ndk-bundle/build//../sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/include
-IC:/android-sdk_r24.0.2-windows/ndk-bundle/build//../sources/cxx-stl/gnu-libstdc++/4.9/include/backward
-IC:/android-sdk_r24.0.2-windows/ndk-bundle/build//../sources/android/cpufeatures
-ID:/AndroidProjects/Telegram-master/TMessagesProj/jni -DANDROID -w -std=c11 -Os -DNULL=0 -DSOCKLEN_T=socklen_t -DLOCALE_NOT_USED -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -Drestrict= -D__EMX__ -DOPUS_BUILD -DFIXED_POINT -DUSE_ALLOCA -DHAVE_LRINT -DHAVE_LRINTF -fno-math-errno -DANDROID_NDK -DDISABLE_IMPORTGL -fno-strict-aliasing -fprefetch-loop-arrays -DAVOID_TABLES -DANDROID_TILE_BASED_DECODE -DANDROID_ARMV6_IDCT -ffast-math -D__STDC_CONSTANT_MACROS -DLIBYUV_NEON -DLIBYUV_NEON -Wa,--noexecstack -Wformat -Werror=format-security -isystem C:/android-sdk_r24.0.2-windows/ndk-bundle/build//../platforms/android-14/arch-arm/usr/include
-c D:/AndroidProjects/Telegram-master/TMessagesProj/jni/./opus/src/opus.c
-o D:/AndroidProjects/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/armv7/debug/obj/local/armeabi-v7a/objs/tmessages.24/./opus/src/opus.o,
...) failed. make (e=2): ?? ??????? ????? ????????? ????. make: ***
[D:/AndroidProjects/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/armv7/debug/obj/local/armeabi-v7a/objs/tmessages.24/./opus/src/opus.o]
Error 2
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
P.S. I'm using 2.2.1 gradle version. I tried to run ndk-build.cmd from command line, with NDK_PROJECT_PATH and NDK_APPLICATION_MK, didn't get any result. Thanks in advance!

Build apk using buildozer with pillow: _imaging issue

Oh, hi
I wrote app with python and kivy. I built it with buildozer
But on Android it fails:
03-26 23:10:25.857: E/art(24531): dlopen("/data/data/pl.lolwtf.kethuporo/files/lib/python2.7/lib-dynload/_imaging.so", RTLD_LAZY) failed: dlopen failed: library "/data/data/pl.lolwtf.kethuporo/files/lib/python2.7/lib-dynload/_imaging.so" not found
Ok, so I added pillow do buildozer.spec requirements:
requirements = kivy,sqlite3,pillow
But on apk building (buildozer android debug) lots of No such file or directory errors appears:
Downloading/unpacking pillow
Using download cache from /home/voy/.buildozer/cache/https%3A%2F%2Fpypi.python.org%2Fpackages%2Fsource%2FP%2FPillow%2FPillow-2.7.0.tar.gz
Running setup.py (path:/home/voy/workspace/ketchuporo/.buildozer/venv/build/pillow/setup.py) egg_info for package pillow
Installing collected packages: pillow
Running setup.py install for pillow
building 'PIL._imaging' extension
/bin/false -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_LIBJPEG -DHAVE_LIBZ -DHAVE_LIBTIFF -I/usr/include/freetype2 -I/home/voy/workspace/ketchuporo/.buildozer/venv/build/pillow/libImaging -I/home/voy/workspace/ketchuporo/.buildozer/venv/include -I/usr/include/tcl8.6 -I/usr/local/include -I/usr/include -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu -c libImaging/Resample.c -o build/temp.linux-x86_64-2.7/libImaging/Resample.o
/bin/false -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_LIBJPEG -DHAVE_LIBZ -DHAVE_LIBTIFF -I/usr/include/freetype2 -I/home/voy/workspace/ketchuporo/.buildozer/venv/build/pillow/libImaging -I/home/voy/workspace/ketchuporo/.buildozer/venv/include -I/usr/include/tcl8.6 -I/usr/local/include -I/usr/include -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu -c _imaging.c -o build/temp.linux-x86_64-2.7/_imaging.o
/bin/false -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_LIBJPEG -DHAVE_LIBZ -DHAVE_LIBTIFF -I/usr/include/freetype2 -I/home/voy/workspace/ketchuporo/.buildozer/venv/build/pillow/libImaging -I/home/voy/workspace/ketchuporo/.buildozer/venv/include -I/usr/include/tcl8.6 -I/usr/local/include -I/usr/include -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu -c libImaging/Crop.c -o build/temp.linux-x86_64-2.7/libImaging/Crop.o
/bin/false -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_LIBJPEG -DHAVE_LIBZ -DHAVE_LIBTIFF -I/usr/include/freetype2 -I/home/voy/workspace/ketchuporo/.buildozer/venv/build/pillow/libImaging -I/home/voy/workspace/ketchuporo/.buildozer/venv/include -I/usr/include/tcl8.6 -I/usr/local/include -I/usr/include -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu -c libImaging/Geometry.c -o build/temp.linux-x86_64-2.7/libImaging/Geometry.o
/bin/false -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_LIBJPEG -DHAVE_LIBZ -DHAVE_LIBTIFF -I/usr/include/freetype2 -I/home/voy/workspace/ketchuporo/.buildozer/venv/build/pillow/libImaging -I/home/voy/workspace/ketchuporo/.buildozer/venv/include -I/usr/include/tcl8.6 -I/usr/local/include -I/usr/include -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu -c libImaging/Matrix.c -o build/temp.linux-x86_64-2.7/libImaging/Matrix.o
/bin/false -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_LIBJPEG -DHAVE_LIBZ -DHAVE_LIBTIFF -I/usr/include/freetype2 -I/home/voy/workspace/ketchuporo/.buildozer/venv/build/pillow/libImaging -I/home/voy/workspace/ketchuporo/.buildozer/venv/include -I/usr/include/tcl8.6 -I/usr/local/include -I/usr/include -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu -c libImaging/Quant.c -o build/temp.linux-x86_64-2.7/libImaging/Quant.o
/bin/false -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_LIBJPEG -DHAVE_LIBZ -DHAVE_LIBTIFF -I/usr/include/freetype2 -I/home/voy/workspace/ketchuporo/.buildozer/venv/build/pillow/libImaging -I/home/voy/workspace/ketchuporo/.buildozer/venv/include -I/usr/include/tcl8.6 -I/usr/local/include -I/usr/include -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu -c libImaging/RawDecode.c -o build/temp.linux-x86_64-2.7/libImaging/RawDecode.o
/bin/false -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_LIBJPEG -DHAVE_LIBZ -DHAVE_LIBTIFF -I/usr/include/freetype2 -I/home/voy/workspace/ketchuporo/.buildozer/venv/build/pillow/libImaging -I/home/voy/workspace/ketchuporo/.buildozer/venv/include -I/usr/include/tcl8.6 -I/usr/local/include -I/usr/include -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu -c libImaging/XbmEncode.c -o build/temp.linux-x86_64-2.7/libImaging/XbmEncode.o
Building using 2 processes
x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/_imaging.o build/temp.linux-x86_64-2.7/decode.o build/temp.linux-x86_64-2.7/encode.o build/temp.linux-x86_64-2.7/map.o build/temp.linux-x86_64-2.7/display.o build/temp.linux-x86_64-2.7/outline.o build/temp.linux-x86_64-2.7/path.o build/temp.linux-x86_64-2.7/libImaging/Access.o build/temp.linux-x86_64-2.7/libImaging/AlphaComposite.o build/temp.linux-x86_64-2.7/libImaging/Resample.o build/temp.linux-x86_64-2.7/libImaging/Bands.o build/temp.linux-x86_64-2.7/libImaging/BitDecode.o build/temp.linux-x86_64-2.7/libImaging/Blend.o build/temp.linux-x86_64-2.7/libImaging/Chops.o build/temp.linux-x86_64-2.7/libImaging/Convert.o build/temp.linux-x86_64-2.7/libImaging/ConvertYCbCr.o build/temp.linux-x86_64-2.7/libImaging/Copy.o build/temp.linux-x86_64-2.7/libImaging/Crc32.o build/temp.linux-x86_64-2.7/libImaging/Crop.o build/temp.linux-x86_64-2.7/libImaging/Dib.o build/temp.linux-x86_64-2.7/libImaging/Draw.o build/temp.linux-x86_64-2.7/libImaging/Effects.o build/temp.linux-x86_64-2.7/libImaging/EpsEncode.o build/temp.linux-x86_64-2.7/libImaging/File.o build/temp.linux-x86_64-2.7/libImaging/Fill.o build/temp.linux-x86_64-2.7/libImaging/Filter.o build/temp.linux-x86_64-2.7/libImaging/FliDecode.o build/temp.linux-x86_64-2.7/libImaging/Geometry.o build/temp.linux-x86_64-2.7/libImaging/GetBBox.o build/temp.linux-x86_64-2.7/libImaging/GifDecode.o build/temp.linux-x86_64-2.7/libImaging/GifEncode.o build/temp.linux-x86_64-2.7/libImaging/HexDecode.o build/temp.linux-x86_64-2.7/libImaging/Histo.o build/temp.linux-x86_64-2.7/libImaging/JpegDecode.o build/temp.linux-x86_64-2.7/libImaging/JpegEncode.o build/temp.linux-x86_64-2.7/libImaging/LzwDecode.o build/temp.linux-x86_64-2.7/libImaging/Matrix.o build/temp.linux-x86_64-2.7/libImaging/ModeFilter.o build/temp.linux-x86_64-2.7/libImaging/MspDecode.o build/temp.linux-x86_64-2.7/libImaging/Negative.o build/temp.linux-x86_64-2.7/libImaging/Offset.o build/temp.linux-x86_64-2.7/libImaging/Pack.o build/temp.linux-x86_64-2.7/libImaging/PackDecode.o build/temp.linux-x86_64-2.7/libImaging/Palette.o build/temp.linux-x86_64-2.7/libImaging/Paste.o build/temp.linux-x86_64-2.7/libImaging/Quant.o build/temp.linux-x86_64-2.7/libImaging/QuantOctree.o build/temp.linux-x86_64-2.7/libImaging/QuantHash.o build/temp.linux-x86_64-2.7/libImaging/QuantHeap.o build/temp.linux-x86_64-2.7/libImaging/PcdDecode.o build/temp.linux-x86_64-2.7/libImaging/PcxDecode.o build/temp.linux-x86_64-2.7/libImaging/PcxEncode.o build/temp.linux-x86_64-2.7/libImaging/Point.o build/temp.linux-x86_64-2.7/libImaging/RankFilter.o build/temp.linux-x86_64-2.7/libImaging/RawDecode.o build/temp.linux-x86_64-2.7/libImaging/RawEncode.o build/temp.linux-x86_64-2.7/libImaging/Storage.o build/temp.linux-x86_64-2.7/libImaging/SunRleDecode.o build/temp.linux-x86_64-2.7/libImaging/TgaRleDecode.o build/temp.linux-x86_64-2.7/libImaging/Unpack.o build/temp.linux-x86_64-2.7/libImaging/UnpackYCC.o build/temp.linux-x86_64-2.7/libImaging/UnsharpMask.o build/temp.linux-x86_64-2.7/libImaging/XbmDecode.o build/temp.linux-x86_64-2.7/libImaging/XbmEncode.o build/temp.linux-x86_64-2.7/libImaging/ZipDecode.o build/temp.linux-x86_64-2.7/libImaging/ZipEncode.o build/temp.linux-x86_64-2.7/libImaging/TiffDecode.o build/temp.linux-x86_64-2.7/libImaging/Incremental.o build/temp.linux-x86_64-2.7/libImaging/Jpeg2KDecode.o build/temp.linux-x86_64-2.7/libImaging/Jpeg2KEncode.o build/temp.linux-x86_64-2.7/libImaging/BoxBlur.o -L/home/voy/workspace/ketchuporo/.buildozer/venv/lib -L/usr/lib/x86_64-linux-gnu -L/usr/local/lib -L/usr/lib/x86_64-linux-gnu -ljpeg -lz -ltiff -o build/lib.linux-x86_64-2.7/PIL/_imaging.so
x86_64-linux-gnu-gcc: error: build/temp.linux-x86_64-2.7/_imaging.o: No such file or directory
x86_64-linux-gnu-gcc: error: build/temp.linux-x86_64-2.7/decode.o: No such file or directory
x86_64-linux-gnu-gcc: error: build/temp.linux-x86_64-2.7/encode.o: No such file or directory
x86_64-linux-gnu-gcc: error: build/temp.linux-x86_64-2.7/map.o: No such file or directory
x86_64-linux-gnu-gcc: error: build/temp.linux-x86_64-2.7/display.o: No such file or directory
x86_64-linux-gnu-gcc: error: build/temp.linux-x86_64-2.7/outline.o: No such file or directory
x86_64-linux-gnu-gcc: error: build/temp.linux-x86_64-2.7/path.o: No such file or directory
x86_64-linux-gnu-gcc: error: build/temp.linux-x86_64-2.7/libImaging/Access.o: No such file or directory
x86_64-linux-gnu-gcc: error: build/temp.linux-x86_64-2.7/libImaging/AlphaComposite.o: No such file or directory
x86_64-linux-gnu-gcc: error: build/temp.linux-x86_64-
(...)
2.7/libImaging/Jpeg2KEncode.o: No such file or directory
x86_64-linux-gnu-gcc: error: build/temp.linux-x86_64-2.7/libImaging/BoxBlur.o: No such file or directory
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Complete output from command /home/voy/workspace/ketchuporo/.buildozer/venv/bin/python2.7 -c "import setuptools, tokenize;__file__='/home/voy/workspace/ketchuporo/.buildozer/venv/build/pillow/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-Ryb9en-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/voy/workspace/ketchuporo/.buildozer/venv/include/site/python2.7 --home=/tmp/tmpv9BKPZ:
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/PIL
copying PIL/GifImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL
copying PIL/PcfFontFile.py -> build/lib.linux-x86_64-2.7/PIL
(...)
copying PIL/IptcImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL
copying PIL/ImageFilter.py -> build/lib.linux-x86_64-2.7/PIL
copying PIL/ImageEnhance.py -> build/lib.linux-x86_64-2.7/PIL
running egg_info
writing dependency_links to Pillow.egg-info/dependency_links.txt
writing Pillow.egg-info/PKG-INFO
writing top-level names to Pillow.egg-info/top_level.txt
warning: manifest_maker: standard file '-c' not found
reading manifest file 'Pillow.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'Pillow.egg-info/SOURCES.txt'
copying PIL/OleFileIO-README.md -> build/lib.linux-x86_64-2.7/PIL
running build_ext
building 'PIL._imaging' extension
creating build/temp.linux-x86_64-2.7/libImaging
/bin/false -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_LIBJPEG -DHAVE_LIBZ -DHAVE_LIBTIFF -I/usr/include/freetype2 -I/home/voy/workspace/ketchuporo/.buildozer/venv/build/pillow/libImaging -I/home/voy/workspace/ketchuporo/.buildozer/venv/include -I/usr/include/tcl8.6 -I/usr/local/include -I/usr/include -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu -c libImaging/Resample.c -o build/temp.linux-x86_64-2.7/libImaging/Resample.o
/bin/false -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_LIBJPEG -DHAVE_LIBZ -DHAVE_LIBTIFF -I/usr/include/freetype2 -I/home/voy/workspace/ketchuporo/.buildozer/venv/build/pillow/libImaging -I/home/voy/workspace/ketchuporo/.buildozer/venv/include -I/usr/include/tcl8.6 -I/usr/local/include -I/usr/include -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu -c _imaging.c -o build/temp.linux-x86_64-2.7/_imaging.o
/bin/false -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_LIBJPEG -DHAVE_LIBZ -DHAVE_LIBTIFF -I/usr/include/freetype2 -I/home/voy/workspace/ketchuporo/.buildozer/venv/build/pillow/libImaging -I/home/voy/workspace/ketchuporo/.buildozer/venv/include -I/usr/include/tcl8.6 -I/usr/local/include -I/usr/include -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu -c libImaging/Crop.c -o build/temp.linux-x86_64-2.7/libImaging/Crop.o
/bin/false -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_LIBJPEG -DHAVE_LIBZ -DHAVE_LIBTIFF -I/usr/include/freetype2 -I/home/voy/workspace/ketchuporo/.buildozer/venv/build/pillow/libImaging -I/home/voy/workspace/ketchuporo/.buildozer/venv/include -I/usr/include/tcl8.6 -I/usr/local/include -I/usr/include -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu -c libImaging/Geometry.c -o build/temp.linux-x86_64-2.7/libImaging/Geometry.o
/bin/false -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_LIBJPEG -DHAVE_LIBZ -DHAVE_LIBTIFF -I/usr/include/freetype2 -I/home/voy/workspace/ketchuporo/.buildozer/venv/build/pillow/libImaging -I/home/voy/workspace/ketchuporo/.buildozer/venv/include -I/usr/include/tcl8.6 -I/usr/local/include -I/usr/include -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu -c libImaging/Matrix.c -o build/temp.linux-x86_64-2.7/libImaging/Matrix.o
/bin/false -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_LIBJPEG -DHAVE_LIBZ -DHAVE_LIBTIFF -I/usr/include/freetype2 -I/home/voy/workspace/ketchuporo/.buildozer/venv/build/pillow/libImaging -I/home/voy/workspace/ketchuporo/.buildozer/venv/include -I/usr/include/tcl8.6 -I/usr/local/include -I/usr/include -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu -c libImaging/Quant.c -o build/temp.linux-x86_64-2.7/libImaging/Quant.o
/bin/false -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_LIBJPEG -DHAVE_LIBZ -DHAVE_LIBTIFF -I/usr/include/freetype2 -I/home/voy/workspace/ketchuporo/.buildozer/venv/build/pillow/libImaging -I/home/voy/workspace/ketchuporo/.buildozer/venv/include -I/usr/include/tcl8.6 -I/usr/local/include -I/usr/include -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu -c libImaging/RawDecode.c -o build/temp.linux-x86_64-2.7/libImaging/RawDecode.o
/bin/false -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_LIBJPEG -DHAVE_LIBZ -DHAVE_LIBTIFF -I/usr/include/freetype2 -I/home/voy/workspace/ketchuporo/.buildozer/venv/build/pillow/libImaging -I/home/voy/workspace/ketchuporo/.buildozer/venv/include -I/usr/include/tcl8.6 -I/usr/local/include -I/usr/include -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu -c libImaging/XbmEncode.c -o build/temp.linux-x86_64-2.7/libImaging/XbmEncode.o
Building using 2 processes
x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/_imaging.o build/temp.linux-x86_64-2.7/decode.o build/temp.linux-x86_64-2.7/encode.o build/temp.linux-x86_64-2.7/map.o build/temp.linux-x86_64-2.7/display.o build/temp.linux-x86_64-2.7/outline.o build/temp.linux-x86_64-2.7/path.o build/temp.linux-x86_64-2.7/libImaging/Access.o build/temp.linux-x86_64-2.7/libImaging/AlphaComposite.o build/temp.linux-x86_64-2.7/libImaging/Resample.o build/temp.linux-x86_64-2.7/libImaging/Bands.o build/temp.linux-x86_64-2.7/libImaging/BitDecode.o build/temp.linux-x86_64-2.7/libImaging/Blend.o build/temp.linux-x86_64-2.7/libImaging/Chops.o build/temp.linux-x86_64-2.7/libImaging/Convert.o build/temp.linux-x86_64-2.7/libImaging/ConvertYCbCr.o build/temp.linux-x86_64-2.7/libImaging/Copy.o build/temp.linux-x86_64-2.7/libImaging/Crc32.o build/temp.linux-x86_64-2.7/libImaging/Crop.o build/temp.linux-x86_64-2.7/libImaging/Dib.o build/temp.linux-x86_64-2.7/libImaging/Draw.o build/temp.linux-x86_64-2.7/libImaging/Effects.o build/temp.linux-x86_64-2.7/libImaging/EpsEncode.o build/temp.linux-x86_64-2.7/libImaging/File.o build/temp.linux-x86_64-2.7/libImaging/Fill.o build/temp.linux-x86_64-2.7/libImaging/Filter.o build/temp.linux-x86_64-2.7/libImaging/FliDecode.o build/temp.linux-x86_64-2.7/libImaging/Geometry.o build/temp.linux-x86_64-2.7/libImaging/GetBBox.o build/temp.linux-x86_64-2.7/libImaging/GifDecode.o build/temp.linux-x86_64-2.7/libImaging/GifEncode.o build/temp.linux-x86_64-2.7/libImaging/HexDecode.o build/temp.linux-x86_64-2.7/libImaging/Histo.o build/temp.linux-x86_64-2.7/libImaging/JpegDecode.o build/temp.linux-x86_64-2.7/libImaging/JpegEncode.o build/temp.linux-x86_64-2.7/libImaging/LzwDecode.o build/temp.linux-x86_64-2.7/libImaging/Matrix.o build/temp.linux-x86_64-2.7/libImaging/ModeFilter.o build/temp.linux-x86_64-2.7/libImaging/MspDecode.o build/temp.linux-x86_64-2.7/libImaging/Negative.o build/temp.linux-x86_64-2.7/libImaging/Offset.o build/temp.linux-x86_64-2.7/libImaging/Pack.o build/temp.linux-x86_64-2.7/libImaging/PackDecode.o build/temp.linux-x86_64-2.7/libImaging/Palette.o build/temp.linux-x86_64-2.7/libImaging/Paste.o build/temp.linux-x86_64-2.7/libImaging/Quant.o build/temp.linux-x86_64-2.7/libImaging/QuantOctree.o build/temp.linux-x86_64-2.7/libImaging/QuantHash.o build/temp.linux-x86_64-2.7/libImaging/QuantHeap.o build/temp.linux-x86_64-2.7/libImaging/PcdDecode.o build/temp.linux-x86_64-2.7/libImaging/PcxDecode.o build/temp.linux-x86_64-2.7/libImaging/PcxEncode.o build/temp.linux-x86_64-2.7/libImaging/Point.o build/temp.linux-x86_64-2.7/libImaging/RankFilter.o build/temp.linux-x86_64-2.7/libImaging/RawDecode.o build/temp.linux-x86_64-2.7/libImaging/RawEncode.o build/temp.linux-x86_64-2.7/libImaging/Storage.o build/temp.linux-x86_64-2.7/libImaging/SunRleDecode.o build/temp.linux-x86_64-2.7/libImaging/TgaRleDecode.o build/temp.linux-x86_64-2.7/libImaging/Unpack.o build/temp.linux-x86_64-2.7/libImaging/UnpackYCC.o build/temp.linux-x86_64-2.7/libImaging/UnsharpMask.o build/temp.linux-x86_64-2.7/libImaging/XbmDecode.o build/temp.linux-x86_64-2.7/libImaging/XbmEncode.o build/temp.linux-x86_64-2.7/libImaging/ZipDecode.o build/temp.linux-x86_64-2.7/libImaging/ZipEncode.o build/temp.linux-x86_64-2.7/libImaging/TiffDecode.o build/temp.linux-x86_64-2.7/libImaging/Incremental.o build/temp.linux-x86_64-2.7/libImaging/Jpeg2KDecode.o build/temp.linux-x86_64-2.7/libImaging/Jpeg2KEncode.o build/temp.linux-x86_64-2.7/libImaging/BoxBlur.o -L/home/voy/workspace/ketchuporo/.buildozer/venv/lib -L/usr/lib/x86_64-linux-gnu -L/usr/local/lib -L/usr/lib/x86_64-linux-gnu -ljpeg -lz -ltiff -o build/lib.linux-x86_64-2.7/PIL/_imaging.so
x86_64-linux-gnu-gcc: error: build/temp.linux-x86_64-2.7/_imaging.o: No such file or directory
x86_64-linux-gnu-gcc: error: build/temp.linux-x86_64-2.7/decode.o: No such file or directory
x86_64-linux-gnu-gcc: error: build/temp.linux-x86_64-2.7/encode.o: No such file or directory
x86_64-linux-gnu-gcc: error: build/temp.linux-x86_64-2.7/map.o: No such file or directory
x86_64-linux-gnu-gcc: error: build/temp.linux-x86_64-2.7/display.o: No such file or directory
x86_64-linux-gnu-gcc: error: build/temp.linux-x86_64-2.7/outline.o: No such file or directory
x86_64-linux-gnu-gcc: error: build/temp.linux-x86_64-2.7/path.o: No such file or directory
x86_64-linux-gnu-gcc: error: build/temp.linux-x86_64-2.7/libImaging/Access.o: No such file or directory
x86_64-linux-gnu-gcc: error: build/temp.linux-x86_64-2.7/libImaging/AlphaComposite.o: No such file or directory
(...)
x86_64-linux-gnu-gcc: error: build/temp.linux-x86_64-2.7/libImaging/Jpeg2KDecode.o: No such file or directory
x86_64-linux-gnu-gcc: error: build/temp.linux-x86_64-2.7/libImaging/Jpeg2KEncode.o: No such file or directory
x86_64-linux-gnu-gcc: error: build/temp.linux-x86_64-2.7/libImaging/BoxBlur.o: No such file or directory
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Cleaning up...
Command /home/voy/workspace/ketchuporo/.buildozer/venv/bin/python2.7 -c "import setuptools, tokenize;__file__='/home/voy/workspace/ketchuporo/.buildozer/venv/build/pillow/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-Ryb9en-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/voy/workspace/ketchuporo/.buildozer/venv/include/site/python2.7 --home=/tmp/tmpv9BKPZ failed with error code 1 in /home/voy/workspace/ketchuporo/.buildozer/venv/build/pillow
Storing debug log for failure in /home/voy/.pip/pip.log
[0m[1;31m# Command failed: pip install --download-cache=/home/voy/.buildozer/cache --target=/home/voy/workspace/ketchuporo/.buildozer/applibs pillow[0m
[0m[1;31m# [0m
[0m[1;31m# Buildozer failed to execute the last command[0m
[0m[1;31m# The error might be hidden in the log above this error[0m
[0m[1;31m# Please read the full log, and search for it before[0m
[0m[1;31m# raising an issue with buildozer itself.[0m
[0m[1;31m# In case of a bug report, please add a full log with log_level = 2[0m
in virtualenv Pillow was installed without trouble
How to build this app? ;_;
It looks like python-for-android only has a recipe for PIL right now, you'd need to replace pillow with pil in your requirements. With what you have now, it has no special compilation recipe and so cannot automatically package pillow for android because of its compiled components.
It probably wouldn't be hard to write a pillow recipe, since it would presumably be very similar to the pil one.

Demystifying this command line build sequence

So far I've been sticking to the following procedure:
- call qmake on the project
- call make
But looking at the commands Qt Creator issues for a particular project (QML plugin) I detect another procedure:
To summarize before posting the full code, for a project with 2 headers and 2 cpp files I get 2 calls to g++, followed by a call to moc, another g++, another moc and finally 2 more calls to g++, in total 7 calls, 5 to g++ and 2 to moc.
Could perhaps someone be kind enough as to explain to me why are so many calls needed and what does each one do in particular? Naturally, I do have some ideas, I see two calls to the moc and two user classes, but I still don't understand the reason for all the calls and the reason for their particular ordering.
Here is the full code (formatted to make it more readable):
arm-linux-androideabi-g++
-c
-Wno-psabi
-march=armv7-a
-mfloat-abi=softfp
-mfpu=vfp
-ffunction-sections
-funwind-tables
-fstack-protector
-fno-short-enums
-DANDROID
-Wa,--noexecstack
-std=gnu++0x
-O2
-mthumb
-Os
-fomit-frame-pointer
-fno-strict-aliasing
-finline-limit=64
-D_REENTRANT
-Wall
-Wno-psabi
-W
-fPIC
-DQT_NO_DEBUG
-DQT_PLUGIN
-DQT_QUICK_LIB
-DQT_QML_LIB
-DQT_NETWORK_LIB
-DQT_GUI_LIB
-DQT_CORE_LIB
-IC:\Qt\Qt5.2.1_Android\5.2.1\android_armv7\mkspecs\android-g++
-I..\plugin
-IC:\Qt\Qt5.2.1_Android\5.2.1\android_armv7\include
-IC:\Qt\Qt5.2.1_Android\5.2.1\android_armv7\include\QtQuick
-IC:\Qt\Qt5.2.1_Android\5.2.1\android_armv7\include\QtQml
-IC:\Qt\Qt5.2.1_Android\5.2.1\android_armv7\include\QtNetwork
-IC:\Qt\Qt5.2.1_Android\5.2.1\android_armv7\include\QtGui
-IC:\Qt\Qt5.2.1_Android\5.2.1\android_armv7\include\QtCore
-I.
-I..\..\..\Android\android-ndk-r9d\sources\cxx-stl\gnu-libstdc++\4.8\include
-I..\..\..\Android\android-ndk-r9d\sources\cxx-stl\gnu-libstdc++\4.8\libs\armeabi-v7a\include
-I..\..\..\Android\android-ndk-r9d\platforms\android-19\arch-arm\usr\include
-I.
-o plugin_plugin.obj ..\plugin\plugin_plugin.cpp
______________________________________________
arm-linux-androideabi-g++
-c
-Wno-psabi
-march=armv7-a
-mfloat-abi=softfp
-mfpu=vfp
-ffunction-sections
-funwind-tables
-fstack-protector
-fno-short-enums
-DANDROID
-Wa,--noexecstack
-std=gnu++0x
-O2
-mthumb
-Os
-fomit-frame-pointer
-fno-strict-aliasing
-finline-limit=64
-D_REENTRANT
-Wall
-Wno-psabi
-W
-fPIC
-DQT_NO_DEBUG
-DQT_PLUGIN
-DQT_QUICK_LIB
-DQT_QML_LIB
-DQT_NETWORK_LIB
-DQT_GUI_LIB
-DQT_CORE_LIB
-IC:\Qt\Qt5.2.1_Android\5.2.1\android_armv7\mkspecs\android-g++
-I..\plugin
-IC:\Qt\Qt5.2.1_Android\5.2.1\android_armv7\include
-IC:\Qt\Qt5.2.1_Android\5.2.1\android_armv7\include\QtQuick
-IC:\Qt\Qt5.2.1_Android\5.2.1\android_armv7\include\QtQml
-IC:\Qt\Qt5.2.1_Android\5.2.1\android_armv7\include\QtNetwork
-IC:\Qt\Qt5.2.1_Android\5.2.1\android_armv7\include\QtGui
-IC:\Qt\Qt5.2.1_Android\5.2.1\android_armv7\include\QtCore
-I.
-I..\..\..\Android\android-ndk-r9d\sources\cxx-stl\gnu-libstdc++\4.8\include
-I..\..\..\Android\android-ndk-r9d\sources\cxx-stl\gnu-libstdc++\4.8\libs\armeabi-v7a\include
-I..\..\..\Android\android-ndk-r9d\platforms\android-19\arch-arm\usr\include
-I.
-o myitem.obj
..\plugin\myitem.cpp
______________________________________________
moc.exe
-DQT_NO_DEBUG
-DQT_PLUGIN
-DQT_QUICK_LIB
-DQT_QML_LIB
-DQT_NETWORK_LIB
-DQT_GUI_LIB
-DQT_CORE_LIB
-IC:\Qt\Qt5.2.1_Android\5.2.1\android_armv7\mkspecs\android-g++
-I..\plugin -IC:\Qt\Qt5.2.1_Android\5.2.1\android_armv7\include
-IC:\Qt\Qt5.2.1_Android\5.2.1\android_armv7\include\QtQuick
-IC:\Qt\Qt5.2.1_Android\5.2.1\android_armv7\include\QtQml
-IC:\Qt\Qt5.2.1_Android\5.2.1\android_armv7\include\QtNetwork
-IC:\Qt\Qt5.2.1_Android\5.2.1\android_armv7\include\QtGui
-IC:\Qt\Qt5.2.1_Android\5.2.1\android_armv7\include\QtCore
-I.
-I..\..\..\Android\android-ndk-r9d\sources\cxx-stl\gnu-libstdc++\4.8\include
-I..\..\..\Android\android-ndk-r9d\sources\cxx-stl\gnu-libstdc++\4.8\libs\armeabi-v7a\include
-I..\..\..\Android\android-ndk-r9d\platforms\android-19\arch-arm\usr\include
-I.
-I/usr/include -I/usr/local/include
..\plugin\plugin_plugin.h -o moc_plugin_plugin.cpp
______________________________________________
arm-linux-androideabi-g++
-c
-Wno-psabi
-march=armv7-a
-mfloat-abi=softfp
-mfpu=vfp
-ffunction-sections
-funwind-tables
-fstack-protector
-fno-short-enums
-DANDROID
-Wa,--noexecstack
-std=gnu++0x
-O2
-mthumb
-Os
-fomit-frame-pointer
-fno-strict-aliasing
-finline-limit=64
-D_REENTRANT
-Wall
-Wno-psabi
-W
-fPIC
-DQT_NO_DEBUG
-DQT_PLUGIN
-DQT_QUICK_LIB
-DQT_QML_LIB
-DQT_NETWORK_LIB
-DQT_GUI_LIB
-DQT_CORE_LIB
-IC:\Qt\Qt5.2.1_Android\5.2.1\android_armv7\mkspecs\android-g++
-I..\plugin
-IC:\Qt\Qt5.2.1_Android\5.2.1\android_armv7\include
-IC:\Qt\Qt5.2.1_Android\5.2.1\android_armv7\include\QtQuick
-IC:\Qt\Qt5.2.1_Android\5.2.1\android_armv7\include\QtQml
-IC:\Qt\Qt5.2.1_Android\5.2.1\android_armv7\include\QtNetwork
-IC:\Qt\Qt5.2.1_Android\5.2.1\android_armv7\include\QtGui
-IC:\Qt\Qt5.2.1_Android\5.2.1\android_armv7\include\QtCore
-I.
-I..\..\..\Android\android-ndk-r9d\sources\cxx-stl\gnu-libstdc++\4.8\include
-I..\..\..\Android\android-ndk-r9d\sources\cxx-stl\gnu-libstdc++\4.8\libs\armeabi-v7a\include
-I..\..\..\Android\android-ndk-r9d\platforms\android-19\arch-arm\usr\include
-I.
-o moc_plugin_plugin.obj
moc_plugin_plugin.cpp
______________________________________________
moc.exe
-DQT_NO_DEBUG
-DQT_PLUGIN
-DQT_QUICK_LIB
-DQT_QML_LIB
-DQT_NETWORK_LIB
-DQT_GUI_LIB
-DQT_CORE_LIB
-IC:\Qt\Qt5.2.1_Android\5.2.1\android_armv7\mkspecs\android-g++
-I..\plugin -IC:\Qt\Qt5.2.1_Android\5.2.1\android_armv7\include
-IC:\Qt\Qt5.2.1_Android\5.2.1\android_armv7\include\QtQuick
-IC:\Qt\Qt5.2.1_Android\5.2.1\android_armv7\include\QtQml
-IC:\Qt\Qt5.2.1_Android\5.2.1\android_armv7\include\QtNetwork
-IC:\Qt\Qt5.2.1_Android\5.2.1\android_armv7\include\QtGui
-IC:\Qt\Qt5.2.1_Android\5.2.1\android_armv7\include\QtCore
-I.
-I..\..\..\Android\android-ndk-r9d\sources\cxx-stl\gnu-libstdc++\4.8\include
-I..\..\..\Android\android-ndk-r9d\sources\cxx-stl\gnu-libstdc++\4.8\libs\armeabi-v7a\include
-I..\..\..\Android\android-ndk-r9d\platforms\android-19\arch-arm\usr\include
-I. -I/usr/include -I/usr/local/include ..\plugin\myitem.h -o moc_myitem.cpp
______________________________________________
arm-linux-androideabi-g++
-c
-Wno-psabi
-march=armv7-a
-mfloat-abi=softfp
-mfpu=vfp
-ffunction-sections
-funwind-tables
-fstack-protector
-fno-short-enums
-DANDROID
-Wa,--noexecstack
-std=gnu++0x
-O2
-mthumb
-Os
-fomit-frame-pointer
-fno-strict-aliasing
-finline-limit=64
-D_REENTRANT
-Wall
-Wno-psabi
-W
-fPIC
-DQT_NO_DEBUG
-DQT_PLUGIN
-DQT_QUICK_LIB
-DQT_QML_LIB
-DQT_NETWORK_LIB
-DQT_GUI_LIB
-DQT_CORE_LIB
-IC:\Qt\Qt5.2.1_Android\5.2.1\android_armv7\mkspecs\android-g++
-I..\plugin -IC:\Qt\Qt5.2.1_Android\5.2.1\android_armv7\include
-IC:\Qt\Qt5.2.1_Android\5.2.1\android_armv7\include\QtQuick
-IC:\Qt\Qt5.2.1_Android\5.2.1\android_armv7\include\QtQml
-IC:\Qt\Qt5.2.1_Android\5.2.1\android_armv7\include\QtNetwork
-IC:\Qt\Qt5.2.1_Android\5.2.1\android_armv7\include\QtGui
-IC:\Qt\Qt5.2.1_Android\5.2.1\android_armv7\include\QtCore
-I.
-I..\..\..\Android\android-ndk-r9d\sources\cxx-stl\gnu-libstdc++\4.8\include
-I..\..\..\Android\android-ndk-r9d\sources\cxx-stl\gnu-libstdc++\4.8\libs\armeabi-v7a\include
-I..\..\..\Android\android-ndk-r9d\platforms\android-19\arch-arm\usr\include
-I. -o moc_myitem.obj
moc_myitem.cpp
del libplugin.so
______________________________________________
arm-linux-androideabi-g++
--sysroot=D:\Android\android-ndk-r9d/platforms/android-19/arch-arm/
-Wl,--no-undefined
-Wl,-z,noexecstack
-shared
-o
libplugin.so
plugin_plugin.obj
myitem.obj
moc_plugin_plugin.obj
moc_myitem.obj
-LD:\Android\android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a
-LD:\Android\android-ndk-r9d/platforms/android-19/arch-arm//usr/lib
-LC:\Qt\Qt5.2.1_Android\5.2.1\android_armv7\lib -lQt5Quick
-Lc:\Utils\android\ndk/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a
-Lc:\Utils\android\ndk/platforms/android-9/arch-arm//usr/lib
-LC:\Utils\icu32_51_1_mingw48\lib -LC:\utils\postgresql\pgsql\lib
-LC:\utils\mysql\mysql\lib -LC:\Utils\pgsql\lib
-LC:\temp\opensll-android-master\openssl-android-master\lib
-LC:\Qt\Qt5.2.1_Android\5.2.1\android_armv7/lib
-lQt5Qml
-lQt5Network
-lQt5Gui
-lQt5Core
-lGLESv2
-lgnustl_shared
-llog
-lz
-lm
-ldl
-lc
-lgcc
In short, you have three different processes running for various inputs and outputs. These namely are:
compiler to compile source code into object files.
meta object compiler to generate source code.
linker to link all the object files together into a binary, in this case shared librarry.
Step 1
The first created an object file out of your plugin source code using g++.
arm-linux-androideabi-g++ ... -o plugin_plugin.obj ..\plugin\plugin_plugin.cpp
Step 2
The second created an object file out of your myitem.cpp source code using g++.
arm-linux-androideabi-g++ ... -o myitem.obj ..\plugin\myitem.cpp
Step 3
The third generated the necessary moc file for your plugin using moc.
moc.exe ... ..\plugin\plugin_plugin.h -o moc_plugin_plugin.cpp
Step 4
The fourth created the object for the previously generated moc source code using g++.
arm-linux-androideabi-g++ ... -o moc_plugin_plugin.obj moc_plugin_plugin.cpp
Step 5
The fifth generated the moc source code for your myitem.cpp source code using moc.exe.
arm-linux-androideabi-g++ ... ..\plugin\myitem.h -o moc_myitem.cpp
Step 6
The sixth created the object file for the previouly created moc file using g++.
arm-linux-androideabi-g++ ... -o moc_myitem.obj moc_myitem.cpp
Step 7
The seventh and last step linked the created object file in the previous steps together using g++ for linking:
arm-linux-androideabi-g++ ... -shared -o libplugin.so plugin_plugin.obj myitem.obj
moc_plugin_plugin.obj moc_myitem.obj
These are all different steps working on different input and output files and then the file linkage happens for all of them. That is the reason why you got those commands run.

Android NDK, Navit

I am building navit with standalone tools from NDK r7.
./configure is able to pass the compiler test.
However when I run make, I get the following error w.r.t headers.
It is looking for machine/internal_types.h which is not available either with NDK C headers or standard gcc headers. Is this due to incorrect compiler options?
Error Log below.
make[2]: Entering directory `/home/sateesh/navit/navit/fib-1.1'
/bin/bash ../../libtool --tag=CC --mode=compile
i686-android-linux-gcc -nostdlib -march=i686 -mstackrealign
-L/opt/ndk_x86_r7/lib -L. -I/opt/ndk_x86_r7/usr/include -DHAVE_CONFIG_H -I. -I../.. -g -O2 -Wall -Wcast-align -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith -Wreturn-type -D_GNU_SOURCE -ffast-math -I../../intl/ -MT fib.lo -MD -MP -MF .deps/fib.Tpo -c -o fib.lo fib.c
libtool: compile: i686-android-linux-gcc -nostdlib -march=i686
-mstackrealign -L/opt/ndk_x86_r7/lib -L. -I/opt/ndk_x86_r7/usr/include -DHAVE_CONFIG_H -I. -I../.. -g -O2 -Wall -Wcast-align -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith -Wreturn-type -D_GNU_SOURCE -ffast-math -I../../intl/ -MT fib.lo -MD -MP -MF .deps/fib.Tpo -c fib.c -fPIC -DPIC -o .libs/fib.o
In file included from
/opt/ndk_x86_r7/bin/../sysroot/usr/include/limits.h:86,
from /opt/ndk_x86_r7/bin/../lib/gcc/i686-android-linux/4.4.3/include-fixed/limits.h:122,
from /opt/ndk_x86_r7/bin/../lib/gcc/i686-android-linux/4.4.3/include-fixed/syslimits.h:7,
from /opt/ndk_x86_r7/bin/../lib/gcc/i686-android-linux/4.4.3/include-fixed/limits.h:11,
from fib.c:33:
/opt/ndk_x86_r7/bin/../sysroot/usr/include/sys/limits.h:44:36: error:
machine/internal_types.h: No such file or directory
/opt/ndk_x86_r7/bin/../sysroot/usr/include/sys/limits.h:47:28:
error: machine/limits.h: No such file or directory

Categories

Resources