Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not uniquely determine machine name #14

Open
GoogleCodeExporter opened this issue Apr 21, 2016 · 6 comments
Open

Could not uniquely determine machine name #14

GoogleCodeExporter opened this issue Apr 21, 2016 · 6 comments

Comments

@GoogleCodeExporter
Copy link

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 [email protected] on 16 Nov 2012 at 12:11

@GoogleCodeExporter
Copy link
Author

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 [email protected] on 8 Jan 2013 at 3:16

@GoogleCodeExporter
Copy link
Author

Same problem: debian wheezy and r8d.

Original comment by [email protected] on 9 Jan 2013 at 8:50

@GoogleCodeExporter
Copy link
Author

Same problem on OS X 10.8.2 and r8d.

Original comment by [email protected] on 16 Jan 2013 at 5:50

@GoogleCodeExporter
Copy link
Author

I am also facing same problem on the windows with R8D

Original comment by [email protected] on 24 Jan 2013 at 1:47

@GoogleCodeExporter
Copy link
Author

@@ -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 [email protected] on 12 Mar 2013 at 7:18

@GoogleCodeExporter
Copy link
Author

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 [email protected] on 25 Mar 2013 at 4:41

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant