-
Notifications
You must be signed in to change notification settings - Fork 74
Description
Is there any alternative to fix the install of qtlua without going backwards and doing:
TORCH_LUA_VERSION=LUA51 ./install.sh
instead of
TORCH_LUA_VERSION=LUA52 ./install.sh
?
Issue described here: facebookarchive/torchnet#84 :
When doing make in first installation options in https://github.com/LuaDist/qtlua
I get:
Details
../configure --with-lualib-lib lualibconfigure: WARNING: you should use --build, --host, --target checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... gawk checking whether make setsRunning ~/qtlua/bld$ ../configure
gives:
Details
... checking for qmake-qt4... /usr/bin/qmake-qt4 checking for moc-qt4... /usr/bin/moc-qt4 checking for uic-qt4... /usr/bin/uic-qt4 checking for rcc-qt4... no checking for rcc4... no checking for rcc... /usr/bin/rcc checking Qt install bin path... /usr/bin checking Qt spec to use for the host system... -spec linux-g++ checking whether we can build a simple Qt app... ok, looks like Qt 4 checking for the DEFINES to use with Qt... -DQT_NO_DEBUG -DQT_XML_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED checking for the CFLAGS to use with Qt... -D_REENTRANT checking for the CXXFLAGS to use with Qt... -D_REENTRANT checking for the INCPATH to use with Qt... -I /usr/share/qt4/mkspecs/linux-g++ -I /usr/include/qt4/QtUiTools -I /usr/include/qt4/QtCore -I /usr/include/qt4/QtGui -I /usr/include/qt4/QtXml -I /usr/include/qt4 checking for the LDFLAGS to use with Qt... -Wl,-O1 checking for the LIBS to use with Qt... -L/usr/lib/x86_64-linux-gnu -lQtXml -lQtGui -lQtCore -lQtUiTools -lpthread checking lua.h usability... no checking lua.h presence... no checking for lua.h... no configure: error: can not find lua.h; try --with-lua* argumentsWhen doing make in second installation options in https://github.com/LuaDist/qtlua
I get:
[...][ 37%] Building CXX object CMakeFiles/qtlua.dir/src/QtLua/moc_qtluatablegridmodel.cxx.o [ 38%] Building CXX object CMakeFiles/qtlua.dir/src/moc_qtluaqtlib.cxx.o [ 39%] Linking CXX shared library libqtlua.so [ 39%] Built target qtlua Scanning dependencies of target global [ 40%] Building CXX object CMakeFiles/global.dir/examples/cpp/value/global.cc.o [ 41%] Linking CXX executable global libqtlua.so: undefined reference to `lua_tonumber' libqtlua.so: undefined reference to `luaL_loadbuffer' libqtlua.so: undefined reference to `lua_pcall' libqtlua.so: undefined reference to `lua_lessthan' libqtlua.so: undefined reference to `lua_call' libqtlua.so: undefined reference to `lua_equal' libqtlua.so: undefined reference to `lua_objlen' collect2: error: ld returned 1 exit status CMakeFiles/global.dir/build.make:100: recipe for target 'global' failed make[2]: *** [global] Error 1 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/global.dir/all' failed make[1]: *** [CMakeFiles/global.dir/all] Error 2 Makefile:149: recipe for target 'all' failed make: *** [all] Error 2
I have also tried all parameters indicated in:
https://github.com/LuaDist/qtlua/blob/master/configure.ac
obtaining:
(...)
checking whether the C++ compiler works... yes checking for C++ compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking for style of include used by make... GNU checking dependency style of g++... gcc3 checking build system type... Invalid configuration `lualib': machine `lualib' not recognized configure: error: /bin/bash ../build/config.sub lualib failed natalia@tim-ThinkStation-P710:~/qtlua/bld$ ../configure --with-lualib-lib lualib
Finally:
luarocks install qtlua returns:
Details
Installing https://raw.githubusercontent.com/torch/rocks/master/qtlua-scm-1.rockspec
Cloning into 'qtlua'...
remote: Counting objects: 169, done.
remote: Compressing objects: 100% (163/163), done.
remote: Total 169 (delta 11), reused 123 (delta 2), pack-reused 0
Receiving objects: 100% (169/169), 364.00 KiB | 591.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=/home/natalia/torch/install/bin/lua -DLUA_BINDIR="/home/natalia/torch/install/bin" -DLUA_INCDIR="/home/natalia/torch/install/include" -DLUA_LIBDIR="/home/natalia/torch/install/lib" -DLUADIR="/home/natalia/torch/install/lib/luarocks/rocks/qtlua/scm-1/lua" -DLIBDIR="/home/natalia/torch/install/lib/luarocks/rocks/qtlua/scm-1/lib" -DCONFDIR="/home/natalia/torch/install/lib/luarocks/rocks/qtlua/scm-1/conf" && make
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /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: /usr/bin/c++
-- Check for working CXX compiler: /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 - 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 - not found
-- Found Qt4: /usr/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): /home/natalia/torch/install/lib/liblua.so
-- Looking for luaJIT_setmode in /home/natalia/torch/install/lib/liblua.so
-- Looking for luaJIT_setmode in /home/natalia/torch/install/lib/liblua.so - not found
-- Lua found /home/natalia/torch/install/bin/lua
-- 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 - not found
-- Looking for XInitThreads
-- Looking for XInitThreads - not found
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /usr/lib/x86_64-linux-gnu/libX11.so
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/luarocks_qtlua-scm-1-dY9RRt/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
/tmp/luarocks_qtlua-scm-1-dY9RRt/qtlua/qtlua/qtluautils.cpp: In function ‘const char* pushnexttemplate(lua_State*, const char*)’:
/tmp/luarocks_qtlua-scm-1-dY9RRt/qtlua/qtlua/qtluautils.cpp:545:20: error: ‘LUA_PATHSEP’ was not declared in this scope
while (*path == LUA_PATHSEP) path++; / skip separators */
^
/tmp/luarocks_qtlua-scm-1-dY9RRt/qtlua/qtlua/qtluautils.cpp:547:21: error: ‘LUA_PATHSEP’ was not declared in this scope
l = strchr(path, LUA_PATHSEP); / find next separator */
^
qtlua/CMakeFiles/libqtlua.dir/build.make:72: recipe for target 'qtlua/CMakeFiles/libqtlua.dir/qtluautils.cpp.o' failed
make[2]: *** [qtlua/CMakeFiles/libqtlua.dir/qtluautils.cpp.o] Error 1
CMakeFiles/Makefile2:85: recipe for target 'qtlua/CMakeFiles/libqtlua.dir/all' failed
make[1]: *** [qtlua/CMakeFiles/libqtlua.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
Error: Build error: Failed building.