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

使用xmake打包Android armv8-a出现了问题 #64

Closed
bnq4ever opened this issue Mar 31, 2017 · 3 comments
Closed

使用xmake打包Android armv8-a出现了问题 #64

bnq4ever opened this issue Mar 31, 2017 · 3 comments

Comments

@bnq4ever
Copy link

xmake f -p android --ndk=/Volumes/DATA/android-ndk-r13b -a armv8-a
xmake

错误代码如下,请问怎样解决

xmake --verbose
configure
{
ex = "/Volumes/DATA/android-ndk-r13b/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-ar"
, sh = "/Volumes/DATA/android-ndk-r13b/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-g++"
, ndk = "/Volumes/DATA/android-ndk-r13b"
, toolchains_ver = "4.9"
, plat = "android"
, ar = "/Volumes/DATA/android-ndk-r13b/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-ar"
, buildir = "build"
, as = "/Volumes/DATA/android-ndk-r13b/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-gcc"
, toolchains = "/Volumes/DATA/android-ndk-r13b/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin"
, ndk_sdkver = 21
, arch = "armv8-a"
, mode = "release"
, cc = "/Volumes/DATA/android-ndk-r13b/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-gcc"
, xcode_dir = "/Applications/Xcode.app"
, host = "macosx"
, kind = "static"
, cxx = "/Volumes/DATA/android-ndk-r13b/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-g++"
, ccache = false
, clean = true
, ld = "/Volumes/DATA/android-ndk-r13b/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-g++"
}
[00%]: compiling.release PedestrianStateW/EscalatorDetect.cpp
/Volumes/DATA/android-ndk-r13b/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-g++ -c -I/Volumes/DATA/android-ndk-r13b/sources/cxx-stl/gnu-libstdc++/4.9/include -I/Volumes/DATA/android-ndk-r13b/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v8a/include -march=armv8-a -mthumb --sysroot=/Volumes/DATA/android-ndk-r13b/platforms/android-21/arch-arm -o build/.objs/PedestrianStateW/PedestrianStateW/EscalatorDetect.cpp.o PedestrianStateW/EscalatorDetect.cpp
/usr/local/Cellar/xmake/2.1.2/share/xmake/core/base/os.lua:569: In file included from PedestrianStateW/EscalatorDetect.h:2:0,
from PedestrianStateW/EscalatorDetect.cpp:2:
error: /usr/local/Cellar/xmake/2.1.2/share/xmake/core/base/os.lua:569: /Volumes/DATA/android-ndk-r13b/sources/cxx-stl/gnu-libstdc++/4.9/include/string:38:28: fatal error: bits/c++config.h: No such file or directory
#include <bits/c++config.h>
^
compilation terminated.
stack traceback:
[C]: in function 'error'
[/usr/local/Cellar/xmake/2.1.2/share/xmake/core/base/os.lua:569]: in function 'raise'
[...llar/xmake/2.1.2/share/xmake/core/sandbox/modules/os.lua:256]: in function 'iorun'
[/usr/local/Cellar/xmake/2.1.2/share/xmake/tools/gcc.lua:297]:
stack traceback:
[C]: in function 'error'
[/usr/local/Cellar/xmake/2.1.2/share/xmake/core/base/os.lua:569]: in function 'raise'
[...llar/xmake/2.1.2/share/xmake/core/sandbox/modules/os.lua:393]: in function 'raise'
[...ake/2.1.2/share/xmake/core/sandbox/modules/coroutine.lua:59]: in function 'resume'
[...r/xmake/2.1.2/share/xmake/actions/build/kinds/object.lua:194]: in function '_build_each_objects'
[...r/xmake/2.1.2/share/xmake/actions/build/kinds/object.lua:323]: in function 'build'
[...r/xmake/2.1.2/share/xmake/actions/build/kinds/static.lua:35]: in function '_build_from_objects'
[...r/xmake/2.1.2/share/xmake/actions/build/kinds/static.lua:132]: in function 'build'
[...Cellar/xmake/2.1.2/share/xmake/actions/build/builder.lua:37]: in function 'script'
[...Cellar/xmake/2.1.2/share/xmake/actions/build/builder.lua:55]: in function '_build_target'
[...Cellar/xmake/2.1.2/share/xmake/actions/build/builder.lua:77]: in function '_build_target_and_deps'
[...Cellar/xmake/2.1.2/share/xmake/actions/build/builder.lua:146]: in function 'build'
[...al/Cellar/xmake/2.1.2/share/xmake/actions/build/main.lua:73]:

@waruqi
Copy link
Member

waruqi commented Mar 31, 2017

你是要编译 android arm64版本的程序吗,如果编译arm64,可以使用:xmake f -a arm64-v8a

armv8-a这个架构目前android的ndk提供的不是很完整,缺少部分头文件,而且链接器支持力度也不够,我打算过段时间把它去掉了。

如果你是编译32bits的版本,建议使用默认架构,或者手动设置armv7-a

@waruqi
Copy link
Member

waruqi commented Mar 31, 2017

已经修复这个问题,我这之前的ndk版本太老,所以链接器支持有点问题,更新ndk后,我修了下那个头文件问题,你可以更新下master的版本,再试下。。

@bnq4ever
Copy link
Author

bnq4ever commented Apr 1, 2017

好的,谢谢,我更新看看

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

2 participants