lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Tue, Jan 26, 2021 at 8:11 PM Russell Haley <russ.haley@gmail.com> wrote:
Oh, for the love of Pete!

starfish@linux-dev-2:~/starfishIUPGui/cmake-build-debug/lua-5.4$ ./lua-debug
Lua 5.4.0  Copyright (C) 1994-2020 Lua.org, PUC-Rio
> require 'lfs'
error loading module 'lfs' from file './lfs.so':
./lfs.so: undefined symbol: lua_newuserdata
stack traceback:
[C]: in ?
[C]: in function 'require'
stdin:1: in main chunk
[C]: in ?
>

Any ideas? I would think this should have failed to build if lua_newuserdata was really missing?

Because lfs.so was built for an earlier version of Lua in which lua_newuserdata was a function. In Lua 5.4, it is now provided as a macro due to the introduction of a variable number of user values, and as such, exists only at compile time now.