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:26 PM Jonathan Goble <jcgoble3@gmail.com> wrote:
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.

Thanks Jonathan. I deleted my system installation of 5.3.6 and suddenly the build fails. ha ha. This error is even more fun than building modules with two vms. I was considering putting that on my resume: "Consistently builds lua modules with at least two vms." I wonder if *anyone* would ever pick up on that?

Thanks Again!
Russ