No LuaRocks module found for qtlua
Gregmayo opened this issue · 3 comments
Hello everybody, I'm trying to run the gabor-layer-demo provided in https://github.com/torch/demos/tree/master/gabor-layer-demo
This is what I get:
MacBook-Air:gabor-layer-demo francescomaiorano$ th -i gabortest.lua
/Users/francescomaiorano/torch/install/bin/luajit: ...cescomaiorano/torch/install/share/lua/5.1/trepl/init.lua:363: module 'qtlua' not found:No LuaRocks module found for qtlua
no field package.preload['qtlua']
no file '/Users/francescomaiorano/.luarocks/share/lua/5.1/qtlua.lua'
no file '/Users/francescomaiorano/.luarocks/share/lua/5.1/qtlua/init.lua'
no file '/Users/francescomaiorano/torch/install/share/lua/5.1/qtlua.lua'
no file '/Users/francescomaiorano/torch/install/share/lua/5.1/qtlua/init.lua'
no file './qtlua.lua'
no file '/Users/francescomaiorano/torch/install/share/luajit-2.1.0-alpha/qtlua.lua'
no file '/usr/local/share/lua/5.1/qtlua.lua'
no file '/usr/local/share/lua/5.1/qtlua/init.lua'
no file '/Users/francescomaiorano/.luarocks/lib/lua/5.1/qtlua.so'
no file '/Users/francescomaiorano/torch/install/lib/lua/5.1/qtlua.so'
no file './qtlua.so'
no file '/usr/local/lib/lua/5.1/qtlua.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
[C]: in function 'error'
...cescomaiorano/torch/install/share/lua/5.1/trepl/init.lua:363: in function 'require'
gabortest.lua:32: in main chunk
[C]: in function 'dofile'
...rano/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:131: in main chunk
[C]: at 0x010b42e2c0
I tried to run: sudo luarocks install qtlua
Installing https://raw.githubusercontent.com/torch/rocks/master/qtlua-scm-1.rockspec...
Using https://raw.githubusercontent.com/torch/rocks/master/qtlua-scm-1.rockspec... switching to 'build' mode
Cloning into 'qtlua'...
remote: Counting objects: 167, done.
remote: Compressing objects: 100% (162/162), done.
remote: Total 167 (delta 11), reused 132 (delta 2), pack-reused 0
Receiving objects: 100% (167/167), 363.27 KiB | 467.00 KiB/s, done.
Resolving deltas: 100% (11/11), done.
Checking connectivity... done.
cmake -E make_directory build && cd build && cmake .. -DCMAKE_BUILD_TYPE=Release -DLUA=/Users/francescomaiorano/torch/install/bin/luajit -DLUA_BINDIR="/Users/francescomaiorano/torch/install/bin" -DLUA_INCDIR="/Users/francescomaiorano/torch/install/include" -DLUA_LIBDIR="/Users/francescomaiorano/torch/install/lib" -DLUADIR="/Users/francescomaiorano/torch/install/lib/luarocks/rocks/qtlua/scm-1/lua" -DLIBDIR="/Users/francescomaiorano/torch/install/lib/luarocks/rocks/qtlua/scm-1/lib" -DCONFDIR="/Users/francescomaiorano/torch/install/lib/luarocks/rocks/qtlua/scm-1/conf" && make
-- The C compiler identification is AppleClang 6.1.0.6020053
-- The CXX compiler identification is AppleClang 6.1.0.6020053
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for Q_WS_X11
-- Looking for Q_WS_X11 - not found
-- Looking for Q_WS_WIN
-- Looking for Q_WS_WIN - not found
-- Looking for Q_WS_QWS
-- Looking for Q_WS_QWS - not found
-- Looking for Q_WS_MAC
-- Looking for Q_WS_MAC - found
-- Looking for QT_MAC_USE_COCOA
-- Looking for QT_MAC_USE_COCOA - found
-- Found Qt4: /usr/local/bin/qmake (found suitable version "4.8.7", minimum required is "4.3.0")
-- Lua: using information from luarocks
-- Lua library guess (no info from luarocks): /Users/francescomaiorano/torch/install/lib/libluajit.dylib
-- Looking for luaJIT_setmode in /Users/francescomaiorano/torch/install/lib/libluajit.dylib
-- Looking for luaJIT_setmode in /Users/francescomaiorano/torch/install/lib/libluajit.dylib - found
-- Lua found /Users/francescomaiorano/torch/install/bin/luajit
-- Found readline library
-- Looking for rl_completion_matches
-- Looking for rl_completion_matches - found
-- Looking for include file fcntl.h
-- Looking for include file fcntl.h - found
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for include file signal.h
-- Looking for include file signal.h - found
-- Looking for include file unistd.h
-- Looking for include file unistd.h - found
-- Looking for include file errno.h
-- Looking for include file errno.h - found
-- Looking for include file sys/select.h
-- Looking for include file sys/select.h - found
-- Looking for include file sys/time.h
-- Looking for include file sys/time.h - found
-- Looking for include file sys/types.h
-- Looking for include file sys/types.h - found
-- Looking for isatty
-- Looking for isatty - found
-- Looking for sigprocmask
-- Looking for sigprocmask - found
-- Looking for sigaction
-- Looking for sigaction - found
-- Looking for signal
-- Looking for signal - found
-- Looking for pthread_sigmask
-- Looking for pthread_sigmask - found
-- Looking for XInitThreads
-- Looking for XInitThreads - not found
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/luarocks_qtlua-scm-1-4397/qtlua/build
[ 1%] Generating moc_qtluaengine.cxx
[ 2%] Generating qtluaengine.moc
Scanning dependencies of target libqtlua
[ 3%] Building CXX object qtlua/CMakeFiles/libqtlua.dir/qtluautils.cpp.o
[ 4%] Building CXX object qtlua/CMakeFiles/libqtlua.dir/qtluaengine.cpp.o
[ 5%] Building CXX object qtlua/CMakeFiles/libqtlua.dir/moc_qtluaengine.cxx.o
Linking CXX shared library libqtlua.dylib
[ 5%] Built target libqtlua
[ 7%] Generating moc_qluaconsole.cxx
[ 8%] Generating qrc_qlua.cxx
[ 9%] Generating qluaapplication.moc
[ 10%] Generating qluaconsole_unix.moc
[ 11%] Generating moc_qluaapplication.cxx
Scanning dependencies of target libqlua
[ 13%] Building CXX object qlua/CMakeFiles/libqlua.dir/qluaapplication.cpp.o
[ 14%] Building CXX object qlua/CMakeFiles/libqlua.dir/qluaconsole_unix.cpp.o
[ 15%] Building CXX object qlua/CMakeFiles/libqlua.dir/moc_qluaapplication.cxx.o
[ 16%] Building CXX object qlua/CMakeFiles/libqlua.dir/qrc_qlua.cxx.o
[ 17%] Building CXX object qlua/CMakeFiles/libqlua.dir/moc_qluaconsole.cxx.o
Linking CXX shared library libqlua.dylib
[ 17%] Built target libqlua
Scanning dependencies of target macqlua
[ 19%] Building CXX object qlua/CMakeFiles/macqlua.dir/qlua.cpp.o
Linking CXX executable macqlua
[ 19%] Built target macqlua
Scanning dependencies of target qlua
[ 20%] Building CXX object qlua/CMakeFiles/qlua.dir/qlua.cpp.o
Linking CXX executable qlua
[ 20%] Built target qlua
Scanning dependencies of target libqtcore
[ 21%] Building CXX object packages/qtcore/CMakeFiles/libqtcore.dir/qtcore.cpp.o
Linking CXX shared module libqtcore.so
[ 21%] Built target libqtcore
[ 22%] Generating moc_qtluagui.cxx
Scanning dependencies of target libqtgui
[ 23%] Building CXX object packages/qtgui/CMakeFiles/libqtgui.dir/qtgui.cpp.o
[ 25%] Building CXX object packages/qtgui/CMakeFiles/libqtgui.dir/qtluagui.cpp.o
[ 26%] Building CXX object packages/qtgui/CMakeFiles/libqtgui.dir/moc_qtluagui.cxx.o
Linking CXX shared module libqtgui.so
[ 26%] Built target libqtgui
[ 27%] Generating moc_qluamode.cxx
[ 28%] Generating qrc_qtide.cxx
[ 29%] Generating ui_qluagotodialog.h
[ 30%] Generating ui_qluafinddialog.h
[ 32%] Generating ui_qluareplacedialog.h
[ 33%] Generating qluatextedit.moc
[ 34%] Generating qluaide.moc
[ 35%] Generating qluamainwindow.moc
[ 36%] Generating qluabrowser.moc
[ 38%] Generating qluaeditor.moc
[ 39%] Generating qluasdimain.moc
[ 40%] Generating qluamdimain.moc
[ 41%] Generating qluamode.moc
[ 42%] Generating qluamode_txt.moc
[ 44%] Generating qluamode_hlp.moc
[ 45%] Generating qluamode_lua.moc
[ 46%] Generating qluamode_c.moc
[ 47%] Generating moc_qluatextedit.cxx
[ 48%] Generating moc_qluaide.cxx
[ 50%] Generating moc_qluamainwindow.cxx
[ 51%] Generating moc_qluabrowser.cxx
[ 52%] Generating moc_qluaeditor.cxx
[ 53%] Generating moc_qluasdimain.cxx
[ 54%] Generating moc_qluamdimain.cxx
Scanning dependencies of target libqtide
[ 55%] Building CXX object packages/qtide/CMakeFiles/libqtide.dir/qtide.cpp.o
[ 57%] Building CXX object packages/qtide/CMakeFiles/libqtide.dir/qluatextedit.cpp.o
[ 58%] Building CXX object packages/qtide/CMakeFiles/libqtide.dir/qluaide.cpp.o
[ 59%] Building CXX object packages/qtide/CMakeFiles/libqtide.dir/qluamainwindow.cpp.o
[ 60%] Building CXX object packages/qtide/CMakeFiles/libqtide.dir/qluabrowser.cpp.o
[ 61%] Building CXX object packages/qtide/CMakeFiles/libqtide.dir/qluaeditor.cpp.o
[ 63%] Building CXX object packages/qtide/CMakeFiles/libqtide.dir/qluasdimain.cpp.o
[ 64%] Building CXX object packages/qtide/CMakeFiles/libqtide.dir/qluamdimain.cpp.o
[ 65%] Building CXX object packages/qtide/CMakeFiles/libqtide.dir/qluamode.cpp.o
[ 66%] Building CXX object packages/qtide/CMakeFiles/libqtide.dir/qluamode_txt.cpp.o
[ 67%] Building CXX object packages/qtide/CMakeFiles/libqtide.dir/qluamode_hlp.cpp.o
[ 69%] Building CXX object packages/qtide/CMakeFiles/libqtide.dir/qluamode_lua.cpp.o
[ 70%] Building CXX object packages/qtide/CMakeFiles/libqtide.dir/qluamode_c.cpp.o
[ 71%] Building CXX object packages/qtide/CMakeFiles/libqtide.dir/qrc_qtide.cxx.o
[ 72%] Building CXX object packages/qtide/CMakeFiles/libqtide.dir/moc_qluatextedit.cxx.o
[ 73%] Building CXX object packages/qtide/CMakeFiles/libqtide.dir/moc_qluaide.cxx.o
[ 75%] Building CXX object packages/qtide/CMakeFiles/libqtide.dir/moc_qluamainwindow.cxx.o
[ 76%] Building CXX object packages/qtide/CMakeFiles/libqtide.dir/moc_qluabrowser.cxx.o
[ 77%] Building CXX object packages/qtide/CMakeFiles/libqtide.dir/moc_qluaeditor.cxx.o
[ 78%] Building CXX object packages/qtide/CMakeFiles/libqtide.dir/moc_qluasdimain.cxx.o
[ 79%] Building CXX object packages/qtide/CMakeFiles/libqtide.dir/moc_qluamdimain.cxx.o
[ 80%] Building CXX object packages/qtide/CMakeFiles/libqtide.dir/moc_qluamode.cxx.o
Linking CXX shared module libqtide.so
[ 80%] Built target libqtide
[ 82%] Generating moc_qtluasvggenerator.cxx
Scanning dependencies of target libqtsvg
[ 83%] Building CXX object packages/qtsvg/CMakeFiles/libqtsvg.dir/qtsvg.cpp.o
[ 84%] Building CXX object packages/qtsvg/CMakeFiles/libqtsvg.dir/qtluasvggenerator.cpp.o
[ 85%] Building CXX object packages/qtsvg/CMakeFiles/libqtsvg.dir/moc_qtluasvggenerator.cxx.o
Linking CXX shared module libqtsvg.so
[ 85%] Built target libqtsvg
Scanning dependencies of target libqtuiloader
[ 86%] Building CXX object packages/qtuiloader/CMakeFiles/libqtuiloader.dir/uiloader.cpp.o
Linking CXX shared module libqtuiloader.so
[ 86%] Built target libqtuiloader
[ 88%] Generating moc_qtlualistener.cxx
[ 89%] Generating qtluapainter.moc
[ 90%] Generating moc_qtluapainter.cxx
[ 91%] Generating moc_qtluaprinter.cxx
Scanning dependencies of target libqtwidget
[ 92%] Building CXX object packages/qtwidget/CMakeFiles/libqtwidget.dir/qtluapainter.cpp.o
[ 94%] Building CXX object packages/qtwidget/CMakeFiles/libqtwidget.dir/qtluaprinter.cpp.o
[ 95%] Building CXX object packages/qtwidget/CMakeFiles/libqtwidget.dir/qtlualistener.cpp.o
[ 96%] Building CXX object packages/qtwidget/CMakeFiles/libqtwidget.dir/qtwidget.cpp.o
[ 97%] Building CXX object packages/qtwidget/CMakeFiles/libqtwidget.dir/moc_qtluapainter.cxx.o
[ 98%] Building CXX object packages/qtwidget/CMakeFiles/libqtwidget.dir/moc_qtluaprinter.cxx.o
[100%] Building CXX object packages/qtwidget/CMakeFiles/libqtwidget.dir/moc_qtlualistener.cxx.o
Linking CXX shared module libqtwidget.so
[100%] Built target libqtwidget
cd build && make install
[ 5%] Built target libqtlua
[ 17%] Built target libqlua
[ 19%] Built target macqlua
[ 20%] Built target qlua
[ 21%] Built target libqtcore
[ 26%] Built target libqtgui
[ 80%] Built target libqtide
[ 85%] Built target libqtsvg
[ 86%] Built target libqtuiloader
[100%] Built target libqtwidget
Install the project...
-- Install configuration: "Release"
-- Installing: /Users/francescomaiorano/torch/install/lib/libqtlua.dylib
-- Installing: /Users/francescomaiorano/torch/install/include/qtlua/qtluaengine.h
-- Installing: /Users/francescomaiorano/torch/install/include/qtlua/qtluautils.h
-- Installing: /Users/francescomaiorano/torch/install/include/qtlua/qtluaconf.h
-- Installing: /Users/francescomaiorano/torch/install/lib/luarocks/rocks/qtlua/scm-1/conf/cmake/QtLuaConfig.cmake
-- Installing: /Users/francescomaiorano/torch/install/lib/libqlua.dylib
-- Installing: /Users/francescomaiorano/torch/install/bin/qlua
-- Installing: /Users/francescomaiorano/torch/install/Info.plist
-- Installing: /Users/francescomaiorano/torch/install/MacOS/macqlua
-- Installing: /Users/francescomaiorano/torch/install/Resources/torch.icns
-- Installing: /Users/francescomaiorano/torch/install/Resources/luadoc.icns
-- Installing: /Users/francescomaiorano/torch/install/bin/macqlua
-- Installing: /Users/francescomaiorano/torch/install/lib/luarocks/rocks/qtlua/scm-1/lua/qtcore/init.lua
-- Installing: /Users/francescomaiorano/torch/install/lib/luarocks/rocks/qtlua/scm-1/lib/libqtcore.so
-- Installing: /Users/francescomaiorano/torch/install/lib/luarocks/rocks/qtlua/scm-1/lua/qtgui/init.lua
-- Installing: /Users/francescomaiorano/torch/install/lib/luarocks/rocks/qtlua/scm-1/lib/libqtgui.so
-- Installing: /Users/francescomaiorano/torch/install/lib/luarocks/rocks/qtlua/scm-1/lib/libqtide.so
-- Installing: /Users/francescomaiorano/torch/install/lib/luarocks/rocks/qtlua/scm-1/lua/qtide/init.lua
-- Installing: /Users/francescomaiorano/torch/install/lib/luarocks/rocks/qtlua/scm-1/lua/qtide/prefs.lua
-- Installing: /Users/francescomaiorano/torch/install/lib/luarocks/rocks/qtlua/scm-1/lua/qtide/prefs.ui
-- Installing: /Users/francescomaiorano/torch/install/lib/luarocks/rocks/qtlua/scm-1/lib/libqtsvg.so
-- Installing: /Users/francescomaiorano/torch/install/lib/luarocks/rocks/qtlua/scm-1/lua/qtsvg/init.lua
-- Installing: /Users/francescomaiorano/torch/install/lib/luarocks/rocks/qtlua/scm-1/lua/qtuiloader/init.lua
-- Installing: /Users/francescomaiorano/torch/install/lib/luarocks/rocks/qtlua/scm-1/lua/qtuiloader/test.lua
-- Installing: /Users/francescomaiorano/torch/install/lib/luarocks/rocks/qtlua/scm-1/lua/qtuiloader/test.ui
-- Installing: /Users/francescomaiorano/torch/install/lib/luarocks/rocks/qtlua/scm-1/lib/libqtuiloader.so
-- Installing: /Users/francescomaiorano/torch/install/lib/luarocks/rocks/qtlua/scm-1/lua/qtwidget/init.lua
-- Installing: /Users/francescomaiorano/torch/install/lib/luarocks/rocks/qtlua/scm-1/lib/libqtwidget.so
Updating manifest for /Users/francescomaiorano/torch/install/lib/luarocks/rocks
qtlua scm-1 is now built and installed in /Users/francescomaiorano/torch/install/ (license: BSD)
The installation seems to go well but if I try to run the demo again I get the same error message.
I printed package.path and package.cpath both in th and in qlua and this is what I get:
package.path -> /Users/francescomaiorano/.luarocks/share/lua/5.1/?.lua;/Users/francescomaiorano/.luarocks/share/lua/5.1/?/init.lua;/Users/francescomaiorano/torch/install/share/lua/5.1/?.lua;/Users/francescomaiorano/torch/install/share/lua/5.1/?/init.lua;./?.lua;/Users/francescomaiorano/torch/install/share/luajit-2.1.0-alpha/?.lua;/usr/local/share/lua/5.1/?.lua;/usr/local/share/lua/5.1/?/init.lua
package.cpath -> /Users/francescomaiorano/.luarocks/lib/lua/5.1/?.so;/Users/francescomaiorano/torch/install/lib/lua/5.1/?.so;./?.so;/usr/local/lib/lua/5.1/?.so;/usr/local/lib/lua/5.1/loadall.so
...are those '?' normal at all?
Thank you very much for your time.
Francesco
you need to run the script with:
qlua -i gabortest.lua
Hello soumith, thank you!
I just tried it and this is what I get:
MacBook-Air:gabor-layer-demo francescomaiorano$ qlua -i gabortest.lua
qlua: gabortest.lua:32: module 'qtlua' not found:
no field package.preload['qtlua']
no file '/Users/francescomaiorano/.luarocks/share/lua/5.1/qtlua.lua'
no file '/Users/francescomaiorano/.luarocks/share/lua/5.1/qtlua/init.lua'
no file '/Users/francescomaiorano/torch/install/share/lua/5.1/qtlua.lua'
no file '/Users/francescomaiorano/torch/install/share/lua/5.1/qtlua/init.lua'
no file './qtlua.lua'
no file '/Users/francescomaiorano/torch/install/share/luajit-2.1.0-alpha/qtlua.lua'
no file '/usr/local/share/lua/5.1/qtlua.lua'
no file '/usr/local/share/lua/5.1/qtlua/init.lua'
no file '/Users/francescomaiorano/.luarocks/lib/lua/5.1/qtlua.so'
no file '/Users/francescomaiorano/torch/install/lib/lua/5.1/qtlua.so'
no file './qtlua.so'
no file '/usr/local/lib/lua/5.1/qtlua.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
[C]: at 0x0107ee91d0
[C]: in function 'require'
gabortest.lua:32: in main chunk
Lua 5.1 Copyright (C) 1994-2008 Lua.org, PUC-Rio
not able to reproduce :(