I'm very new to building ROMs so I don't have the knowledge on how to debug build errors.
brunch device
including vendor/lineage/vendorsetup.sh
Looking for dependencies in device/samsung/device
Looking for dependencies in device/samsung/device-common
Looking for dependencies in kernel/samsung/msm8916
kernel/samsung/msm8916 has no additional dependencies.
Looking for dependencies in external/stlport
external/stlport has no additional dependencies.
Looking for dependencies in device/samsung/qcom-common
Looking for dependencies in hardware/samsung
Looking for dependencies in packages/resources/devicesettings
packages/resources/devicesettings has no additional dependencies.
Looking for dependencies in packages/resources/devicesettings
packages/resources/devicesettings has no additional dependencies.
Looking for dependencies in device/qcom/common
device/qcom/common has no additional dependencies.
Looking for dependencies in external/sony/boringssl-compat
external/sony/boringssl-compat has no additional dependencies.
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=8.1.0
LINEAGE_VERSION=15.1-20180821-UNOFFICIAL-device
TARGET_PRODUCT=lineage_device
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_PLATFORM_VERSION=OPM1
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=cortex-a53
TARGET_2ND_ARCH=
TARGET_2ND_ARCH_VARIANT=
TARGET_2ND_CPU_VARIANT=
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.15.0-29-generic-x86_64-with-Ubuntu-18.04-bionic
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=OPM6.171019.030.H1
OUT_DIR=/home/user/Lin15.1/out
AUX_OS_VARIANT_LIST=
============================================
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=8.1.0
TARGET_PRODUCT=lineage_device
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=cortex-a53
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.15.0-29-generic-x86_64-with-Ubuntu-18.04-bionic
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=OPM6.171019.030.H1
OUT_DIR=/home/user/Lin15.1/out
============================================
ninja: no work to do.
ninja: no work to do.
/home/user/Lin15.1/out/build-lineage_device.ninja is missing, regenerating...
/home/user/Lin15.1/out/soong/make_vars-lineage_device.mk:380: warning: TARGET_GLOBAL_CFLAGS does not match between Make and Soong:
/home/user/Lin15.1/out/soong/make_vars-lineage_device.mk:380: warning: Make : -mfpu=neon -mfloat-abi=softfp
/home/user/Lin15.1/out/soong/make_vars-lineage_device.mk:380: warning: Soong: -fno-exceptions -Wno-multichar -ffunction-sections -fdata-sections -funwind-tables -fstack-protector-strong -Wa,--noexecstack -Werror=format-security -D_FORTIFY_SOURCE=2 -fno-short-enums -no-canonical-prefixes -fno-canonical-system-headers -fno-builtin-sin -fno-strict-volatile-bitfields -DNDEBUG -g -Wstrict-aliasing=2 -fgcse-after-reload -frerun-cse-after-loop -frename-registers -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -DNDEBUG -UDEBUG -fdebug-prefix-map=/proc/self/cwd= -fdiagnostics-color -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Werror=date-time -mthumb-interwork -msoft-float -mfloat-abi=softfp -mfpu=neon -mcpu=cortex-a53 -mfpu=neon-fp-armv8 -D__ARM_FEATURE_LPAE=1
/home/user/Lin15.1/out/soong/make_vars-lineage_device.mk:386: warning: TARGET_GLOBAL_CPPFLAGS does not match between Make and Soong:
/home/user/Lin15.1/out/soong/make_vars-lineage_device.mk:386: warning: Make : -mfpu=neon -mfloat-abi=softfp
/home/user/Lin15.1/out/soong/make_vars-lineage_device.mk:386: warning: Soong: -Wsign-promo -fvisibility-inlines-hidden
/home/user/Lin15.1/out/soong/make_vars-lineage_device.mk:696: error: Soong variable check failed.
12:31:27 ckati failed with: exit status 1
#### failed to build some targets (2 seconds) ####
My device isn't officially supported, but there have been unofficial versions of it in the past for both lineage 14.1 and 15.1 and all the necessary sources are available on github.
In short my question is what's gone wrong this time in the build process and how should I resolve it?
Setting TARGET_GLOBAL_CFLAGS (or TARGET_GLOBAL_CPPFLAGS) is no longer supported - the build fails as a warning. Search through the device configuration where it is being set and remove the line.
See https://groups.google.com/forum/#!topic/android-building/mVUuVazMf8k for some discussion on it.
Related
Building CopperheadOS for Pixel 2XL (taimen) I arrive to this issue:
FAILED: out/host/linux-x86/obj/EXECUTABLES/mkbootfs_intermediates/mkbootfs.o
The complete log from terminal at executing make target-files-package -j10 is:
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=9
TARGET_PRODUCT=aosp_arm
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=generic
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.9.0-11-amd64-x86_64-Debian-GNU/Linux-9-(stretch)
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=PQ3A.190801.002
OUT_DIR=out
============================================
ninja: no work to do.
ninja: no work to do.
No need to regenerate ninja file
No need to regenerate ninja file
[ 0% 10/76652] host C: mkbootfs <= system/core/cpio/mkbootfs.c
FAILED: out/host/linux-x86/obj/EXECUTABLES/mkbootfs_intermediates/mkbootfs.o
/bin/bash -c "PWD=/proc/self/cwd prebuilts/clang/host/linux-x86/clang-copperhead/bin/clang -I system/core/cpio -I out/host/linux-x86/obj/EXECUTABLES/mkbootfs_intermediates -I out/host/linux-x86/gen/EXECUTABLES/mkbootfs_intermediates -I libnativehelper/include_jni \$(cat out/host/linux-x86/obj/EXECUTABLES/mkbootfs_intermediates/import_includes) -I system/core/include -I system/media/audio/include -I hardware/libhardware/include -I hardware/libhardware_legacy/include -I hardware/ril/include -I libnativehelper/include -I frameworks/native/include -I frameworks/native/opengl/include -I frameworks/av/include -c -Wa,--noexecstack -fPIC -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS --gcc-toolchain=prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8 --sysroot prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/sysroot -fstack-protector-strong -m64 -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -no-canonical-prefixes -DNDEBUG -UDEBUG -fno-exceptions -Wno-multichar -O2 -g -fno-strict-aliasing -fdebug-prefix-map=/proc/self/cwd= -D__compiler_offsetof=__builtin_offsetof -Werror=int-conversion -Wno-reserved-id-macro -Wno-format-pedantic -Wno-unused-command-line-argument -fcolor-diagnostics -Wno-expansion-to-defined -Wno-zero-as-null-pointer-constant -fdebug-prefix-map=\$PWD/= -target x86_64-linux-gnu -Bprebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/x86_64-linux/bin -std=gnu99 -Werror -fPIE -D_USING_LIBCXX -DANDROID_STRICT -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -Werror=address-of-temporary -Werror=return-type -Wno-tautological-constant-compare -Wno-null-pointer-arithmetic -Wno-enum-compare -Wno-enum-compare-switch -MD -MF out/host/linux-x86/obj/EXECUTABLES/mkbootfs_intermediates/mkbootfs.d -o out/host/linux-x86/obj/EXECUTABLES/mkbootfs_intermediates/mkbootfs.o system/core/cpio/mkbootfs.c"
prebuilts/clang/host/linux-x86/clang-copperhead/bin/clang.real: error while loading shared libraries: libtinfo.so.6: cannot open shared object file: No such file or directory
[ 0% 19/76652] Check module type: out/target/produc...ic/obj/SHARED_LIBRARIES/libm_intermediates/link_type
ninja: build stopped: subcommand failed.
18:41:30 ninja failed with: exit status 1
build/make/core/main.mk:21: recipe for target 'run_soong_ui' failed
make: *** [run_soong_ui] Error 1
It seems to me that something changed about the mkbootfs that is not updated in the make script, or maybe I made something wrong preparing the image...
The tutorial Im followwing is this:
https://copperhead.co/android/docs/building
A similar problem I found in discussion in Xda-developers forum, but cannot understand how to fix it:
https://forum.xda-developers.com/pixel-2/help/recipe-target-runsoongui-failed-t3782046
Thanks in advance
It seems CopperheadOS is deprecated and doesn`t have compatibility with the recent version of Android bootfs..
Does anybody enabled code coverage NDK build on Android?
by using cmake with the comments from this link code coverage for native code using Android NDK
I ended up with the same error:
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --coverage -fprofile-arcs -ftest-coverage")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage -fprofile-arcs -ftest-coverage")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} --coverage -fprofile-arcs -ftest-coverage")
so I'm creating a new thread for asking this issue.
The "same error" from the other thread:
[3/3] Linking CXX shared library ../../../../build/intermediates/cmake/project/debug/obj/armeabi/libscanhwl_camif.so
FAILED: : && /home/user/tools/android-ndk-r14b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ --target=armv5te-none-linux-androideabi --gcc-toolchain=/home/user/tools/android-ndk-r14b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64 --sysroot=/home/user/tools/android-ndk-r14b/sysroot -fPIC -isystem /home/user/tools/android-ndk-r14b/sysroot/usr/include/arm-linux-androideabi -D__ANDROID_API__=19 -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -march=armv5te -mtune=xscale -msoft-float -fno-integrated-as -mthumb -Wa,--noexecstack -Wformat -Werror=format-security -D__STDC_FORMAT_MACROS -fexceptions -frtti --coverage -fprofile-arcs -ftest-coverage -O0 -fno-limit-debug-info -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libatomic.a --sysroot /home/user/tools/android-ndk-r14b/platforms/android-19/arch-arm -Wl,--build-id -Wl,--warn-shared-textrel -Wl,--fatal-warnings -Wl,--no-undefined -Wl,-z,noexecstack -Qunused-arguments -Wl,-z,relro -Wl,-z,now -shared -Wl,-soname,libscanhwl_camif.so -o -latomic -lm "/home/user/tools/android-ndk-r14b/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi/libgnustl_static.a" && :
out/stage2/soong/ndk/sysroot/usr/include/string.h:348: error: undefined reference to '__strncpy_chk2'
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
Step one would be using a newer NDK (not sure which you're using, the other person was using r14b which is ancient). It looks like the coverage runtime library was built against a newer version of Android than you're using and so it can't be used usefully in the NDK. If you have the same issue in r17b, it's an NDK bug.
Note that coverage isn't something we really have support for right now, but it's on my todo list: https://github.com/android-ndk/ndk/issues/612.
When I open a new project that support C++ in Android Studio, It only outputs "Hello C++",And I didn't modify any code. I have tried to change the version of Android Studio and SDK. But it always show the same error.
My development platform: Windows 10
Now version: Android Studio 3.1.2
Thank you very much
Error While Building:
Build command failed.
Error while executing process C:\Users\15829\AppData\Local\Android\Sdk\cmake\3.6.4111459\bin\cmake.exe with arguments {-HC:\Users\15829\AndroidStudioProjects\MyApplication\app -BC:\Users\15829\AndroidStudioProjects\MyApplication\app\.externalNativeBuild\cmake\debug\armeabi-v7a -DANDROID_ABI=armeabi-v7a -DANDROID_PLATFORM=android-15 -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\15829\AndroidStudioProjects\MyApplication\app\build\intermediates\cmake\debug\obj\armeabi-v7a -DCMAKE_BUILD_TYPE=Debug -DANDROID_NDK=C:\Users\15829\AppData\Local\Android\Sdk\ndk-bundle -DCMAKE_CXX_FLAGS= -DCMAKE_TOOLCHAIN_FILE=C:\Users\15829\AppData\Local\Android\Sdk\ndk-bundle\build\cmake\android.toolchain.cmake -DCMAKE_MAKE_PROGRAM=C:\Users\15829\AppData\Local\Android\Sdk\cmake\3.6.4111459\bin\ninja.exe -GAndroid Gradle - Ninja}
-- Check for working C compiler: C:/Users/15829/AppData/Local/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe
-- Check for working C compiler: C:/Users/15829/AppData/Local/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe -- broken
/Users/15829/AppData/Local/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe" is not able to compile a simple test program.
Open File
It fails with the following output:
Change Dir: C:/Users/15829/AndroidStudioProjects/MyApplication/app/.externalNativeBuild/cmake/debug/armeabi-v7a/CMakeFiles/CMakeTmp
Run Build
Command:"C:\Users\15829\AppData\Local\Android\Sdk\cmake\3.6.4111459\bin\ninja.exe"
"cmTC_a2146"
[1/2] Building C object CMakeFiles/cmTC_a2146.dir/testCCompiler.c.o
[2/2] Linking C executable cmTC_a2146
FAILED: cmd.exe /C "cd . &&
C:\Users\15829\AppData\Local\Android\Sdk\ndk-bundle\toolchains\llvm\prebuilt\windows-x86_64\bin\clang.exe
--target=armv7-none-linux-androideabi
--gcc-toolchain=C:/Users/15829/AppData/Local/Android/Sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64
--sysroot=C:/Users/15829/AppData/Local/Android/Sdk/ndk-bundle/sysroot
-isystem
C:/Users/15829/AppData/Local/Android/Sdk/ndk-bundle/sysroot/usr/include/arm-linux-androideabi
-D__ANDROID_API__=15 -g -DANDROID -ffunction-sections -funwind-tables
-fstack-protector-strong -no-canonical-prefixes -march=armv7-a
-mfloat-abi=softfp -mfpu=vfpv3-d16 -mthumb -Wa,--noexecstack -Wformat
-Werror=format-security -Wl,--exclude-libs,libgcc.a
-Wl,--exclude-libs,libatomic.a -nostdlib++ --sysroot
C:/Users/15829/AppData/Local/Android/Sdk/ndk-bundle/platforms/android-15/arch-arm
-Wl,--build-id -Wl,--warn-shared-textrel -Wl,--fatal-warnings
-Wl,--fix-cortex-a8 -Wl,--exclude-libs,libunwind.a
-LC:/Users/15829/AppData/Local/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a
-Wl,--no-undefined -Wl,-z,noexecstack -Qunused-arguments -Wl,-z,relro
-Wl,-z,now -Wl,--gc-sections -Wl,-z,nocopyreloc
CMakeFiles/cmTC_a2146.dir/testCCompiler.c.o -o cmTC_a2146 -latomic -lm &&
cd ."
error: no such file or directory:
'CMakeFiles/cmTC_a2146.dir/testCCompiler.c.o'
ninja: build stopped: subcommand failed.
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt
-- Configuring incomplete, errors occurred!
See also "C:/Users/15829/AndroidStudioProjects/MyApplication/app/.externalNativeBuild/cmake/debug/armeabi-v7a/CMakeFiles/CMakeOutput.log".
See also "C:/Users/15829/AndroidStudioProjects/MyApplication/app/.externalNativeBuild/cmake/debug/armeabi-v7a/CMakeFiles/CMakeError.log".
Build command failed.
Error while executing process C:\Users\15829\AppData\Local\Android\Sdk\cmake\3.6.4111459\bin\cmake.exe with arguments {-HC:\Users\15829\AndroidStudioProjects\MyApplication\app -BC:\Users\15829\AndroidStudioProjects\MyApplication\app\.externalNativeBuild\cmake\release\armeabi-v7a -DANDROID_ABI=armeabi-v7a -DANDROID_PLATFORM=android-15 -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\15829\AndroidStudioProjects\MyApplication\app\build\intermediates\cmake\release\obj\armeabi-v7a -DCMAKE_BUILD_TYPE=Release -DANDROID_NDK=C:\Users\15829\AppData\Local\Android\Sdk\ndk-bundle -DCMAKE_CXX_FLAGS= -DCMAKE_TOOLCHAIN_FILE=C:\Users\15829\AppData\Local\Android\Sdk\ndk-bundle\build\cmake\android.toolchain.cmake -DCMAKE_MAKE_PROGRAM=C:\Users\15829\AppData\Local\Android\Sdk\cmake\3.6.4111459\bin\ninja.exe -GAndroid Gradle - Ninja}
-- Check for working C compiler: C:/Users/15829/AppData/Local/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe
-- Check for working C compiler: C:/Users/15829/AppData/Local/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe -- broken
/Users/15829/AppData/Local/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe" is not able to compile a simple test program.
Open File
It fails with the following output:
Change Dir: C:/Users/15829/AndroidStudioProjects/MyApplication/app/.externalNativeBuild/cmake/release/armeabi-v7a/CMakeFiles/CMakeTmp
Run Build
Command:"C:\Users\15829\AppData\Local\Android\Sdk\cmake\3.6.4111459\bin\ninja.exe"
"cmTC_e2e33"
[1/2] Building C object CMakeFiles/cmTC_e2e33.dir/testCCompiler.c.o
[2/2] Linking C executable cmTC_e2e33
FAILED: cmd.exe /C "cd . &&
C:\Users\15829\AppData\Local\Android\Sdk\ndk-bundle\toolchains\llvm\prebuilt\windows-x86_64\bin\clang.exe
--target=armv7-none-linux-androideabi
--gcc-toolchain=C:/Users/15829/AppData/Local/Android/Sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64
--sysroot=C:/Users/15829/AppData/Local/Android/Sdk/ndk-bundle/sysroot
-isystem
C:/Users/15829/AppData/Local/Android/Sdk/ndk-bundle/sysroot/usr/include/arm-linux-androideabi
-D__ANDROID_API__=15 -g -DANDROID -ffunction-sections -funwind-tables
-fstack-protector-strong -no-canonical-prefixes -march=armv7-a
-mfloat-abi=softfp -mfpu=vfpv3-d16 -mthumb -Wa,--noexecstack -Wformat
-Werror=format-security -Wl,--exclude-libs,libgcc.a
-Wl,--exclude-libs,libatomic.a -nostdlib++ --sysroot
C:/Users/15829/AppData/Local/Android/Sdk/ndk-bundle/platforms/android-15/arch-arm
-Wl,--build-id -Wl,--warn-shared-textrel -Wl,--fatal-warnings
-Wl,--fix-cortex-a8 -Wl,--exclude-libs,libunwind.a
-LC:/Users/15829/AppData/Local/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a
-Wl,--no-undefined -Wl,-z,noexecstack -Qunused-arguments -Wl,-z,relro
-Wl,-z,now -Wl,--gc-sections -Wl,-z,nocopyreloc
CMakeFiles/cmTC_e2e33.dir/testCCompiler.c.o -o cmTC_e2e33 -latomic -lm &&
cd ."
error: no such file or directory:
'CMakeFiles/cmTC_e2e33.dir/testCCompiler.c.o'
ninja: build stopped: subcommand failed.
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt
-- Configuring incomplete, errors occurred!
See also "C:/Users/15829/AndroidStudioProjects/MyApplication/app/.externalNativeBuild/cmake/release/armeabi-v7a/CMakeFiles/CMakeOutput.log".
See also "C:/Users/15829/AndroidStudioProjects/MyApplication/app/.externalNativeBuild/cmake/release/armeabi-v7a/CMakeFiles/CMakeError.log".
Try to add this to your build.gradle:
externalNativeBuild {
cmake {
arguments '-DANDROID_TOOLCHAIN=clang' --> gcc
}
}
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!
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.