Testing Syslinux 6.03-pre13 in a BIOS 32-bit VM, boot: vesa.c32 Undef symbol FAIL: luaL_checklstring Failed to load COM32 file vesa.c32 boot: Is there a Lua-related issue? Is vesa.c32 expecting some kind of argument? TIA, Ady.
H. Peter Anvin
2014-Jun-03 16:09 UTC
[syslinux] Undef symbol FAIL: luaL_checklstring in vesa.c32
On 06/03/2014 02:59 AM, Ady wrote:> Testing Syslinux 6.03-pre13 in a BIOS 32-bit VM, > boot: vesa.c32 > Undef symbol FAIL: luaL_checklstring > Failed to load COM32 file vesa.c32 > boot: > > Is there a Lua-related issue? > > Is vesa.c32 expecting some kind of argument? >luaL_checklstring should be found in liblua.c32. Are you perhaps missing the latter? I didn't realize how many modules there are in Lua, and quite frankly not all of them are very well named in the sense that it is clear that they are Lua-related. vesa.c32 is one of those - it is one of several Lua modules. -hpa
Ferenc Wagner
2014-Jun-03 17:22 UTC
[syslinux] Undef symbol FAIL: luaL_checklstring in vesa.c32
"H. Peter Anvin" <hpa at zytor.com> writes:> On 06/03/2014 02:59 AM, Ady wrote: > >> Testing Syslinux 6.03-pre13 in a BIOS 32-bit VM, >> boot: vesa.c32 >> Undef symbol FAIL: luaL_checklstring >> Failed to load COM32 file vesa.c32 >> boot: >> >> Is there a Lua-related issue? >> >> Is vesa.c32 expecting some kind of argument? > > luaL_checklstring should be found in liblua.c32. Are you perhaps > missing the latter?Vesa.c32 is not an executable module, but a dynamically loaded binary Lua module, to be require()d. However, the Syslinux module system does not make this distinction, so it happily tries to execute it. Also, the build system is not really prepared for this (and my linker fu is rather weak). For example its ELF headers show the need for libcom32.c32, which is probably also superfluous, as the Lua interpreter (lua.c32) provides that as well (just like luaL_checklstring via liblua.c32).> I didn't realize how many modules there are in Lua, and quite frankly > not all of them are very well named in the sense that it is clear that > they are Lua-related. vesa.c32 is one of those - it is one of several > Lua modules.Their names appear in Lua code, like eg. require "vesa", so it's not arbitrary, but the file names can be prefixed transparently. Currently (with /extlinux as install path and PATH /lua specified in the config):> print (package.cpath)/lua/?.c32;/lua/?/init.c32;/extlinux/?.c32;/extlinux/?/init.c32;./?.c32 The question marks above are replaced by the argument of require(). This variable is preset by setpath() at com32/lua/src/loadlib.c:674, where some string could be inserted before the question marks, or LUA_CPATH_DEFAULT (in luaconf.h) could be set to _lua.c32 instead of simply .c32 to have some extra suffix. -- Regards, Feri.
> On 06/03/2014 02:59 AM, Ady wrote: > > Testing Syslinux 6.03-pre13 in a BIOS 32-bit VM, > > boot: vesa.c32 > > Undef symbol FAIL: luaL_checklstring > > Failed to load COM32 file vesa.c32 > > boot: > > > > Is there a Lua-related issue? > > > > Is vesa.c32 expecting some kind of argument? > > > > luaL_checklstring should be found in liblua.c32. Are you perhaps > missing the latter?I have the complete set of binary files from the BIOS tree, all together in "/" where SYSLINUX is installed (CWD).> > I didn't realize how many modules there are in Lua, and quite frankly > not all of them are very well named in the sense that it is clear that > they are Lua-related. vesa.c32 is one of those - it is one of several > Lua modules. > > -hpaYes, there are several Lua-related modules, including vesa.c32. If this information is relevant, I might try to add it to the wiki by the time 6.03 stable gets out. What I do not know is whether this "luaL_checklstring" problem is related to the Lua code in Syslinux (based on Lua v.5.2.3) with potential influence on additional modules / scripts, or instead is only related to vesa.c32 in particular. Perhaps reviewing this matter could potentially help with other Lua-related modules / code in Syslinux. FWIW, searching for "luaL_checklstring" throughout the Syslinux source code, I can see it is present in several modules. It is also mentioned in "./com32/lua/doc/manual.html". Perhaps Ferenc Wagner (Feri) might have something to add (for instance, http://www.syslinux.org/archives/2014-May/022067.html ). TIA, Ady.