caffe2 build android Failed to configure test project build system - android

I want to build caffe2 on macOS.
build caffe2 is every thing OK, but when I build android, use caffe2/scripts/build_android.sh the processing is to 100% and then occurred:
CMake Error at /usr/local/Cellar/cmake/3.10.1/share/cmake/Modules/CheckCXXSourceCompiles.cmake:97 (try_compile):
Failed to configure test project build system.
Call Stack (most recent call first):
cmake/MiscCheck.cmake:34 (CHECK_CXX_SOURCE_COMPILES)
CMakeLists.txt:61 (include)
my cmake version is :
cmake version 3.10.1
CMake suite maintained and supported by Kitware (kitware.com/cmake).
the all log is :
```
CMake Error at third_party/android-cmake/android.toolchain.cmake:310 (file):
file STRINGS file
"/Users/zhouhuacong/Library/Android/sdk/ndk-bundle/platforms/android-21/arch-arm/usr/include/android/api-level.h"
cannot be read.
Call Stack (most recent call first):
third_party/android-cmake/android.toolchain.cmake:814 (__DETECT_NATIVE_API_LEVEL)
/usr/local/Cellar/cmake/3.10.1/share/cmake/Modules/CMakeDetermineSystem.cmake:94 (include)
CMakeLists.txt:6 (project)
CMake Error at third_party/android-cmake/android.toolchain.cmake:816 (message):
Specified Android API level (21) does not match to the level found ().
Probably your copy of NDK is broken.
Call Stack (most recent call first):
/usr/local/Cellar/cmake/3.10.1/share/cmake/Modules/CMakeDetermineSystem.cmake:94 (include)
CMakeLists.txt:6 (project)
CMake Deprecation Warning at /usr/local/Cellar/cmake/3.10.1/share/cmake/Modules/CMakeForceCompiler.cmake:69 (message):
The CMAKE_FORCE_C_COMPILER macro is deprecated. Instead just set
CMAKE_C_COMPILER and allow CMake to identify the compiler.
Call Stack (most recent call first):
third_party/android-cmake/android.toolchain.cmake:1139 (CMAKE_FORCE_C_COMPILER)
/usr/local/Cellar/cmake/3.10.1/share/cmake/Modules/CMakeDetermineSystem.cmake:94 (include)
CMakeLists.txt:6 (project)
CMake Deprecation Warning at /usr/local/Cellar/cmake/3.10.1/share/cmake/Modules/CMakeForceCompiler.cmake:83 (message):
The CMAKE_FORCE_CXX_COMPILER macro is deprecated. Instead just set
CMAKE_CXX_COMPILER and allow CMake to identify the compiler.
Call Stack (most recent call first):
third_party/android-cmake/android.toolchain.cmake:1151 (CMAKE_FORCE_CXX_COMPILER)
/usr/local/Cellar/cmake/3.10.1/share/cmake/Modules/CMakeDetermineSystem.cmake:94 (include)
CMakeLists.txt:6 (project)
-- Performing Test CAFFE2_LONG_IS_INT32_OR_64
CMake Error at /Users/zhouhuacong/CaffeProject/caffe2/third_party/android-cmake/android.toolchain.cmake:310 (file):
file STRINGS file
"/Users/zhouhuacong/Library/Android/sdk/ndk-bundle/platforms/android-21/arch-arm/usr/include/android/api-level.h"
cannot be read.
Call Stack (most recent call first):
/Users/zhouhuacong/CaffeProject/caffe2/third_party/android-cmake/android.toolchain.cmake:814 (__DETECT_NATIVE_API_LEVEL)
/Users/zhouhuacong/CaffeProject/caffe2/build_android/CMakeFiles/3.10.1/CMakeSystem.cmake:6 (include)
/Users/zhouhuacong/CaffeProject/caffe2/build_android/CMakeFiles/CMakeTmp/CMakeLists.txt:3 (project)
CMake Error at /Users/zhouhuacong/CaffeProject/caffe2/third_party/android-cmake/android.toolchain.cmake:816 (message):
Specified Android API level (21) does not match to the level found ().
Probably your copy of NDK is broken.
Call Stack (most recent call first):
/Users/zhouhuacong/CaffeProject/caffe2/build_android/CMakeFiles/3.10.1/CMakeSystem.cmake:6 (include)
/Users/zhouhuacong/CaffeProject/caffe2/build_android/CMakeFiles/CMakeTmp/CMakeLists.txt:3 (project)
CMake Deprecation Warning at /usr/local/Cellar/cmake/3.10.1/share/cmake/Modules/CMakeForceCompiler.cmake:69 (message):
The CMAKE_FORCE_C_COMPILER macro is deprecated. Instead just set
CMAKE_C_COMPILER and allow CMake to identify the compiler.
Call Stack (most recent call first):
/Users/zhouhuacong/CaffeProject/caffe2/third_party/android-cmake/android.toolchain.cmake:1139 (CMAKE_FORCE_C_COMPILER)
/Users/zhouhuacong/CaffeProject/caffe2/build_android/CMakeFiles/3.10.1/CMakeSystem.cmake:6 (include)
/Users/zhouhuacong/CaffeProject/caffe2/build_android/CMakeFiles/CMakeTmp/CMakeLists.txt:3 (project)
CMake Deprecation Warning at /usr/local/Cellar/cmake/3.10.1/share/cmake/Modules/CMakeForceCompiler.cmake:83 (message):
The CMAKE_FORCE_CXX_COMPILER macro is deprecated. Instead just set
CMAKE_CXX_COMPILER and allow CMake to identify the compiler.
Call Stack (most recent call first):
/Users/zhouhuacong/CaffeProject/caffe2/third_party/android-cmake/android.toolchain.cmake:1151 (CMAKE_FORCE_CXX_COMPILER)
/Users/zhouhuacong/CaffeProject/caffe2/build_android/CMakeFiles/3.10.1/CMakeSystem.cmake:6 (include)
/Users/zhouhuacong/CaffeProject/caffe2/build_android/CMakeFiles/CMakeTmp/CMakeLists.txt:3 (project)
CMake Error at /usr/local/Cellar/cmake/3.10.1/share/cmake/Modules/CheckCXXSourceCompiles.cmake:97 (try_compile):
Failed to configure test project build system.
Call Stack (most recent call first):
cmake/MiscCheck.cmake:34 (CHECK_CXX_SOURCE_COMPILES)
CMakeLists.txt:61 (include)
-- Configuring incomplete, errors occurred!
See also "/Users/zhouhuacong/CaffeProject/caffe2/build_android/CMakeFiles/CMakeOutput.log".
```
I find the first error file STRINGS file
"/Users/zhouhuacong/Library/Android/sdk/ndk-bundle/platforms/android-21/arch-arm/usr/include/android/api-level.h"
cannot be read.
but i don't find the include folder in my mac. there are only /Users/zhouhuacong/Library/Android/sdk/ndk-bundle/platforms/android-21/arch-arm/usr/lib folder.
Is this my NDK environment problem? I use the Android Studio 3.0, and download NDK 16.
Where am I wrong?

Related

how to solve Cmake error could not find toolchain file

I want to use c++ in my flutter project . To do this I first need to convert my c++ file into a shared library or into a .so file according to android environment. To do so I am using this command:-
cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK/build/cmake/android.toolchain.cmake -G Ninja -DANDROID_NDK=$ANDROID_NDK -DANDROID_ABI=arm64-v8a -DANDROID_PLATFORM=android-30 -Sandroid -Bbin/android/arm64-v8a
But it is continueously showing me this error:-
cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK/build/cmake/android.toolchain.cmake -G Ninja -DANDROID_NDK=$ANDROID_NDK -DANDROID_ABI=arm64-v8a -DANDROID_PLATFORM=
android-30 -Sandroid -Bbin/android/arm64-v8a
CMake Warning:
Ignoring extra path from command line:
"F:/dart ffi/ffiproject/.toolchain.cmake"
CMake Warning at C:/Users/super/AppData/Local/Android/Sdk/ndk/25.1.8937393/build/cmake/android-legacy.toolchain.cmake:51 (message):
Using custom NDK path (ANDROID_NDK is set): F:/dart
ffi/ffiproject/android/$ANDROID_NDK
Call Stack (most recent call first):
C:/Users/super/AppData/Local/Android/Sdk/ndk/25.1.8937393/build/cmake/android.toolchain.cmake:54 (include)
F:/dart ffi/ffiproject/bin/android/arm64-v8a/CMakeFiles/3.24.1/CMakeSystem.cmake:6 (include)
CMakeLists.txt:5 (project)
CMake Error at C:/Users/super/AppData/Local/Android/Sdk/ndk/25.1.8937393/build/cmake/android-legacy.toolchain.cmake:64 (file):
file failed to open for reading (No such file or directory):
F:/dart ffi/ffiproject/android/$ANDROID_NDK/source.properties
Call Stack (most recent call first):
C:/Users/super/AppData/Local/Android/Sdk/ndk/25.1.8937393/build/cmake/android.toolchain.cmake:54 (include)
F:/dart ffi/ffiproject/bin/android/arm64-v8a/CMakeFiles/3.24.1/CMakeSystem.cmake:6 (include)
CMakeLists.txt:5 (project)
CMake Error at C:/Users/super/AppData/Local/Android/Sdk/ndk/25.1.8937393/build/cmake/android-legacy.toolchain.cmake:69 (message):
Failed to parse Android NDK revision: F:/dart
ffi/ffiproject/android/$ANDROID_NDK/source.properties.
Call Stack (most recent call first):
C:/Users/super/AppData/Local/Android/Sdk/ndk/25.1.8937393/build/cmake/android.toolchain.cmake:54 (include)
F:/dart ffi/ffiproject/bin/android/arm64-v8a/CMakeFiles/3.24.1/CMakeSystem.cmake:6 (include)
CMakeLists.txt:5 (project)
CMake Error at C:/Users/super/AppData/Local/Android/Sdk/ndk/25.1.8937393/build/cmake/android-legacy.toolchain.cmake:175 (include):
include could not find requested file:
F:/dart ffi/ffiproject/android/$ANDROID_NDK/build/cmake/platforms.cmake
Call Stack (most recent call first):
C:/Users/super/AppData/Local/Android/Sdk/ndk/25.1.8937393/build/cmake/android.toolchain.cmake:54 (include)
F:/dart ffi/ffiproject/bin/android/arm64-v8a/CMakeFiles/3.24.1/CMakeSystem.cmake:6 (include)
CMakeLists.txt:5 (project)
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:5 (project):
The CMAKE_C_COMPILER:
F:/dart ffi/ffiproject/android/$ANDROID_NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe
is not a full path to an existing compiler tool.
Tell CMake where to find the compiler by setting either the environment
variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
the compiler, or to the compiler name if it is in the PATH.
CMake Error at CMakeLists.txt:5 (project):
The CMAKE_CXX_COMPILER:
F:/dart ffi/ffiproject/android/$ANDROID_NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe
is not a full path to an existing compiler tool.
Tell CMake where to find the compiler by setting either the environment
variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
to the compiler, or to the compiler name if it is in the PATH.
-- Configuring incomplete, errors occurred!
See also "F:/dart ffi/ffiproject/bin/android/arm64-v8a/CMakeFiles/CMakeOutput.log".
See also "F:/dart ffi/ffiproject/bin/android/arm64-v8a/CMakeFiles/CMakeError.log".
I dont know how to solve it.
Here is my CMakeLists.txt file:-
cmake_minimum_required(VERSION 3.0.0)
set(CMAKE_MAKE_PROGRAM "C:/src/ninja-win/ninja.exe" CACHE FILEPATH "" FORCE)
set( CMAKE_CXX_COMPILER g++ )
set( CMAKE_C_COMPILER gcc )
project(ffiproject)
add_library(
lib
SHARED
lib.cpp
)
find_library(
lib
log
)
target_link_libraries(
lib
${log_lib}
)
Please Help Me

Fail to create new Android NDK project

I want to learn how to write code in Android NDK.
I open the 'android studio guide' and on the 'create new ndk project' I follow the instruction.
I just create new project and add support for C++ code and that's it .. all the IDE code is in red and nothing can be compile.
Can't find any problem and I don't know what to do.
Tried to sync by clicking 'Try again' in first - and still fail.
The error message is:
CMake Error at
C:/Users/AppData/Local/Android/sdk/ndk-bundle/build/cmake/android.toolchain.cmake:40
(cmake_minimum_required): CMake 3.6.0 or higher is required. You
are running version 3.4.1 Call Stack (most recent call first):
C:/Users/AppData/Local/Android/sdk/cmake/share/cmake-3.4/Modules/CMakeDetermineSystem.cmake:98
(include) CMakeLists.txt CMake Error: CMAKE_C_COMPILER not set,
after EnableLanguage CMake Error: CMAKE_CXX_COMPILER not set, after
EnableLanguage
-- Configuring incomplete, errors occurred! Build command failed. Error while executing process
C:\Users\AppData\Local\Android\sdk\cmake\bin\cmake.exe with arguments
{-HC:\WORKSPACE\Android\Practice\NDK\Practice_001\app
-BC:\WORKSPACE\Android\Practice\NDK\Practice_001\app.externalNativeBuild\cmake\debug\armeabi
-GAndroid Gradle - Ninja -DANDROID_ABI=armeabi -DANDROID_NDK=C:\Users\Rn\AppData\Local\Android\sdk\ndk-bundle -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\WORKSPACE\Android\Practice\NDK\Practice_001\app\build\intermediates\cmake\debug\obj\armeabi
-DCMAKE_BUILD_TYPE=Debug -DCMAKE_MAKE_PROGRAM=C:\Users\AppData\Local\Android\sdk\cmake\bin\ninja.exe
-DCMAKE_TOOLCHAIN_FILE=C:\Users\AppData\Local\Android\sdk\ndk-bundle\build\cmake\android.toolchain.cmake
-DANDROID_PLATFORM=android-24 -DCMAKE_CXX_FLAGS=-frtti -fexceptions} CMake Error at
C:/Users/AppData/Local/Android/sdk/ndk-bundle/build/cmake/android.toolchain.cmake:40
(cmake_minimum_required): CMake 3.6.0 or higher is required. You
are running version 3.4.1 Call Stack (most recent call first):
C:/Users/AppData/Local/Android/sdk/cmake/share/cmake-3.4/Modules/CMakeDetermineSystem.cmake:98
(include) CMakeLists.txt CMake Error: CMAKE_C_COMPILER not set,
after EnableLanguage CMake Error: CMAKE_CXX_COMPILER not set, after
EnableLanguage
-- Configuring incomplete, errors occurred!
Thanks for any help.
Click on the "Try again" in yellow banner. If you got the error still probably problem is with you do not have necessary library packages in your build.gradle file. Check if you have added necessary Support Library Packages in your build.gradle file. If doesn't then add it and "rebuild" your project.
Your error message is:
CMake 3.6.0 or higher is required. You are running version 3.4.1
I do not know whether you have your own CMake installation or you are attempting to use one that comes from Android Studio. My guess is that you have your own CMake installation. If so, upgrade it to 3.6.0 or higher.

Android studio error while creating project with NDK support

I tried to create simple android application with NDK support. I followed https://developer.android.com/studio/projects/add-native-code.html#new-project while creating project. After creating project it gives me following error:
External Native Build Issues
Build command failed.
Error while executing 'C:\Users\Nilesh.Kashid\AppData\Local\Android\Sdk\cmake\3.6.3155560\bin\cmake.exe' with arguments {-HD:\AndroidNDKExample\app -BD:\AndroidNDKExample\app\.externalNativeBuild\cmake\release\armeabi -GAndroid Gradle - Ninja -DANDROID_ABI=armeabi -DANDROID_NDK=C:\Users\Nilesh.Kashid\AppData\Local\Android\Sdk\ndk-bundle -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=D:\AndroidNDKExample\app\build\intermediates\cmake\release\obj\armeabi -DCMAKE_BUILD_TYPE=Release -DCMAKE_MAKE_PROGRAM=C:\Users\Nilesh.Kashid\AppData\Local\Android\Sdk\cmake\3.6.3155560\bin\ninja.exe -DCMAKE_TOOLCHAIN_FILE=C:\Users\Nilesh.Kashid\AppData\Local\Android\Sdk\cmake\3.6.3155560\android.toolchain.cmake -DANDROID_NATIVE_API_LEVEL=19 -DCMAKE_CXX_FLAGS=-frtti -fexceptions}
-- Configuring incomplete, errors occurred!
CMake Error at C:/Users/Nilesh.Kashid/AppData/Local/Android/sdk/cmake/3.6.3155560/android.toolchain.cmake:351 (message):
Failed to parse Android NDK revision:
C:/Users/Nilesh.Kashid/AppData/Local/Android/Sdk/ndk-bundle/source.properties.
Call Stack (most recent call first):
C:/Users/Nilesh.Kashid/AppData/Local/Android/sdk/cmake/3.6.3155560/share/cmake-3.6/Modules/CMakeDetermineSystem.cmake:98 (include)
CMakeLists.txt
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
Error:executing external native build for cmake D:\AndroidNDKExample\app\CMakeLists.txt
Build command failed.
Error while executing 'C:\Users\Nilesh.Kashid\AppData\Local\Android\Sdk\cmake\3.6.3155560\bin\cmake.exe' with arguments {-HD:\AndroidNDKExample\app -BD:\AndroidNDKExample\app\.externalNativeBuild\cmake\debug\armeabi -GAndroid Gradle - Ninja -DANDROID_ABI=armeabi -DANDROID_NDK=C:\Users\Nilesh.Kashid\AppData\Local\Android\Sdk\ndk-bundle -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=D:\AndroidNDKExample\app\build\intermediates\cmake\debug\obj\armeabi -DCMAKE_BUILD_TYPE=Debug -DCMAKE_MAKE_PROGRAM=C:\Users\Nilesh.Kashid\AppData\Local\Android\Sdk\cmake\3.6.3155560\bin\ninja.exe -DCMAKE_TOOLCHAIN_FILE=C:\Users\Nilesh.Kashid\AppData\Local\Android\Sdk\cmake\3.6.3155560\android.toolchain.cmake -DANDROID_NATIVE_API_LEVEL=19 -DCMAKE_CXX_FLAGS=-frtti -fexceptions}
-- Configuring incomplete, errors occurred!
CMake Error at C:/Users/Nilesh.Kashid/AppData/Local/Android/sdk/cmake/3.6.3155560/android.toolchain.cmake:351 (message):
Failed to parse Android NDK revision:
C:/Users/Nilesh.Kashid/AppData/Local/Android/Sdk/ndk-bundle/source.properties.
Call Stack (most recent call first):
C:/Users/Nilesh.Kashid/AppData/Local/Android/sdk/cmake/3.6.3155560/share/cmake-3.6/Modules/CMakeDetermineSystem.cmake:98 (include)
CMakeLists.txt
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
Error:executing external native build for cmake D:\AndroidNDKExample\app\CMakeLists.txt
I have downloaded CMake and LLDB android I am using Android Studio 2.2.3 version.
I had the same problem. This problem occurs in older versions of ndk.
Failed to parse Android NDK revision:
The problem was resolved after updating ndk.
The current ndk version is 13.1.3345770.
Reference :
https://developer.android.com/ndk/guides/index.html

Unable to build opencv for android using cmake on yosemite

I managed to build OpenCV 2.4.9 for java following the online instructions.
However I am unable to build for Android
I am using OSX Yosemite, CMake 3.0.2, OpenCV 2.4.9.
The output I get is the following:
platforms [2.4.9] % sh ./scripts/cmake_android_arm.sh CMake Error at platforms/android/android.toolchain.cmake:827 (list): list index: 17 out of range (-17, 16) Call Stack (most recent call first): platforms/build_android_arm/CMakeFiles/3.0.2/CMakeSystem.cmake:6 (include) CMakeLists.txt:56 (project)
-- Detected version of GNU GCC: 49 (409) -- Performing Test HAVE_CXX_WERROR_ADDRESS CMake Error at /Users/mam/Source/opencv/platforms/android/android.toolchain.cmake:711 (list): list sub-command REMOVE_DUPLICATES requires list to be present. Call Stack (most recent call first): /Users/mam/Source/opencv/platforms/build_android_arm/CMakeFiles/3.0.2/CMakeSystem.cmake:6 (include) CMakeLists.txt:2 (project)
CMake Error at /Users/mam/Source/opencv/platforms/android/android.toolchain.cmake:712 (list): list sub-command SORT requires list to be present. Call Stack (most recent call first): /Users/mam/Source/opencv/platforms/build_android_arm/CMakeFiles/3.0.2/CMakeSystem.cmake:6 (include) CMakeLists.txt:2 (project)
CMake Error at /Users/mam/Source/opencv/platforms/android/android.toolchain.cmake:718 (message): No one of known Android ABIs is supported by this cmake toolchain. Call Stack (most recent call first): /Users/mam/Source/opencv/platforms/build_android_arm/CMakeFiles/3.0.2/CMakeSystem.cmake:6 (include) CMakeLists.txt:2 (project)
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage CMake Error: Internal CMake error, TryCompile configure of cmake failed -- Configuring incomplete, errors occurred! See also "/Users/mam/Source/opencv/platforms/build_android_arm/CMakeFiles/CMakeOutput.log".
I tried setting both:
export ANDROID_NDK=~/android-ndk-r8e
and
export ANDROID_STANDALONE_TOOLCHAIN=~/android-toolchain
but both give same error. Any clues to what is causing this? Bad version of CMake?

cmake fails with android ndk

I am trying to build something using the Android NdK standalone toolchain. However, I am running into these errors.
CMake Warning at cmake/android.toolchain.cmake:387 (message):
Using value of obsolete variable ANDROID_NDK_TOOLCHAIN_ROOT as initial
value for ANDROID_STANDALONE_TOOLCHAIN. Please note, that
ANDROID_NDK_TOOLCHAIN_ROOT can be completely removed in future versions of
the toolchain.
Call Stack (most recent call first):
cmake/android.toolchain.cmake:476 (__INIT_VARIABLE)
/usr/local/Cellar/cmake/2.8.10.2/share/cmake/Modules/CMakeDetermineSystem.cmake:86 (include)
CMakeLists.txt:16 (PROJECT)
CMake Error at cmake/android.toolchain.cmake:412 (FILE):
file STRINGS file
"/Users/vgokhale/Desktop/android-ndk-r8e/sysroot/usr/include/android/api-level.h"
cannot be read.
Call Stack (most recent call first):
cmake/android.toolchain.cmake:548 (__DETECT_NATIVE_API_LEVEL)
/usr/local/Cellar/cmake/2.8.10.2/share/cmake/Modules/CMakeDetermineSystem.cmake:86 (include)
CMakeLists.txt:16 (PROJECT)
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_C_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_C_COMPILER
CMake Error: Could not find cmake module file:/Users/vgokhale/Desktop/torch-android/src/build/CMakeFiles/2.8.10.2/CMakeCCompiler.cmake
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_CXX_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_CXX_COMPILER
CMake Error: Could not find cmake module file:/Users/vgokhale/Desktop/torch-android/src/build/CMakeFiles/2.8.10.2/CMakeCXXCompiler.cmake
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
make: *** No rule to make target `install'. Stop.
There are two sets of errors. I have no idea where to begin with the first set. The android.toolchain.cmake file looks into sysroot by default but android is not installed there neither does Google require me to install it there.
Regarding the CMAKE variables, I found that most solutions involve installing Developer Tools, which I already have. I tried manually setting the CXX and CC variables but that did not help.
Any ideas as to where to start?
Thank you.
Ok, I'll do a bit of guesswork here, but I think you're using http://code.google.com/p/android-cmake/ and you're calling it with ANDROID_STANDALONE_TOOLCHAIN while providing it the path to your NDK. If I'm right, that's the problem.
You should either call it with ANDROID_NDK and provide the path to your NDK.
The android-cmake documentation suggests that this is the way to go.
or
Keep calling it with ANDROID_STANDALONE_TOOLCHAIN, but providing it the path to an installed toochain (something created with make-standalone-toolchain.sh)
If you want to go this way, you can find information about creating standalone toolchains in docs/STANDALONE-TOOLCHAIN.html in your installed NDK.

Categories

Resources