2

I am a new user to TORCH LDT. I have trouble loading module 'libpaths' (on Ubuntu). The error log is:

Exception in thread "main" com.naef.jnlua.LuaRuntimeException: error loading module 'libpaths' from file '/usr/local/lib/lua/5.1/libpaths.so': /usr/local/lib/lua/5.1/libpaths.so: undefined symbol: lua_gettop at com.naef.jnlua.LuaState.lua_pcall(Native Method) at com.naef.jnlua.LuaState.call(LuaState.java:555) at org.eclipse.koneki.ldt.support.lua51.internal.interpreter.JNLua51Launcher.run(JNLua51Launcher.java:128) at org.eclipse.koneki.ldt.support.lua51.internal.interpreter.JNLua51DebugLauncher.main(JNLua51DebugLauncher.java:24)

What might be the problem? Thanks in advance!

1 Answer 1

2

This is how to configure torch + eclipse:

1) Configure the Lua interpreter with torch:

Go to Windows -> Preference -> Lua -> interpreter:

  • Interpreter Type : Lua 5.2

  • Interpreter executable : /opt/torch/install/bin/qlua (-> this is required to use qt features)

  • Interpreter name : Qt + Torch Interpreter arguments : -lenv -e "io.stdout:setvbuf('no'); if os.getenv('DEBUG_MODE') then require 'debugger' ; require 'debugger.plugins.ffi'end"

  • LinkedExecution argument : Lua 5.2

2) Pick this interpreter as a default interpreter

3) Also Working with an external interpreter, require that "LuaSocket" packet is installed, You will get a message error of "libsocket.so not found" when debugging if it is not installed

To install LuaSocket, you may try :

sudo luarocks install luasocket --only-server=http://luarocks.org/repositories/rocks-scm

or

sudo luarocks install luasocket

or

luarocks install luasocket

Credits to STRUB Floriab

Sign up to request clarification or add additional context in comments.

3 Comments

This link may help you to set Lua Interpreter
Thanks for your detailed reply! However, I tried, and it doesn't help. I only change the interpreter executable step:/opt/torch/ by changing to the location of torch folder. It still shows the same error log. Thx!
Have you kept the same path that you get by doing 'which qlua' in terminal, in interpreter executable, also did you install luasocket?, which ubuntu version are you using?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.