Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Building OpenCv4Android: CMAKE_CXX_COMPILER_ENV_VAR not set

Using the instructions found here for OSX, I'm getting the following error:

➜  opencv git:(master) ✗ ./platforms/scripts/cmake_android_arm.sh 
CMake Error at platforms/android/android.toolchain.cmake:694 (message):
  Could not find any working toolchain in the NDK.  Probably your Android NDK
  is broken.
Call Stack (most recent call first):
  /usr/local/Cellar/cmake/2.8.11.2/share/cmake/Modules/CMakeDetermineSystem.cmake:90 (include)
  CMakeLists.txt:45 (project)


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/dan/workspace/opencv/platforms/build_android_arm/CMakeFiles/2.8.11.2/CMakeCXXCompiler.cmake
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/dan/workspace/opencv/platforms/build_android_arm/CMakeFiles/2.8.11.2/CMakeCCompiler.cmake
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!

The instructions seem to be a bit out of date; they reference the old location of the git respository, and say I should be doing this:

cd opencv/android
sh ./scripts/cmake_android.sh

Whereas in the current repository, scripts live in platforms/scripts, so I'm doing this:

sh /platforms/scripts/cmake_android_arm.sh

What is it I'm missing?

Building OpenCv4Android: CMAKE_CXX_COMPILER_ENV_VAR not set

Using the instructions found here for OSX, I'm getting the following error:

➜  opencv git:(master) ✗ ./platforms/scripts/cmake_android_arm.sh 
CMake Error at platforms/android/android.toolchain.cmake:694 (message):
  Could not find any working toolchain in the NDK.  Probably your Android NDK
  is broken.
Call Stack (most recent call first):
  /usr/local/Cellar/cmake/2.8.11.2/share/cmake/Modules/CMakeDetermineSystem.cmake:90 (include)
  CMakeLists.txt:45 (project)


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/dan/workspace/opencv/platforms/build_android_arm/CMakeFiles/2.8.11.2/CMakeCXXCompiler.cmake
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/dan/workspace/opencv/platforms/build_android_arm/CMakeFiles/2.8.11.2/CMakeCCompiler.cmake
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!

The instructions seem to be a bit out of date; they reference the old location of the git respository, and say I should be doing this:

cd opencv/android
sh ./scripts/cmake_android.sh

Whereas in the current repository, scripts live in platforms/scripts, so I'm doing this:

sh /platforms/scripts/cmake_android_arm.sh

Despite the error message, I's using a clean installation of the NDK and have it set on $ANDROID_NDK.

What is it I'm missing?

Building OpenCv4Android: CMAKE_CXX_COMPILER_ENV_VAR not set

Using the instructions found here for OSX, I'm getting the following error:

➜  opencv git:(master) ✗ ./platforms/scripts/cmake_android_arm.sh 
CMake Error at platforms/android/android.toolchain.cmake:694 (message):
  Could not find any working toolchain in the NDK.  Probably your Android NDK
  is broken.
Call Stack (most recent call first):
  /usr/local/Cellar/cmake/2.8.11.2/share/cmake/Modules/CMakeDetermineSystem.cmake:90 (include)
  CMakeLists.txt:45 (project)


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/dan/workspace/opencv/platforms/build_android_arm/CMakeFiles/2.8.11.2/CMakeCXXCompiler.cmake
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/dan/workspace/opencv/platforms/build_android_arm/CMakeFiles/2.8.11.2/CMakeCCompiler.cmake
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!

The instructions seem to be a bit out of date; they reference the old location of the git respository, and say I should be doing this:

cd opencv/android
sh ./scripts/cmake_android.sh

Whereas in the current repository, scripts live in platforms/scripts, so I'm doing this:

sh /platforms/scripts/cmake_android_arm.sh

Despite the error message, I's using a clean installation of the NDK and have it set on $ANDROID_NDK.$ANDROID_NDK.

What is it I'm missing?

Building OpenCv4Android: CMAKE_CXX_COMPILER_ENV_VAR not set

Using I'm trying to build OpenCv4Android on OSX using the instructions found here for OSX, I'm getting the following error:

➜  opencv git:(master) ✗ ./platforms/scripts/cmake_android_arm.sh 
CMake Error at platforms/android/android.toolchain.cmake:694 (message):
  Could not find any working toolchain in the NDK.  Probably your Android NDK
  is broken.
Call Stack (most recent call first):
  /usr/local/Cellar/cmake/2.8.11.2/share/cmake/Modules/CMakeDetermineSystem.cmake:90 (include)
  CMakeLists.txt:45 (project)


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/dan/workspace/opencv/platforms/build_android_arm/CMakeFiles/2.8.11.2/CMakeCXXCompiler.cmake
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/dan/workspace/opencv/platforms/build_android_arm/CMakeFiles/2.8.11.2/CMakeCCompiler.cmake
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!

The instructions .

They seem to be a bit slightly out of date; date, as they reference the old location of the git respository, and say I should be doing this:

cd opencv/android
sh ./scripts/cmake_android.sh

Whereas in the current repository, scripts live in platforms/scripts, so I'm doing this:

sh /platforms/scripts/cmake_android_arm.sh

However, that produces the following error:

➜  opencv git:(master) ✗ ./platforms/scripts/cmake_android_arm.sh 
CMake Error at platforms/android/android.toolchain.cmake:694 (message):
  Could not find any working toolchain in the NDK.  Probably your Android NDK
  is broken.
Call Stack (most recent call first):
  /usr/local/Cellar/cmake/2.8.11.2/share/cmake/Modules/CMakeDetermineSystem.cmake:90 (include)
  CMakeLists.txt:45 (project)


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/dan/workspace/opencv/platforms/build_android_arm/CMakeFiles/2.8.11.2/CMakeCXXCompiler.cmake
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/dan/workspace/opencv/platforms/build_android_arm/CMakeFiles/2.8.11.2/CMakeCCompiler.cmake
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!

Despite the error message, I's I'm using a clean installation of the NDK and have it set on $ANDROID_NDK.

What is it Any ideas what I'm missing?doing wrong?