无法在 osx yosemite 上制作枪图。未定义的符号
Cannot make gunplot on osx yosemite. Undefined symbols
我尝试在 osx yosemite(10.10.4) 下制作枪图 5.0.0,但出现错误:
$ make
/Applications/Xcode.app/Contents/Developer/usr/bin/make all-recursive
Making all in config
make[2]: Nothing to be done for `all'.
Making all in m4
make[2]: Nothing to be done for `all'.
Making all in term
make[2]: Nothing to be done for `all'.
Making all in src
/Applications/Xcode.app/Contents/Developer/usr/bin/make all-recursive
Making all in wxterminal
make[4]: Nothing to be done for `all'.
Making all in qtterminal
make[4]: Nothing to be done for `all'.
c++ -g -O2 -o gnuplot alloc.o axis.o breaders.o boundary.o color.o command.o contour.o datablock.o datafile.o dynarray.o eval.o external.o fit.o gadgets.o getcolor.o graph3d.o graphics.o help.o hidden3d.o history.o internal.o interpol.o libcerf.o matrix.o misc.o mouse.o multiplot.o parse.o plot.o plot2d.o plot3d.o pm3d.o readline.o save.o scanner.o set.o show.o specfun.o standard.o stats.o stdfn.o tables.o tabulate.o term.o time.o unset.o util.o util3d.o variable.o version.o -lreadline -lncurses -lz -llua -liconv
Undefined symbols for architecture x86_64:
"_luaL_checkint", referenced from:
_LUA_GP_int_error in term.o
_LUA_GP_int_warn in term.o
(maybe you meant: _luaL_checkinteger)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[4]: *** [gnuplot] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
似乎与 lua 有关。这是我的 lua 环境:
$ lua -v
Lua 5.3.0 Copyright (C) 1994-2015 Lua.org, PUC-Rio
我不明白 make 的输出,请帮忙!
您正在编译的 module/application 似乎不是 Lua 5.3-compatible。它使用 luaL_checkint
,但 Lua 5.3 使用 luaL_checkinteger
。您需要更新模块或使用兼容性开关 LUA_COMPAT_APIINTCASTS
(LUA_COMPAT_5_2
应该可以正常工作,因为它包含 LUA_COMPAT_APIINTCASTS
)。
我在使用 macports 并尝试编译 gnuplot(作为 latex2rtf 的依赖项)时遇到了同样的问题。最后修复相对简单...
在我需要的 gnuplot 版本 (gnuplot-5.0.1) 中,在术语文件夹中的 lua.trm 文件中有两个对 luaL_checkint 的引用:
./term/lua.trm: t_num = luaL_checkint(L, 1);
./term/lua.trm: t_num = luaL_checkint(L, 1);
./term/lua.trm: token_cnt = luaL_checkinteger(L, 1);
将 luaL_checkint 更改为 luaL_checkinteger 就成功了。有关此兼容性问题背后的原因,请参阅 Paul Kulchenko 的回答。
我尝试在 osx yosemite(10.10.4) 下制作枪图 5.0.0,但出现错误:
$ make
/Applications/Xcode.app/Contents/Developer/usr/bin/make all-recursive
Making all in config
make[2]: Nothing to be done for `all'.
Making all in m4
make[2]: Nothing to be done for `all'.
Making all in term
make[2]: Nothing to be done for `all'.
Making all in src
/Applications/Xcode.app/Contents/Developer/usr/bin/make all-recursive
Making all in wxterminal
make[4]: Nothing to be done for `all'.
Making all in qtterminal
make[4]: Nothing to be done for `all'.
c++ -g -O2 -o gnuplot alloc.o axis.o breaders.o boundary.o color.o command.o contour.o datablock.o datafile.o dynarray.o eval.o external.o fit.o gadgets.o getcolor.o graph3d.o graphics.o help.o hidden3d.o history.o internal.o interpol.o libcerf.o matrix.o misc.o mouse.o multiplot.o parse.o plot.o plot2d.o plot3d.o pm3d.o readline.o save.o scanner.o set.o show.o specfun.o standard.o stats.o stdfn.o tables.o tabulate.o term.o time.o unset.o util.o util3d.o variable.o version.o -lreadline -lncurses -lz -llua -liconv
Undefined symbols for architecture x86_64:
"_luaL_checkint", referenced from:
_LUA_GP_int_error in term.o
_LUA_GP_int_warn in term.o
(maybe you meant: _luaL_checkinteger)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[4]: *** [gnuplot] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
似乎与 lua 有关。这是我的 lua 环境:
$ lua -v
Lua 5.3.0 Copyright (C) 1994-2015 Lua.org, PUC-Rio
我不明白 make 的输出,请帮忙!
您正在编译的 module/application 似乎不是 Lua 5.3-compatible。它使用 luaL_checkint
,但 Lua 5.3 使用 luaL_checkinteger
。您需要更新模块或使用兼容性开关 LUA_COMPAT_APIINTCASTS
(LUA_COMPAT_5_2
应该可以正常工作,因为它包含 LUA_COMPAT_APIINTCASTS
)。
我在使用 macports 并尝试编译 gnuplot(作为 latex2rtf 的依赖项)时遇到了同样的问题。最后修复相对简单...
在我需要的 gnuplot 版本 (gnuplot-5.0.1) 中,在术语文件夹中的 lua.trm 文件中有两个对 luaL_checkint 的引用:
./term/lua.trm: t_num = luaL_checkint(L, 1);
./term/lua.trm: t_num = luaL_checkint(L, 1);
./term/lua.trm: token_cnt = luaL_checkinteger(L, 1);
将 luaL_checkint 更改为 luaL_checkinteger 就成功了。有关此兼容性问题背后的原因,请参阅 Paul Kulchenko 的回答。