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

WSL下使用make_android_lua54.sh编译失败,NDK=r23b #1172

Open
Run0812 opened this issue Nov 9, 2024 · 1 comment
Open

WSL下使用make_android_lua54.sh编译失败,NDK=r23b #1172

Run0812 opened this issue Nov 9, 2024 · 1 comment

Comments

@Run0812
Copy link

Run0812 commented Nov 9, 2024

lmathlib.c中使用了log2函数,需要在Android API >= 18的情况下 libm.so中才存在此符号
但是make_android_lua54.sh中是指定了API等级 android-18

也许是我使用的NDK版本的cmake参数不支持ANDROID_NATIVE_API_LEVEL了?
个人的解决方法是多传一个 -DANDROID_PLATFORM=${API} 来指定API等级

[ 2%] Linking C shared library libxlua.so
ld: error: undefined symbol: log2

referenced by lmathlib.c
CMakeFiles/xlua.dir/lua-5.4.1/src/lmathlib.c.o:(math_log)
did you mean: logb
defined in: /home/myname/android-ndk-r23b/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/arm-linux-androideabi/16/libm.so
clang: error: linker command failed with exit code 1 (use -v to see invocation)

@chexiongsheng
Copy link
Collaborator

我用r21b

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

2 participants