Does Android clang 14 support ranges? - android

I tried to compile the following source file:
#include <ranges>
int main()
{
return 0;
}
with Android clang 14.0.6:
C:\Users\dmitr\AppData\Local\Android\Sdk\ndk\25.1.8937393\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe --target=x86_64-none-linux-android23 ^
--sysroot=C:/Users/dmitr/AppData/Local/Android/Sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/windows-x86_64/sysroot -DQT_CORE_LIB -DQT_GUI_LIB -DQT_MULTIMEDIA_LIB -DQT_NETWORK_LIB ^
-g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security ^
-fno-limit-debug-info -fPIC -fvisibility=default -fPIC -pthread -std=gnu++20 -MD -MT -c a.cpp
I get the following compiler error:
a.cpp:2:10: fatal error: 'ranges' file not found
are std::ranges supported by Android clang 14?
I thought that it probably supports because I found something about ranges here:

Related

Failed to build ics-openvpn in Windows 10

I am try to build ics-openvpn on Windows 10 by Android Studio 4.2.1. I have installed cmake, ndk and sdk and successfully run the first gradle build (Sync project with gradle files). Unfortunately, I am not able to build the main. Below are the logs. It seems it is trying to copy the missing files cmake\skeletonDebug\obj\armeabi-v7a\nopie_openvpn.armeabi-v7a.
And, it is also missing "asio.hpp". Where could I find these files?
> Android Version 11
> Version of the app 0.7.22
Error 1:
[1031/1039] Linking C executable C:\Users\project-user\Desktop\ics-openvpn-0.7.22\main\build\intermediates\cmake\skeletonDebug\obj\armeabi-v7a\pie_openvpn.armeabi-v7a
FAILED: C:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/build/intermediates/cmake/skeletonDebug/obj/armeabi-v7a/pie_openvpn.armeabi-v7a
cmd.exe /C "cd . && C:\Users\project-user\AppData\Local\Android\Sdk\ndk\21.4.7075529\toolchains\llvm\prebuilt\windows-x86_64\bin\clang.exe --target=armv7-none-linux-androideabi16 --gcc-toolchain=C:/Users/project-user/AppData/Local/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/windows-x86_64 --sysroot=C:/Users/project-user/AppData/Local/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/windows-x86_64/sysroot -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -march=armv7-a -mthumb -Wformat -Werror=format-security -O0 -fno-limit-debug-info -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libgcc_real.a -Wl,--exclude-libs,libatomic.a -static-libstdc++ -Wl,--build-id -Wl,--fatal-warnings -Wl,--exclude-libs,libunwind.a -Wl,--no-undefined -Qunused-arguments -Wl,--gc-sections CMakeFiles/pie_openvpn.armeabi-v7a.dir/minivpn/minivpn.c.o -o C:\Users\project-user\Desktop\ics-openvpn-0.7.22\main\build\intermediates\cmake\skeletonDebug\obj\armeabi-v7a\pie_openvpn.armeabi-v7a C:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/build/intermediates/cmake/skeletonDebug/obj/armeabi-v7a/libopenvpn.so -fPIE -pie libssl.a libcrypto.a liblzo.a -latomic -lm && cmd.exe /C "cd /D C:\Users\project-user\Desktop\ics-openvpn-0.7.22\main\.cxx\cmake\skeletonDebug\armeabi-v7a && C:\Users\project-user\AppData\Local\Android\Sdk\cmake\3.10.2.4988404\bin\cmake.exe -E copy C:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/.cxx/cmake/skeletonDebug/armeabi-v7a/pie_openvpn.armeabi-v7a C:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/src/main/cpp/../../../build/ovpnassets""
Error copying file "C:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/.cxx/cmake/skeletonDebug/armeabi-v7a/pie_openvpn.armeabi-v7a" to "C:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/src/main/cpp/../../../build/ovpnassets".
[1032/1039] Linking C executable C:\Users\project-user\Desktop\ics-openvpn-0.7.22\main\build\intermediates\cmake\skeletonDebug\obj\armeabi-v7a\nopie_openvpn.armeabi-v7a
FAILED: C:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/build/intermediates/cmake/skeletonDebug/obj/armeabi-v7a/nopie_openvpn.armeabi-v7a
cmd.exe /C "cd . && C:\Users\project-user\AppData\Local\Android\Sdk\ndk\21.4.7075529\toolchains\llvm\prebuilt\windows-x86_64\bin\clang.exe --target=armv7-none-linux-androideabi16 --gcc-toolchain=C:/Users/project-user/AppData/Local/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/windows-x86_64 --sysroot=C:/Users/project-user/AppData/Local/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/windows-x86_64/sysroot -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -march=armv7-a -mthumb -Wformat -Werror=format-security -O0 -fno-limit-debug-info -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libgcc_real.a -Wl,--exclude-libs,libatomic.a -static-libstdc++ -Wl,--build-id -Wl,--fatal-warnings -Wl,--exclude-libs,libunwind.a -Wl,--no-undefined -Qunused-arguments -Wl,--gc-sections CMakeFiles/nopie_openvpn.armeabi-v7a.dir/minivpn/minivpn.c.o -o C:\Users\project-user\Desktop\ics-openvpn-0.7.22\main\build\intermediates\cmake\skeletonDebug\obj\armeabi-v7a\nopie_openvpn.armeabi-v7a C:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/build/intermediates/cmake/skeletonDebug/obj/armeabi-v7a/libopenvpn.so libssl.a libcrypto.a liblzo.a -latomic -lm && cmd.exe /C "cd /D C:\Users\project-user\Desktop\ics-openvpn-0.7.22\main\.cxx\cmake\skeletonDebug\armeabi-v7a && C:\Users\project-user\AppData\Local\Android\Sdk\cmake\3.10.2.4988404\bin\cmake.exe -E copy C:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/.cxx/cmake/skeletonDebug/armeabi-v7a/nopie_openvpn.armeabi-v7a C:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/src/main/cpp/../../../build/ovpnassets""
Error copying file "C:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/.cxx/cmake/skeletonDebug/armeabi-v7a/nopie_openvpn.armeabi-v7a" to "C:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/src/main/cpp/../../../build/ovpnassets".
[1033/1039] Generating ovpncli_wrap.cxx
ninja: build stopped: subcommand failed.
Error 2:
[1038/1039] Building CXX object CMakeFiles/ovpn3.dir/openvpn3/client/ovpncli.cpp.o
FAILED: CMakeFiles/ovpn3.dir/openvpn3/client/ovpncli.cpp.o
C:\Users\project-user\AppData\Local\Android\Sdk\ndk\21.4.7075529\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe --target=armv7-none-linux-androideabi16 --gcc-toolchain=C:/Users/project-user/AppData/Local/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/windows-x86_64 --sysroot=C:/Users/project-user/AppData/Local/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/windows-x86_64/sysroot -DASIO_STANDALONE -DGIT_VERSION_STRING=\"GIT-NOTFOUND\" -DHAVE_CONFIG_H -DHAVE_LZ4 -DHAVE_LZO -DNO_ROUTE_EXCLUDE_EMULATION -DOPENSSL_API_COMPAT=0x10200000L -DOPENVPN_SHOW_SESSION_TOKEN -DUSE_ASIO -DUSE_OPENSSL -Dovpn3_EXPORTS -IC:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/src/main/cpp/lzo/include -IC:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/src/main/cpp/openvpn3 -IC:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/src/main/cpp/asio/asio/include -IC:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/src/main/cpp/openvpn3/client -IC:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/src/main/cpp/mbedtls/include -IC:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/src/main/cpp/crypto/include -IC:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/src/main/cpp/openssl/include -IC:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/src/main/cpp/openssl/crypto/include -IC:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/src/main/cpp/openssl -IC:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/src/main/cpp/openssl/crypto -IC:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/src/main/cpp/openssl/crypto/ec/curve448/arch_32 -IC:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/src/main/cpp/openssl/crypto/ec/curve448 -IC:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/src/main/cpp/openssl/providers/common/include -IC:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/src/main/cpp/openssl/providers/implementations/include -IC:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/src/main/cpp/lz4/lib -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -march=armv7-a -mthumb -Wformat -Werror=format-security -O0 -fno-limit-debug-info -fPIC -std=c++1y -MD -MT CMakeFiles/ovpn3.dir/openvpn3/client/ovpncli.cpp.o -MF CMakeFiles\ovpn3.dir\openvpn3\client\ovpncli.cpp.o.d -o CMakeFiles/ovpn3.dir/openvpn3/client/ovpncli.cpp.o -c C:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/src/main/cpp/openvpn3/client/ovpncli.cpp
In file included from C:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/src/main/cpp/openvpn3/client/ovpncli.cpp:30:
C:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/src/main/cpp/openvpn3\openvpn/io/io.hpp:28:10: fatal error: 'asio.hpp' file not found
#include <asio.hpp>
^~~~~~~~~~
1 error generated.
ninja: build stopped: subcommand failed.
Did you run git submodule update --init after cloning the repository?

How to generate clang compiler flag using CMake generator-expression for android build

I am trying to use the clang PrecompiledHeader for CMake found here:
https://gist.github.com/leeor/316168500765cf51ae97
which is a pull request from here:
https://github.com/larsch/cmake-precompiled-header
While doing so, I run into an error on line 22 of the export_all_flags function:
CMake Error at cmake/Modules/android/PrecompiledHeader.cmake:22 (file):
Error evaluating generator expression:
$<BOOL:-isystem /Users/XXXXX/Library/Android/sdk/ndk-bundle/sysroot/usr/include/arm-linux-androideabi -D__ANDROID_API__=24 -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -fno-integrated-as -mthumb -Wa,--noexecstack -Wformat -Werror=format-security -std=c++11 -frtti -fexceptions -std=c++14 -pthread -DUSE_FILE32API=1 -DCC_ENABLE_CHIPMUNK_INTEGRATION=0 -DCC_ENABLE_SCRIPT_BINDING=0 -DCC_USE_PHYSICS=0 -DCC_LUA_ENGINE_DEBUG=0 -DCC_USE_3D_PHYSICS=0 -DCC_ENABLE_BULLET_INTEGRATION=0 -DCC_USE_NAVMESH=0 -DCC_USE_TIFF=0 -DCC_USE_WEBP=0 -DRAPIDJSON_HAS_STDSTRING=1 -std=c++11 -Wno-deprecated-declarations -Wno-reorder -Wno-invalid-offsetof -fPIC -stdlib=libc++ -fsigned-char -latomic>
$<BOOL> expression requires exactly one parameter.
What would be the proper use of CMake generator-expression to generate the right list of compiler options to be passed afterwards to clang compiler?
NOTE:
If I replace the
set(_cmake_cxx_flags "$<$<BOOL:${CMAKE_CXX_FLAGS}>:$<JOIN:${CMAKE_CXX_FLAGS},\n>\n>")
with
set(_cmake_cxx_flags "$<$<JOIN:${CMAKE_CXX_FLAGS},\n>\n>")
I get a different error:
Error evaluating generator expression:
$<$<JOIN:-isystem /Users/XXXXX/Library/Android/sdk/ndk-bundle/sysroot/usr/include/arm-linux-androideabi -D__ANDROID_API__=24 -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -fno-integrated-as -mthumb -Wa,--noexecstack -Wformat -Werror=format-security -std=c++11 -frtti -fexceptions -std=c++14 -pthread -DUSE_FILE32API=1 -DCC_ENABLE_CHIPMUNK_INTEGRATION=0 -DCC_ENABLE_SCRIPT_BINDING=0 -DCC_USE_PHYSICS=0 -DCC_LUA_ENGINE_DEBUG=0 -DCC_USE_3D_PHYSICS=0 -DCC_ENABLE_BULLET_INTEGRATION=0 -DCC_USE_NAVMESH=0 -DCC_USE_TIFF=0 -DCC_USE_WEBP=0 -DRAPIDJSON_HAS_STDSTRING=1 -std=c++11 -Wno-deprecated-declarations -Wno-reorder -Wno-invalid-offsetof -fPIC -stdlib=libc++ -fsigned-char -latomic,
>
>
Expression did not evaluate to a known generator expression
Thanks to tsyvarev comment, I was able to solve the error by using
string(REPLACE " " "\n" _cmake_cxx_flags ${CMAKE_CXX_FLAGS})
I still have issues because clang++ is complaining about a -o option being used while trying to output several files, but at least the compiler options are working.

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!

cpu-features.h no such file or directory webrtc Android build

i am building webrtc for Android & i had followed following steps for generating webrtc library:
source build/android/envsetup.sh
python webrtc/build/gyp_webrtc
ninja -c out/Debug
this generates following error:
ninja: build stopped: subcommand failed. ninja: Entering directory
`./out/Release/' [3/2806] CC
obj/webrtc/system_wrappers/source/cpu_features_android.cpu_features_android.o
FAILED:
/home/rtcdev/Nishant/src/third_party/android_tools/ndk//toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc
-MMD -MF obj/webrtc/system_wrappers/source/cpu_features_android.cpu_features_android.o.d
-DV8_DEPRECATION_WARNINGS -DCLD_VERSION=1 -D_FILE_OFFSET_BITS=64 -DNO_TCMALLOC -DDISABLE_NACL
-DCHROMIUM_BUILD -DCR_CLANG_REVISION=233105-2 -DUSE_LIBJPEG_TURBO=1 -DENABLE_WEBRTC=1 -DENABLE_MEDIA_ROUTER=1
-DUSE_PROPRIETARY_CODECS -DENABLE_BROWSER_CDMS -DENABLE_CONFIGURATION_POLICY -DENABLE_NOTIFICATIONS
-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE -DDONT_EMBED_BUILD_METADATA -DFIELDTRIAL_TESTING_ENABLED
-DENABLE_AUTOFILL_DIALOG=1 -DENABLE_PRINTING=1 -DENABLE_BASIC_PRINTING=1 -DENABLE_SPELLCHECK=1
-DUSE_BROWSER_SPELLCHECKER=1 -DENABLE_SUPERVISED_USERS=1 -DVIDEO_HOLE=1 -DV8_USE_EXTERNAL_STARTUP_DATA
-DENABLE_WEBVR -DMOBILE_SAFE_BROWSING -DSAFE_BROWSING_DB_REMOTE -DSAFE_BROWSING_SERVICE
-DEXPAT_RELATIVE_PATH -DWEBRTC_MODULE_UTILITY_VIDEO -DWEBRTC_ARCH_ARM -DWEBRTC_ARCH_ARM_V7
-DWEBRTC_DETECT_ARM_NEON -DWEBRTC_POSIX -DWEBRTC_LINUX -DWEBRTC_ANDROID -DWEBRTC_ANDROID_OPENSLES -DUSE_LIBPCI=1
-DUSE_OPENSSL=1 -DUSE_OPENSSL_CERTS=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DANDROID -D__GNU_SOURCE=1
'-DCHROME_BUILD_ID=""' -DHAVE_SYS_UIO_H -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0
-D_FORTIFY_SOURCE=2
-Igen -I../..
-fstack-protector --param=ssp-buffer-size=4 -Werror -fno-strict-aliasing
-Wall -Wno-unused-parameter -Wno-missing-field-initializers -fvisibility=hidden -pipe -fPIC -Wno-unused-local-typedefs
-Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-strict-overflow -fno-builtin-cos -fno-builtin-sin
-fno-builtin-cosf -fno-builtin-sinf -march=armv7-a -mtune=generic-armv7-a -mfpu=vfpv3-d16 -mfloat-abi=softfp
-mthumb -fno-tree-sra -fno-caller-saves -Wno-psabi -mthumb-interwork -ffunction-sections -funwind-tables
-g -fstack-protector -fno-short-enums -finline-limit=64
--sysroot=../../third_party/android_tools/ndk//platforms/android-16/arch-arm
-isystem../../third_party/android_tools/ndk//sources/cxx-stl/llvm-libc++/libcxx/include
-isystem../../third_party/android_tools/ndk//sources/cxx-stl/llvm-libc++abi/libcxxabi/include
-isystem../../third_party/android_tools/ndk//sources/android/support/include
-Os -fno-ident -fdata-sections -ffunction-sections -fomit-frame-pointer -funwind-tables
-c ../../webrtc/system_wrappers/source/cpu_features_android.c
-o obj/webrtc/system_wrappers/source/cpu_features_android.cpu_features_android.o
../../webrtc/system_wrappers/source/cpu_features_android.c:11:26:
fatal error: cpu-features.h: No such file or directory #include
^ compilation terminated.
Does Anyone have Any idea by seeing webrtc Flags, what i am missing for webrtc Android?
The compiler could not find the header file cpu-features.h, so find out which directory it resides, and then add that directory to the compiler flags, just like the other directory you already have.

Categories

Resources