koraykv / unsup

Some unsupervised learning modules using Torch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

installation issue

YitzhakSp opened this issue · comments

Hi. Who can help me with the following installation issue? I tried to install unsup following the instruction by


$ torch-pkg install unsup

this didn't work, so I tried


$ luarocks install unsup

it seemed as if there was some error. here is the log:


root@yitzhak-VirtualBox:/media/sf_Dima/Projects/16_17/Nova_16/lua# luarocks install unsup
Installing https://raw.githubusercontent.com/torch/rocks/master/unsup-0.1-0.rockspec...
Using https://raw.githubusercontent.com/torch/rocks/master/unsup-0.1-0.rockspec... switching to 'build' mode
Cloning into 'unsup'...
remote: Counting objects: 39, done.
remote: Compressing objects: 100% (37/37), done.
remote: Total 39 (delta 5), reused 17 (delta 1), pack-reused 0
Receiving objects: 100% (39/39), 29.41 KiB | 0 bytes/s, done.
Resolving deltas: 100% (5/5), done.
Checking connectivity... done.
cmake -E make_directory build && cd build && cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="/home/yitzhak/torch/install/bin/.." -DCMAKE_INSTALL_PREFIX="/home/yitzhak/torch/install/lib/luarocks/rocks/unsup/0.1-0" && make
   
-- The C compiler identification is GNU 4.8.4
-- The CXX compiler identification is GNU 4.8.4
-- 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
-- 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
-- Found Torch7 in /home/yitzhak/torch/install
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/luarocks_unsup-0.1-0-4866/unsup/build
Scanning dependencies of target unsup
[ 50%] Building C object CMakeFiles/unsup.dir/init.c.o
/tmp/luarocks_unsup-0.1-0-4866/unsup/init.c: In function ‘luaopen_libunsup’:
/tmp/luarocks_unsup-0.1-0-4866/unsup/init.c:16:19: error: ‘LUA_GLOBALSINDEX’ undeclared (first use in this function)
   lua_setfield(L, LUA_GLOBALSINDEX, "unsup");
                   ^
/tmp/luarocks_unsup-0.1-0-4866/unsup/init.c:16:19: note: each undeclared identifier is reported only once for each function it appears in
make[2]: *** [CMakeFiles/unsup.dir/init.c.o] Error 1
make[1]: *** [CMakeFiles/unsup.dir/all] Error 2
make: *** [all] Error 2

Error: Build error: Failed building.

I just pushed some fixes via 579bd3d

Rerun the command and it should work:

luarocks install unsup