Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Socket.core Linking Error #57

Closed
AlexIzydorczyk opened this issue Jul 10, 2015 · 1 comment
Closed

Socket.core Linking Error #57

AlexIzydorczyk opened this issue Jul 10, 2015 · 1 comment

Comments

@AlexIzydorczyk
Copy link

Hi,

I am attempting to add load the socket library in a Lupa runtime.

I installed socket with Luarocks, so I needed to append the necessary paths.

>>> import lupa
>>> sys.setdlopenflags(orig_dlflags)
>>> lua = lupa.LuaRuntime()
>>> lua.execute("package.cpath = package.cpath .. ';/root/.luarocks/lib/lua/5.3/?.so;/usr/local/lib/lua/5.3/?.so;/usr/local/lib/lua/5.3/loadall.so;./?.so'")
>>> lua.execute("  package.path = package.path .. ';/root/.luarocks/share/lua/5.3/?.lua;/root/.luarocks/share/lua/5.3/?/init.lua;/usr/local/share/lua/5.3/?.lua;/usr/local/share/lua/5.3/?/init.lua;/usr/local/lib/lua/5.3/?.lua;/usr/local/lib/lua/5.3/?/init.lua;./?.lua;./?/init.lua'")
>>> lua.require("socket")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "lupa/_lupa.pyx", line 268, in lupa._lupa.LuaRuntime.require (lupa/_lupa.c:4683)
  File "lupa/_lupa.pyx", line 1245, in lupa._lupa.call_lua (lupa/_lupa.c:17287)
  File "lupa/_lupa.pyx", line 1254, in lupa._lupa.execute_lua_call (lupa/_lupa.c:17400)
  File "lupa/_lupa.pyx", line 1207, in lupa._lupa.raise_lua_error (lupa/_lupa.c:16746)
lupa._lupa.LuaError: error loading module 'socket.core' from file '/usr/local/lib/lua/5.3/socket/core.so':
    /usr/local/lib/lua/5.3/socket/core.so: undefined symbol: lua_rotate

A similar issue is mentioned here but the proposed solution does not seem to work for me (I am running Ubuntu):

http://stackoverflow.com/questions/8361437/linker-error-lunatic-python-lua-requiresocket-undefined-symbol-lua-getme

From my understanding, there is a linking problem to liblua5.3.so?

Any help would be greatly appreciated.

Thanks,
Alex

@scoder
Copy link
Owner

scoder commented Jul 21, 2015

If you managed to fix this problem for you, it would be nice if you could share your solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants