Mac 编译安装 Luajit make 时遇到一个错误
1
2
3
4
5
% make
==== Building LuaJIT 2.1.0-beta3 ====
/Library/Developer/CommandLineTools/usr/bin/make -C src
Makefile:320: *** missing: export MACOSX_DEPLOYMENT_TARGET=XX.YY. Stop.
make: *** [default] Error 2
解决方法,点屏幕左上角小苹果,关于本机,查看当前系统的版本
上图是 12.3.1 ,可以如下设定
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
% export MACOSX_DEPLOYMENT_TARGET=12.3
% make
==== Building LuaJIT 2.1.0-beta3 ====
/Library/Developer/CommandLineTools/usr/bin/make -C src
HOSTCC host/minilua.o
HOSTLINK host/minilua
DYNASM host/buildvm_arch.h
HOSTCC host/buildvm.o
HOSTCC host/buildvm_asm.o
HOSTCC host/buildvm_peobj.o
HOSTCC host/buildvm_lib.o
HOSTCC host/buildvm_fold.o
HOSTLINK host/buildvm
BUILDVM lj_vm.S
ASM lj_vm.o
CC lj_assert.o
make 正常
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
% sudo make install
% sudo ln -sf /usr/local/bin/luajit-2.1.0-beta3 /usr/local/bin/luajit
% luajit -h
usage: luajit [options]... [script [args]...].
Available options are:
-e chunk Execute string 'chunk'.
-l name Require library 'name'.
-b ... Save or list bytecode.
-j cmd Perform LuaJIT control command.
-O[opt] Control LuaJIT optimizations.
-i Enter interactive mode after executing 'script'.
-v Show version information.
-E Ignore environment variables.
-- Stop handling options.
- Execute stdin and stop handling options.
LuaJIT — a Just-In-Time Compiler for Lua.
本文网址: https://pylist.com/topic/239.html 转摘请注明来源