Tencent / xLua

xLua is a lua programming solution for C# ( Unity, .Net, Mono) , it supports android, ios, windows, linux, osx, etc.
Other
9.33k stars 2.45k forks source link

关于在Mac上执行make_android_luajit.sh编译时的报错 #712

Open Venbb opened 4 years ago

Venbb commented 4 years ago

"_strtoul", referenced from: _luaO_str2d in minilua.o _luaB_tonumber in minilua.o "_ungetc", referenced from: _luaL_loadfile in minilua.o _g_read in minilua.o ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[1]: [host/minilua] Error 1 make: [default] Error 2 CMake Deprecation Warning at /Applications/CMake.app/Contents/share/cmake-3.17/Modules/CMakeForceCompiler.cmake:75 (message): The CMAKE_FORCE_C_COMPILER macro is deprecated. Instead just set CMAKE_C_COMPILER and allow CMake to identify the compiler. Call Stack (most recent call first): cmake/android.toolchain.cmake:1177 (CMAKE_FORCE_C_COMPILER) /Applications/CMake.app/Contents/share/cmake-3.17/Modules/CMakeDetermineSystem.cmake:90 (include) CMakeLists.txt:16 (project)

CMake Deprecation Warning at /Applications/CMake.app/Contents/share/cmake-3.17/Modules/CMakeForceCompiler.cmake:89 (message): The CMAKE_FORCE_CXX_COMPILER macro is deprecated. Instead just set CMAKE_CXX_COMPILER and allow CMake to identify the compiler. Call Stack (most recent call first): cmake/android.toolchain.cmake:1189 (CMAKE_FORCE_CXX_COMPILER) /Applications/CMake.app/Contents/share/cmake-3.17/Modules/CMakeDetermineSystem.cmake:90 (include) CMakeLists.txt:16 (project)

-- Configuring done -- Generating done -- Build files have been written to: /Users/Venbb/Desktop/xLua-master/build/build_lj_x86 Scanning dependencies of target xlua [ 6%] Building C object CMakeFiles/xlua.dir/luasocket/auxiliar.c.o [ 12%] Building C object CMakeFiles/xlua.dir/luasocket/buffer.c.o [ 18%] Building C object CMakeFiles/xlua.dir/luasocket/except.c.o [ 25%] Building C object CMakeFiles/xlua.dir/luasocket/inet.c.o [ 31%] Building C object CMakeFiles/xlua.dir/luasocket/io.c.o [ 37%] Building C object CMakeFiles/xlua.dir/luasocket/luasocket.c.o [ 43%] Building C object CMakeFiles/xlua.dir/luasocket/mime.c.o [ 50%] Building C object CMakeFiles/xlua.dir/luasocket/options.c.o [ 56%] Building C object CMakeFiles/xlua.dir/luasocket/select.c.o [ 62%] Building C object CMakeFiles/xlua.dir/luasocket/tcp.c.o [ 68%] Building C object CMakeFiles/xlua.dir/luasocket/timeout.c.o [ 75%] Building C object CMakeFiles/xlua.dir/luasocket/udp.c.o [ 81%] Building C object CMakeFiles/xlua.dir/luasocket/usocket.c.o [ 87%] Building C object CMakeFiles/xlua.dir/i64lib.c.o [ 93%] Building C object CMakeFiles/xlua.dir/xlua.c.o make[2]: No rule to make target ../luajit-2.1.0b3/src/libluajit.a', needed bylibxlua.so'. Stop. make[1]: [CMakeFiles/xlua.dir/all] Error 2 make: *** [all] Error 2 cp: build_lj_x86/libxlua.so: No such file or directory wenbiaodeMacBook-Pro:build Venbb$

Mac 系统版本:macOs Catalina 10.15.3 Xcode版本:Version 11.3.1 (11C504) 错误: ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation) 是因为Xcode版本问题导致没法编译码?

其他lua5.3和luajit版本的.sh都能顺利编译。

执行make_android_luajit_arm64.sh也会有这个错误。

make_android_luajit_arm64.sh和make_android_luajit.sh分别都是依赖哪个NDK的库?

chexiongsheng commented 4 years ago

应该是新版本的xcode不支持32位程序所致。而luajit armv7的编译又需要先编译个32位的lua可执行程序。 建议你用linux编译。