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

您好,请教个问题,在执行./build_android.sh编译时报如下错误,ndk版本与您脚本中相同r9 #1

Open
MarkLi2011 opened this issue Oct 9, 2016 · 2 comments

Comments

@MarkLi2011
Copy link

Host system 'darwin-x86_64' is not supported by the source NDK!
Try --system= with one of: windows-x86_64
Host system 'darwin-x86_64' is not supported by the source NDK!
Try --system= with one of: windows-x86_64
CMake Error at toolchain/android.toolchain.cmake:562 (message):
Could not find neither Android NDK nor Android standalone toolchain.

  You should either set an environment variable:
    export ANDROID_NDK=~/my-android-ndk
  or
    export ANDROID_STANDALONE_TOOLCHAIN=~/my-android-toolchain
  or put the toolchain or NDK in the default path:
    sudo ln -s ~/my-android-ndk /opt/android-ndk
    sudo ln -s ~/my-android-toolchain /opt/android-toolchain

Call Stack (most recent call first):
/usr/share/cmake-3.3.2/Modules/CMakeDetermineSystem.cmake:95 (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: /Box2D-cocos2d-x-master/Box2D/build.android/CMakeFiles/3.3.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: /Box2D-cocos2d-x-master/Box2D/build.android/CMakeFiles/3.3.2/CMakeCXXCompiler.cmake
CMake Error in :
No CMAKE_C_COMPILER could be found.

Tell CMake where to find the compiler by setting 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 in :
No CMAKE_CXX_COMPILER could be found.

Tell CMake where to find the compiler by setting 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.

CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
make: *** 没有指明目标并且找不到 makefile。 停止。
CMake Error at toolchain/android.toolchain.cmake:562 (message):
Could not find neither Android NDK nor Android standalone toolchain.

  You should either set an environment variable:
    export ANDROID_NDK=~/my-android-ndk
  or
    export ANDROID_STANDALONE_TOOLCHAIN=~/my-android-toolchain
  or put the toolchain or NDK in the default path:
    sudo ln -s ~/my-android-ndk /opt/android-ndk
    sudo ln -s ~/my-android-toolchain /opt/android-toolchain

Call Stack (most recent call first):
/usr/share/cmake-3.3.2/Modules/CMakeDetermineSystem.cmake:95 (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: /Box2D-cocos2d-x-master/Box2D/build.android/CMakeFiles/3.3.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: /Box2D-cocos2d-x-master/Box2D/build.android/CMakeFiles/3.3.2/CMakeCXXCompiler.cmake
CMake Error in :
No CMAKE_C_COMPILER could be found.

Tell CMake where to find the compiler by setting 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 in :
No CMAKE_CXX_COMPILER could be found.

Tell CMake where to find the compiler by setting 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.

CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
make: *** 没有指明目标并且找不到 makefile。 停止。
CMake Error at toolchain/android.toolchain.cmake:562 (message):
Could not find neither Android NDK nor Android standalone toolchain.

  You should either set an environment variable:
    export ANDROID_NDK=~/my-android-ndk
  or
    export ANDROID_STANDALONE_TOOLCHAIN=~/my-android-toolchain
  or put the toolchain or NDK in the default path:
    sudo ln -s ~/my-android-ndk /opt/android-ndk
    sudo ln -s ~/my-android-toolchain /opt/android-toolchain

Call Stack (most recent call first):
/usr/share/cmake-3.3.2/Modules/CMakeDetermineSystem.cmake:95 (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: /Box2D-cocos2d-x-master/Box2D/build.android/CMakeFiles/3.3.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: /Box2D-cocos2d-x-master/Box2D/build.android/CMakeFiles/3.3.2/CMakeCXXCompiler.cmake
CMake Error in :
No CMAKE_C_COMPILER could be found.

Tell CMake where to find the compiler by setting 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 in :
No CMAKE_CXX_COMPILER could be found.

Tell CMake where to find the compiler by setting 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.

CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
make: *** 没有指明目标并且找不到 makefile。 停止。
mv: 无法获取'libs/*' 的文件状态(stat): No such file or directory

@MarkLi2011
Copy link
Author

MarkLi2011 commented Oct 9, 2016

好像是ANDROID_STANDALONE_TOOLCHAIN环境导致,这个路径是不是要指向./android-ndk-r9d/toolchains目录?

@MarkLi2011
Copy link
Author

--system参数改为windows-x86_64可以生成对应平台的toolchain,我是在windows下用cygwin64环境编译,这样修改之后暂时还不知道后续编译是否有问题...

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

No branches or pull requests

1 participant