Skip to content

C module loading on windows appears to be broken #39

@leso-kn

Description

@leso-kn

Loading native C modules is currently broken on windows as:

  1. The lua library is not present at a location where it can be seen by lua at runtime
  2. lua.exe is linked statically (not against luaxx.dll) causing "multiple lua VMs" in some occasions (e.g. when trying to load luasocket on Lua 5.2)

Example log when trying to load luasocket:

D:/a/luasocket/luasocket/.lua/bin\lua.exe: error loading module 'socket.core' from file 'C:\Users\runneradmin\AppData\Roaming/luarocks/lib/lua/5.2/socket\core.dll':
	The specified module could not be found.


stack traceback:
	[C]: in ?
	[C]: in function 'require'
	...radmin\AppData\Roaming/luarocks/share/lua/5.2/socket.lua:12: in main chunk
	[C]: in function 'require'
	mimetest.lua:1: in main chunk
	[C]: in ?
D:/a/luasocket/luasocket/.lua/bin\lua.exe: error loading module 'socket.core' from file 'C:\Users\runneradmin\AppData\Roaming/luarocks/lib/lua/5.2/socket\core.dll':
	The specified module could not be found.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions