Skip to content

luasocket broken #3

@Simon-L

Description

@Simon-L
[51.296 debug src/Lune.cpp:266 setScript] Loading /home/user/.Rack2/plugins/ModScript/scripts/myosc.lua
[51.296 debug src/Lune.cpp:285 setScript] Content:
config.frameDivider = 1
config.bufferSize = 8

buttonTrig = BooleanTrigger.new()

local socket = require("socket")
local udp = assert(socket.udp())
local data

udp:settimeout(1)

function process(block)
	if buttonTrig:process(block.button) then
		display(package.path)
		display(package.cpath)
	end
end

[51.300 warn src/LuaJITEngine.cpp:186 run] LuaJIT: error loading module 'socket.core' from file '/usr/local/lib/lua/5.1/socket/core.so':
	/usr/local/lib/lua/5.1/socket/core.so: undefined symbol: lua_gettop
[51.300 debug src/LuaJITEngine.cpp:187 run] error loading module 'socket.core' from file '/usr/local/lib/lua/5.1/socket/core.so':
	/usr/local/lib/lua/5.1/socket/core.so: undefined symbol: lua_gettop

Probably related: apache/trafficserver#5158

This calls for a more thorough build setup of LuaJIT and special care about the search paths as the Lua environment used in ModScript should be completely independent from the system. This is will be fixed along with upgrading the LuaJIT version used, including considering to switch to openresty's LuaJIT.

package.path: /home/user/.Rack2/plugins/ModScript/scripts/lib/?.lua;/home/user/.Rack2/plugins/ModScript/scripts/?.lua;/home/user/.Rack2/plugins/ModScript/scripts/lib/?/init.lua;./?.lua;/home/user/dev/ModScript/dep/share/luajit-2.0.5/?.lua;/usr/local/share/lua/5.1/?.lua;/usr/local/share/lua/5.1/?/init.lua;/home/user/dev/ModScript/dep/share/lua/5.1/?.lua;/home/user/dev/ModScript/dep/share/lua/5.1/?/init.lua
package.cpath: ./?.so;/usr/local/lib/lua/5.1/?.so;/home/user/dev/ModScript/dep/lib/lua/5.1/?.so;/usr/local/lib/lua/5.1/loadall.so

Metadata

Metadata

Assignees

No one assigned

    Labels

    wontfixThis will not be worked on

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions