azzimzied / android-cmake

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

Could not uniquely determine machine name #14

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Use the latest android.toolchain.cmake script with Android NDK r8c!

What do you see instead?
A couple of warnings (but they are all the same):
CMake Warning at /home/jumio/workspace/ocr/scripts/android.toolchain.cmake:318 
(message):
  Could not uniquely determine machine name for compiler from
  /opt/build-tools/android-ndk-r8c/toolchains/mipsel-linux-android-clang3.1/prebuilt/linux-x86.
Call Stack (most recent call first):
  /home/jumio/workspace/ocr/scripts/android.toolchain.cmake:481 (__DETECT_TOOLCHAIN_MACHINE_NAME)
  /home/jumio/workspace/ocr/build/CMakeFiles/CMakeSystem.cmake:1 (INCLUDE)
  CMakeLists.txt:3 (PROJECT)

What version of the product are you using? On what operating system?
latest, on Ubuntu 10.10

Original issue reported on code.google.com by roman.re...@jumio.com on 16 Nov 2012 at 12:11

GoogleCodeExporter commented 9 years ago
Having the same with NDK r8d

trying to build https://github.com/ironsteel/cegui

latest version of android-cmake (just re-downloaded to be sure) on suse 12.2 x64

Original comment by red.macb...@gmail.com on 8 Jan 2013 at 3:16

GoogleCodeExporter commented 9 years ago
Same problem: debian wheezy and r8d.

Original comment by gamth...@gmail.com on 9 Jan 2013 at 8:50

GoogleCodeExporter commented 9 years ago
Same problem on OS X 10.8.2 and r8d.

Original comment by njli...@gmail.com on 16 Jan 2013 at 5:50

GoogleCodeExporter commented 9 years ago
I am also facing same problem on the windows with R8D

Original comment by achyutja...@gmail.com on 24 Jan 2013 at 1:47

GoogleCodeExporter commented 9 years ago
@@ -314,12 +314,14 @@ macro( __DETECT_TOOLCHAIN_MACHINE_NAME _
  file( GLOB __gccExePath "${_root}/bin/*-gcc${TOOL_OS_SUFFIX}" )
  __LIST_FILTER( __gccExePath "bin/[.].*-gcc${TOOL_OS_SUFFIX}$" )
  list( LENGTH __gccExePath __gccExePathsCount )
- if( NOT __gccExePathsCount EQUAL 1 )
-  message( WARNING "Could not uniquely determine machine name for compiler 
from ${_root}." )
-  set( ${_var} "" )
- else()
-  get_filename_component( __gccExeName "${__gccExePath}" NAME_WE )
-  string( REPLACE "-gcc" "" ${_var} "${__gccExeName}" )
+ if( NOT __gccExePathsCount EQUAL 0 )
+  if( NOT __gccExePathsCount EQUAL 1 )
+   message( WARNING "Could not uniquely determine machine name for compiler 
from ${_root}." )
+   set( ${_var} "" )
+  else()
+   get_filename_component( __gccExeName "${__gccExePath}" NAME_WE )
+   string( REPLACE "-gcc" "" ${_var} "${__gccExeName}" )
+  endif()
  endif()
  unset( __gccExePath )
  unset( __gccExePathsCount )
@@ -478,13 +480,17 @@ if( BUILD_WITH_ANDROID_NDK )
  set( __availableToolchainArchs "" )
  set( __availableToolchainCompilerVersions "" )
  foreach( __toolchain ${__availableToolchains} )
-  __DETECT_TOOLCHAIN_MACHINE_NAME( __machine 
"${ANDROID_NDK}/toolchains/${__toolchain}/prebuilt/${ANDROID_NDK_HOST_SYSTEM_NAM
E}" )
-  if( __machine )
-   string( REGEX MATCH "[0-9]+[.][0-9]+[.]*[0-9]*$" __version "${__toolchain}" 
)
-   string( REGEX MATCH "^[^-]+" __arch "${__toolchain}" )
-   list( APPEND __availableToolchainMachines "${__machine}" )
-   list( APPEND __availableToolchainArchs "${__arch}" )
-   list( APPEND __availableToolchainCompilerVersions "${__version}" )
+  if (EXISTS "${ANDROID_NDK}/toolchains/${__toolchain}/prebuilt")
+    __DETECT_TOOLCHAIN_MACHINE_NAME( __machine 
"${ANDROID_NDK}/toolchains/${__toolchain}/prebuilt/${ANDROID_NDK_HOST_SYSTEM_NAM
E}" )
+    if( __machine )
+     string( REGEX MATCH "[0-9]+[.][0-9]+[.]*[0-9]*$" __version 
"${__toolchain}" )
+     string( REGEX MATCH "^[^-]+" __arch "${__toolchain}" )
+     list( APPEND __availableToolchainMachines "${__machine}" )
+     list( APPEND __availableToolchainArchs "${__arch}" )
+     list( APPEND __availableToolchainCompilerVersions "${__version}" )
+    else()
+     list( REMOVE_ITEM __availableToolchains "${__toolchain}" )
+    endif()
   else()
    list( REMOVE_ITEM __availableToolchains "${__toolchain}" )
   endif()

should make it go away... it was just a warning anyway. The problem was a 
changed structure in the toolchains/ directory,

Original comment by red.macb...@gmail.com on 12 Mar 2013 at 7:18

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 The problem is already fixed.

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