QEver / android-cmake

Automatically exported from code.google.com/p/android-cmake
0 stars 0 forks source link

Compiler version can't be determined with latest NDK #15

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

I use a standalone ndk, but I think it will be a problem with a normal ndk too. 
If I try to use android-cmake, I get errors that no compiler toolchain can be 
determined

CMake Error at 
/Users/lieven/android-cmake/toolchain/android.toolchain.cmake:618 (list):
  list GET given empty list
Call Stack (most recent call first):
  /Applications/CMake 2.8-10.app/Contents/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake:89 (include)

CMake Error at 
/Users/lieven/android-cmake/toolchain/android.toolchain.cmake:631 (message):
  No one of available compiler toolchains is able to compile for arm
  platform.
Call Stack (most recent call first):
  /Applications/CMake 2.8-10.app/Contents/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake:89 (include)

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/lieven/Projects/AndroidMatter/CMakeFiles/2.8.10.2/CMakeCCompiler.cma
ke
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/lieven/Projects/AndroidMatter/CMakeFiles/2.8.10.2/CMakeCXXCompiler.c
make
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!

What is the expected output? What do you see instead?

It should find the toolchain.

What version of the product are you using? On what operating system?

- max osx 10.7.5
- cmake 2.8.10.2
- android-cmake -> can't find a version number, but I'm quite sure it's the 
latest one.
- android ndk r8d

Please provide any additional information below.

The problem seems to be that the version number of the gcc version in the 
latest NDK is 4.7. The regular expression that tries to extract the gcc version 
expects 3 components (like 4.2.1)

Replacing line 467 

  string( REGEX MATCH "[0-9]+.[0-9]+.[0-9]+" __availableToolchainCompilerVersions "${__availableToolchainCompilerVersions}" )

with

  string( REGEX MATCH "[0-9]+.[0-9]+(.[0-9]+)?" __availableToolchainCompilerVersions "${__availableToolchainCompilerVersions}" )

fixes the problem for me.

Original issue reported on code.google.com by lievenva...@gmail.com on 16 Feb 2013 at 4:10

GoogleCodeExporter commented 9 years ago
You can find up-to-date version of this project on my github fork: 
https://github.com/taka-no-me/android-cmake This problem should be already 
fixed.

Original comment by andrey.k...@itseez.com on 25 Mar 2013 at 4:40