I can't get the Lua interface to compile using a current checkout of Vim from
hg and Lua's 5.0.3 version. I downloaded and compiled Lua from source.
Unfortunately, I don't exactly understand why it fails. Several global
definitions seem to be out of scope in if_lua.c, but I have no idea where
they're supposed to come from in the first place.
Having installed Lua 5.0.3, into $HOME/local/lua, using gcc 4.4.5, these are the
commands I used:
% make clean
[…]
% ./configure --with-lua-prefix=$HOME/local/lua --enable-luainterp=yes|grep lua
checking --enable-luainterp argument... yes
checking --with-lua-prefix argument... /home/adimit/local/lua
checking if lua.h can be found in /home/adimit/local/lua/include... yes
% make
[…]
gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK -pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -g -O2 -D_FORTIFY_SOURCE=1 -I/home/adimit/local/lua/include -o objects/if_lua.o if_lua.c
if_lua.c: In function 'luaV_pushtypval':
if_lua.c:359: error: 'LUA_ENVIRONINDEX' undeclared (first use in this function)
if_lua.c:359: error: (Each undeclared identifier is reported only once
if_lua.c:359: error: for each function it appears in.)
if_lua.c: In function 'luaV_toline':
if_lua.c:448: warning: initialization makes pointer from integer without a cast
if_lua.c: In function 'luaV_msgfunc':
if_lua.c:464: warning: initialization makes pointer from integer without a cast
if_lua.c:469: warning: assignment makes pointer from integer without a cast
if_lua.c: In function 'luaV_newbuffer':
if_lua.c:492: error: 'LUA_ENVIRONINDEX' undeclared (first use in this function)
if_lua.c: In function 'luaV_pushbuffer':
if_lua.c:511: error: 'LUA_ENVIRONINDEX' undeclared (first use in this function)
if_lua.c: In function 'luaV_buffer_isvalid':
if_lua.c:704: error: 'LUA_ENVIRONINDEX' undeclared (first use in this function)
if_lua.c: At top level:
if_lua.c:709: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'luaV_Buffer_mt'
if_lua.c: In function 'luaV_newwindow':
if_lua.c:732: error: 'LUA_ENVIRONINDEX' undeclared (first use in this function)
if_lua.c: In function 'luaV_pushwindow':
if_lua.c:751: error: 'LUA_ENVIRONINDEX' undeclared (first use in this function)
if_lua.c: In function 'luaV_window_isvalid':
if_lua.c:882: error: 'LUA_ENVIRONINDEX' undeclared (first use in this function)
if_lua.c: At top level:
if_lua.c:887: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'luaV_Window_mt'
if_lua.c: In function 'luaV_print':
if_lua.c:915: warning: assignment makes pointer from integer without a cast
if_lua.c: In function 'luaV_buffer':
if_lua.c:972: warning: initialization makes pointer from integer without a cast
if_lua.c: In function 'luaV_free':
if_lua.c:1049: error: 'LUA_ENVIRONINDEX' undeclared (first use in this function)
if_lua.c: At top level:
if_lua.c:1060: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'luaV_module'
if_lua.c: In function 'luaopen_vim':
if_lua.c:1082: error: 'LUA_ENVIRONINDEX' undeclared (first use in this function)
if_lua.c:1092: error: 'luaV_Buffer_mt' undeclared (first use in this function)
if_lua.c:1094: error: 'luaV_Window_mt' undeclared (first use in this function)
if_lua.c:1095: error: 'luaV_module' undeclared (first use in this function)
if_lua.c: In function 'luaV_newstate':
if_lua.c:1102: warning: initialization makes pointer from integer without a cast
if_lua.c: In function 'ex_luado':
if_lua.c:1198: warning: assignment makes pointer from integer without a cast
make: *** [objects/if_lua.o] Error 1
And that's all she wrote. Unfortunately, I have no idea where to go from here (then
again, it *is* 5 a.m. so maybe I'm overlooking something obvious?)
Regards,
Aleks
PS: It wasn't very easy to see that Vim wants Lua 5.0.3. I did not find it in
any documentation or announcement. In fact, I had to test it out first, and see
the linker yell at me.
Lua is at version 5.1.4, with 5.2 being in beta. 5.0.3 is over 4 years old. Are
there any plans to update it?
No comments:
Post a Comment