Re: [vim/vim] patch 8.2.1054: not so easy to pass a lua function to Vim (801ab06)

5 views
Skip to first unread message

lacygoill

unread,
Jun 25, 2020, 2:37:29 PM6/25/20
to vim/vim, Subscribed

This commit breaks Vim's compilation when enabling the lua interface with --enable-luainterp=dynamic. The compiler complains about an undefined reference to luaL_ref:

/home/user/Vcs/vim/src/if_lua.c:622: undefined reference to `luaL_ref'
/home/user/Vcs/vim/src/if_lua.c:627: undefined reference to `luaL_ref'
/home/user/Vcs/vim/src/if_lua.c:610: undefined reference to `luaL_ref'
objects/if_lua.o: In function `luaV_call_lua_func_free':
/home/user/Vcs/vim/src/if_lua.c:2510: undefined reference to `luaL_unref'
/home/user/Vcs/vim/src/if_lua.c:2513: undefined reference to `luaL_unref'
collect2: error: ld returned 1 exit status
link.sh: Linking failed
Makefile:2132: recipe for target 'vim' failed
make[1]: *** [vim] Error 1
make[1]: Leaving directory '/home/user/Vcs/vim/src'
Makefile:26: recipe for target 'first' failed
make: *** [first] Error 2


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

Bram Moolenaar

unread,
Jun 25, 2020, 2:58:27 PM6/25/20
to vim...@googlegroups.com, lacygoill

> This commit breaks Vim's compilation when enabling the lua interface with `--enable-luainterp=dynamic`. The compiler complains about an undefined reference to `luaL_ref`:
>
> /home/user/Vcs/vim/src/if_lua.c:622: undefined reference to `luaL_ref'
> /home/user/Vcs/vim/src/if_lua.c:627: undefined reference to `luaL_ref'
> /home/user/Vcs/vim/src/if_lua.c:610: undefined reference to `luaL_ref'
> objects/if_lua.o: In function `luaV_call_lua_func_free':
> /home/user/Vcs/vim/src/if_lua.c:2510: undefined reference to `luaL_unref'
> /home/user/Vcs/vim/src/if_lua.c:2513: undefined reference to `luaL_unref'
> collect2: error: ld returned 1 exit status
> link.sh: Linking failed
> Makefile:2132: recipe for target 'vim' failed
> make[1]: *** [vim] Error 1
> make[1]: Leaving directory '/home/user/Vcs/vim/src'
> Makefile:26: recipe for target 'first' failed
> make: *** [first] Error 2

I guessed the types for these functions. It works for me, but I don't
know about other Lua versions. Please check the next patch.

--
If an elephant is left tied to a parking meter, the parking fee has to be paid
just as it would for a vehicle.
[real standing law in Florida, United States of America]

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages