0

I have install limlib2 and everything and I've checked the directories to see if it's existent, and limlib2 is there. I compile some lua code that uses

    require("limlib2")

I receive this error:

lua: error loading module 'limlib2' from file '/usr/local/lib/lua/5.3/limlib2.so': dlopen(/usr/local/lib/lua/5.3/limlib2.so, 6): Symbol not found: _luaL_checkint Referenced from: /usr/local/lib/lua/5.3/limlib2.so Expected in: flat namespace in /usr/local/lib/lua/5.3/limlib2.so stack traceback: [C]: in ? [C]: in function 'require' imgpxl.lua:1: in main chunk [C]: in ?

Any help? I don't understand what's going on.

Adam G.
  • 107
  • 1
  • 8
  • Where did you get `limlib2.so` from? It appears (as per Piglet's comment) to have been built for lua 5.2 but you have installed it for use with lua 5.3. – Etan Reisner Jun 01 '16 at 14:35

1 Answers1

0

limlib2 is referencing _luaL_checkint which fails in Lua 5.3 as _luaL_checkint has been replaced by _luaL_checkinteger in Lua 5.2

_luaL_checkint is deprecated. Just google for _luaL_checkint to find plenty of workarounds.

Checkout this: Cannot make gunplot on osx yosemite. Undefined symbols

imlib2 seems to haven't been updated in over 8 years. So no wonder you're facing problems

Community
  • 1
  • 1
Piglet
  • 27,501
  • 3
  • 20
  • 43
  • Thanks! Also just a question, I'm finding that i need some #define statements, would I have to edit that in the module (c code) itself? – Adam G. Jun 01 '16 at 14:28
  • yes. the problem is in the c code so you have to fix it there. – Piglet Jun 01 '16 at 14:32
  • Where is the c code that i can edit, all i seem to have is the library file (.so) – Adam G. Jun 01 '16 at 14:35
  • source should be linked here. It's the authors website. contact him and ask him to update his repository – Piglet Jun 01 '16 at 14:38
  • I've installed the library using luarocks, would it be possible to fork the repository and edit and then install somehow? – Adam G. Jun 01 '16 at 14:52