Referenced from: ./rex_posix.so
Expected in: dynamic lookup
stack traceback:
[C]: at 0x7fff04caa140
[C]: in function 'require'
main.lua:2: in function 'load'
[string "boot.lua"]:418: in function <[string "boot.lua"]:413>
[C]: in function 'xpcall'
Basically your .so is not in the search directory, LÖVE expects to find binary modules in two locations, the AppData folder, or next to the love binary (I'm not sure how this is done in MacOSX, you may need to open the love.app and find the correct location, not sure)
for i, person inipairs(everybody) do [tab]ifnot person.obey then person:setObey(true) end end
love.system.openURL(github.com/pablomayobre)
Basically your .so is not in the search directory, LÖVE expects to find binary modules in two locations, the Save Directory folder, or next to the love binary (I'm not sure how this is done in MacOSX, you may need to open the love.app and find the correct location, not sure)
love.load = function ()
if not love.filesystem.isFile("rex_posix.so") then
--Note that I moved the file to a folder called lib next to your main.lua
local orig = love.filesystem.newFile("lib/rex_posix.so", "r")
local copy = love.filesystem.newFile("rex_posix.so", "w")
copy:write(orig:read())
end
end
for i, person inipairs(everybody) do [tab]ifnot person.obey then person:setObey(true) end end
love.system.openURL(github.com/pablomayobre)
Error: main.lua:2: module 'rex_posix' not found:
no field package.preload['rex_posix']
no file 'rex_posix.lua' in LOVE game directories.
no file 'rex_posix/init.lua' in LOVE game directories.
no file 'rex_posix.so' in LOVE paths.
no file './rex_posix.lua'
no file '/usr/local/share/luajit-2.0.3/rex_posix.lua'
no file '/usr/local/share/lua/5.1/rex_posix.lua'
no file '/usr/local/share/lua/5.1/rex_posix/init.lua'
no file './rex_posix.so'
no file '/usr/local/lib/lua/5.1/rex_posix.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
[C]: in function 'require'
main.lua:2: in function 'load'
[string "boot.lua"]:418: in function <[string "boot.lua"]:413>
[C]: in function 'xpcall'
And the error I get otherwise (I didn't paste the whole error earlier):
Error: error loading module 'lib/rex_posix' from file './lib/rex_posix.so':
dlopen(./lib/rex_posix.so, 6): Symbol not found: _luaL_len
Referenced from: ./lib/rex_posix.so
Expected in: dynamic lookup
stack traceback:
[C]: at 0x7fff04caa140
[C]: in function 'require'
main.lua:2: in function 'load'
[string "boot.lua"]:418: in function <[string "boot.lua"]:413>
[C]: in function 'xpcall'
Note that if I launch the lua interpreter and require('lib/rex_posix'), it works.
And only now did you finally post the full error, leading to a very clear solution. This library you're using is not compatible with lua 5.1/luajit. Note that this doesn't mean it can't be compiled to be compatible, it just isn't right now.
bartbes wrote:And only now did you finally post the full error, leading to a very clear solution. This library you're using is not compatible with lua 5.1/luajit. Note that this doesn't mean it can't be compiled to be compatible, it just isn't right now.
Yeah sorry, I messed up the copy-past in my first post