fblualib install problems

2,240 views
Skip to first unread message

Seth Neiman

unread,
Jan 9, 2015, 10:06:43 PM1/9/15
to tor...@googlegroups.com
Having no luck getting these installed on Ubuntu 14.10. Seems like it needs me to tear my entire torch installation and dependencies out before it can proceed. Many errors of the type: fatal: suchandsuch already exists - followed by more failures as it cannot find the intermediate build files it is looking for. Followed by inability to install anything after thrift libs.

Anybody have good luck with this - I am currently installed with soumith's torch-distro with no problems.

Seth Neiman

unread,
Jan 9, 2015, 11:11:33 PM1/9/15
to tor...@googlegroups.com
Issue is in make file for TH++. It fails during a test of c compiler claiming cc is really a c++ compiler. Which it is, as it points to gcc, which points to g++. This is standard linux as far as I know - and as far as i can determine there is no 'pure' c compiler available.

Anybody got an idea on this?

s
Ubuntu 14.10, g++ 4.9

soumith

unread,
Jan 10, 2015, 2:01:20 AM1/10/15
to torch7 on behalf of Seth Neiman
so...
can you try this version of the install script...

I forked it and made some fixes!
it works completely fine on 14.04.

If it does not work for you, I will start a 14.10 VM and look into it.
I also tested it with torch-distro

--
You received this message because you are subscribed to the Google Groups "torch7" group.
To unsubscribe from this group and stop receiving emails from it, send an email to torch7+un...@googlegroups.com.
To post to this group, send email to tor...@googlegroups.com.
Visit this group at http://groups.google.com/group/torch7.
For more options, visit https://groups.google.com/d/optout.

Seth Neiman

unread,
Jan 10, 2015, 9:10:56 AM1/10/15
to torch7 on behalf of smth chntla
Thanks – still fails during flblualib build – looks like fbpython related pieces. Running for an airplane – will fill in details after I land.

S

This entire message is confidential. If it isn't intended for you, you may not use it – so please throw it away and forget about it.


You received this message because you are subscribed to a topic in the Google Groups "torch7" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/torch7/213kQbWgMS4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to torch7+un...@googlegroups.com.

Seth Neiman

unread,
Jan 10, 2015, 2:09:10 PM1/10/15
to tor...@googlegroups.com
Using your improved script and fixing a strange problem with my toolchain, it now fails building fblualib as below:

  Manually-specified variables were not used by the project:

    ROCKS_PREFIX


-- Build files have been written to: /tmp/fblualib-build.1oPZEN/fblualib/fblualib/python/build
Scanning dependencies of target lua_module
[ 12%] Building CXX object CMakeFiles/lua_module.dir/Debug.cpp.o
[ 25%] Building CXX object CMakeFiles/lua_module.dir/Lib.cpp.o
/tmp/fblualib-build.1oPZEN/fblualib/fblualib/python/Lib.cpp: In function ‘fblualib::python::PyObjectHandle {anonymous}::{anonymous}::defaultFromList(lua_State*)’:
/tmp/fblualib-build.1oPZEN/fblualib/fblualib/python/Lib.cpp:127:45: error: ‘PyString_FromString’ was not declared in this scope
   PyObjectHandle all(PyString_FromString("*"));
                                             ^
CMakeFiles/lua_module.dir/build.make:77: recipe for target 'CMakeFiles/lua_module.dir/Lib.cpp.o' failed
make[2]: *** [CMakeFiles/lua_module.dir/Lib.cpp.o] Error 1
CMakeFiles/Makefile2:60: recipe for target 'CMakeFiles/lua_module.dir/all' failed
make[1]: *** [CMakeFiles/lua_module.dir/all] Error 2
Makefile:123: recipe for target 'all' failed
make: *** [all] Error 2

Error: Build error: Failed building.
        cmake -E make_directory build &&
        cd build &&
        cmake -DROCKS_PREFIX=/usr/local/lib/luarocks/rocks/fbpython/0.1-1 \
              -DROCKS_LUADIR=/usr/local/lib/luarocks/rocks/fbpython/0.1-1/lua \
              -DROCKS_LIBDIR=/usr/local/lib/luarocks/rocks/fbpython/0.1-1/lib \
              .. &&
        make
    
-- Found Folly: /usr/local/include  
-- Found Torch7 in /usr/local
-- Found Folly: /usr/local/include  
-- Found Folly: /usr/local/include  
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/fblualib-build.1oPZEN/fblualib/fblualib/python/build
[ 12%] Building CXX object CMakeFiles/lua_module.dir/Lib.cpp.o
/tmp/fblualib-build.1oPZEN/fblualib/fblualib/python/Lib.cpp: In function ‘fblualib::python::PyObjectHandle {anonymous}::{anonymous}::defaultFromList(lua_State*)’:
/tmp/fblualib-build.1oPZEN/fblualib/fblualib/python/Lib.cpp:127:45: error: ‘PyString_FromString’ was not declared in this scope
   PyObjectHandle all(PyString_FromString("*"));
                                             ^


On Saturday, January 10, 2015 at 6:10:56 AM UTC-8, Seth Neiman wrote:
Thanks – still fails during flblualib build – looks like fbpython related pieces. Running for an airplane – will fill in details after I land.

S

This entire message is confidential. If it isn't intended for you, you may not use it – so please throw it away and forget about it.


From: torch7 on behalf of smth chntla <tor...@googlegroups.com>
Reply-To: torch7 on behalf of smth chntla <tor...@googlegroups.com>
Date: Friday, January 9, 2015 at 11:00 PM
To: torch7 on behalf of Seth Neiman <tor...@googlegroups.com>
Subject: Re: fblualib install problems

so...
can you try this version of the install script...

I forked it and made some fixes!
it works completely fine on 14.04.

If it does not work for you, I will start a 14.10 VM and look into it.
I also tested it with torch-distro
On Fri, Jan 9, 2015 at 11:11 PM, Seth Neiman via torch7 <torch7+APn2wQc2WUdmPsH0xIDPCJjmJF9jszkunWNQrVfhASpDB_Lhlq_Sl3G5p@googlegroups.com> wrote:
Issue is in make file for TH++. It fails during a test of c compiler claiming cc is really a c++ compiler. Which it is, as it points to gcc, which points to g++. This is standard linux as far as I know - and as far as i can determine there is no 'pure' c compiler available.

Anybody got an idea on this?

s
Ubuntu 14.10, g++ 4.9


On Friday, January 9, 2015 at 7:06:43 PM UTC-8, Seth Neiman wrote:
Having no luck getting these installed on Ubuntu 14.10. Seems like it needs me to tear my entire torch installation and dependencies out before it can proceed. Many errors of the type: fatal: suchandsuch already exists - followed by more failures as it cannot find the intermediate build files it is looking for. Followed by inability to install anything after thrift libs.

Anybody have good luck with this - I am currently installed with soumith's torch-distro with no problems.

--
You received this message because you are subscribed to the Google Groups "torch7" group.
To unsubscribe from this group and stop receiving emails from it, send an email to torch7+unsubscribe@googlegroups.com.

To post to this group, send email to tor...@googlegroups.com.
Visit this group at http://groups.google.com/group/torch7.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "torch7" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/torch7/213kQbWgMS4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to torch7+unsubscribe@googlegroups.com.

smth chntla

unread,
Jan 11, 2015, 12:56:52 AM1/11/15
to tor...@googlegroups.com
Looks like fbpython is compiling with python3 headers, and not python2.

I'm looking into a fix.
To unsubscribe from this group and stop receiving emails from it, send an email to torch7+un...@googlegroups.com.
To post to this group, send email to to...@googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "torch7" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/torch7/213kQbWgMS4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to torch7+u...@googlegroups.com.

Seth Neiman

unread,
Jan 11, 2015, 11:44:22 AM1/11/15
to tor...@googlegroups.com
I ended up with the same conclusion. Tried removing python3.4 - unity desktop depends on it. Led to full rebuild - which has run into a problem with your torch-distro. Looks like latest updates may not be fully merged - sorry for problems. From fresh clone and sudo ./install.sh:

Entering 'extra/cudnn'
 * branch            master     -> FETCH_HEAD
Auto-merging test/test.lua
CONFLICT (content): Merge conflict in test/test.lua
Auto-merging SpatialConvolution.lua
CONFLICT (content): Merge conflict in SpatialConvolution.lua
Auto-merging README.md
CONFLICT (content): Merge conflict in README.md
Auto-merging Pointwise.lua
CONFLICT (content): Merge conflict in Pointwise.lua
Automatic merge failed; fix conflicts and then commit the result.
Stopping at 'extra/cudnn'; script returned non-zero status.
./install.sh: line 20: cmake: command not found

smth chntla

unread,
Jan 11, 2015, 7:46:04 PM1/11/15
to tor...@googlegroups.com
Ok updated all packages in torch-distro.
I am going to make a proper fix to fbpython to make it build with python3+

Seth Neiman

unread,
Jan 12, 2015, 9:29:57 PM1/12/15
to torch7 on behalf of smth chntla
Torch-distro works great now –thx.
This entire message is confidential. If it isn't intended for you, you may not use it – so please throw it away and forget about it.

To unsubscribe from this group and all its topics, send an email to torch7+un...@googlegroups.com.

Kiran Vaidhya

unread,
Nov 9, 2015, 10:42:03 AM11/9/15
to torch7
Where do I find the Torch-distro and fix the fblualib issues for 14.04?

Soumith, I tried installing from this as you had given in 3rd reply to this thread...


so...
can you try this version of the install script...
https://github.com/soumith/fblualib/blob/master/install_all.sh

The installation worked perfectly.. I'm still getting the same error when I try to import fb.python inside Torch.

th> py = require('fb.python')
/home/brain_new/torch/install/share/lua/5.1/trepl/init.lua:378: module 'fb.python' not found:No LuaRocks module found for fb.python
   
no field package.preload['fb.python']
   
no file '/home/brain_new/.luarocks/share/lua/5.1/fb/python.lua'
   
no file '/home/brain_new/.luarocks/share/lua/5.1/fb/python/init.lua'
   
no file '/home/brain_new/torch/install/share/lua/5.1/fb/python.lua'
   
no file '/home/brain_new/torch/install/share/lua/5.1/fb/python/init.lua'
   
no file './fb/python.lua'
   
no file '/home/brain_new/torch/install/share/luajit-2.1.0-alpha/fb/python.lua'
   
no file '/usr/local/share/lua/5.1/fb/python.lua'
   
no file '/usr/local/share/lua/5.1/fb/python/init.lua'
   
no file '/home/brain_new/.luarocks/lib/lua/5.1/fb/python.so'
   
no file '/home/brain_new/torch/install/lib/lua/5.1/fb/python.so'
   
no file './fb/python.so'
   
no file '/usr/local/lib/lua/5.1/fb/python.so'
   
no file '/usr/local/lib/lua/5.1/loadall.so'
   
no file '/home/brain_new/.luarocks/lib/lua/5.1/fb.so'
   
no file '/home/brain_new/torch/install/lib/lua/5.1/fb.so'
   
no file './fb.so'
   
no file '/usr/local/lib/lua/5.1/fb.so'
   
no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback
:
   
[C]: in function 'error'
   
/home/brain_new/torch/install/share/lua/5.1/trepl/init.lua:378: in function 'require'
   
[string "py = require('fb.python')"]:1: in main chunk
   
[C]: in function 'xpcall'
   
/home/brain_new/torch/install/share/lua/5.1/trepl/init.lua:663: in function 'repl'
   
..._new/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:199: in main chunk
   
[C]: at 0x00406670    

 

Kiran Vaidhya

unread,
Nov 10, 2015, 6:18:07 AM11/10/15
to torch7
Help please?

alban desmaison

unread,
Nov 10, 2015, 6:33:07 AM11/10/15
to torch7
I think by default, the python module is not built, you may want to add it back to the list here https://github.com/soumith/fblualib/blob/master/fblualib/build.sh#L28:

ffivector editline trepl debugger mattorch thrift python"


On Tuesday, November 10, 2015 at 12:18:07 PM UTC+1, Kiran Vaidhya wrote:
Help please?

Kiran Vaidhya

unread,
Nov 10, 2015, 9:14:20 AM11/10/15
to torch7
No luck. :(

I get these errors when I run ./build.sh from fblualib

[ 76%] Built target fblualib_thrift
[100%] Built target lua_module
Install the project...
-- Install configuration: ""
-- Installing: /home/torch/torch/install/lib/libfblualib_thrift.so
-- Set runtime path of "/home/torch/torch/install/lib/libfblualib_thrift.so" to "$ORIGIN/../lib:/home/torch/torch/install/lib:/usr/local/lib"
-- Installing: /home/torch/torch/install/include/ChunkedCompression.h
-- Installing: /home/torch/torch/install/include/Encoding.h
-- Installing: /home/torch/torch/install/include/LuaObject.h
-- Installing: /home/torch/torch/install/include/LuaObject-inl.h
-- Up-to-date: /home/torch/torch/install/include/fblualib/thrift/if/gen-cpp2
-- Installing: /home/torch/torch/install/include/fblualib/thrift/if/gen-cpp2/LuaObject_constants.h
-- Installing: /home/torch/torch/install/include/fblualib/thrift/if/gen-cpp2/ChunkedCompression_constants.h
-- Installing: /home/torch/torch/install/include/fblualib/thrift/if/gen-cpp2/ChunkedCompression_types.tcc
-- Installing: /home/torch/torch/install/include/fblualib/thrift/if/gen-cpp2/LuaObject_types.h
-- Installing: /home/torch/torch/install/include/fblualib/thrift/if/gen-cpp2/ChunkedCompression_types.h
-- Installing: /home/torch/torch/install/include/fblualib/thrift/if/gen-cpp2/LuaObject_types.tcc
-- Up-to-date: /home/torch/torch/install/include/fblualib/thrift/if
-- Installing: /home/torch/torch/install/include/fblualib/thrift/if/ChunkedCompression.thrift
-- Installing: /home/torch/torch/install/include/fblualib/thrift/if/LuaObject.thrift
-- Installing: /home/torch/torch/install/lib/luarocks/rocks/fbthrift/0.1-1/lib/fb/thrift/lib.so
-- Set runtime path of "/home/torch/torch/install/lib/luarocks/rocks/fbthrift/0.1-1/lib/fb/thrift/lib.so" to "$ORIGIN/../lib:/home/torch/torch/install/lib:/usr/local/lib"
-- Installing: /home/torch/torch/install/lib/luarocks/rocks/fbthrift/0.1-1/lua/fb
-- Installing: /home/torch/torch/install/lib/luarocks/rocks/fbthrift/0.1-1/lua/fb/thrift
-- Installing: /home/torch/torch/install/lib/luarocks/rocks/fbthrift/0.1-1/lua/fb/thrift/init.lua
Updating manifest for /home/torch/torch/install/lib/luarocks/rocks
fbthrift
0.1-1 is now built and installed in /home/torch/torch/install/ (license: BSD)


        cmake
-E make_directory build &&
        cd build
&&

        cmake
-DROCKS_PREFIX=/home/torch/torch/install/lib/luarocks/rocks/fbpython/0.1-1 \
             
-DROCKS_LUADIR=/home/torch/torch/install/lib/luarocks/rocks/fbpython/0.1-1/lua \
             
-DROCKS_LIBDIR=/home/torch/torch/install/lib/luarocks/rocks/fbpython/0.1-1/lib \
             
.. &&
        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
-- 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
-- Found Folly: /usr/local/include  
-- Found Glog: /usr/include  
-- Found Torch7 in /home/torch/torch/install
-- Found Folly: /usr/local/include  
-- Found Folly: /usr/local/include  
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.4m.so (found version "3.4.3")
-- Found PythonInterp: /usr/bin/python3.4 (found version "3.4.3")
CMake Error at /home/torch/fblualib/fblualib/cmake/FindNumPy.cmake:62 (message):
 
NumPy import failure:

 
Traceback (most recent call last):

   
File "<string>", line 1, in <module>

 
ImportError: No module named 'numpy'

Call Stack (most recent call first):
 
CMakeLists.txt:29 (FIND_PACKAGE)


-- Configuring incomplete, errors occurred!

Kiran Vaidhya

unread,
Nov 10, 2015, 9:19:35 AM11/10/15
to torch7
Is there a top to down guideline for installing fblualib on 14.04 from scratch?

alban desmaison

unread,
Nov 10, 2015, 9:20:51 AM11/10/15
to torch7
-- Found PythonInterp: /usr/bin/python3.4 (found version "3.4.3")

  ImportError: No module named 'numpy'

Do you have numpy properly installed (on your python 3.4)?

soumith

unread,
Nov 10, 2015, 10:30:49 AM11/10/15
to torch7 on behalf of alban desmaison
Python 3.4 is not supported with fb.python, only python 2.x is supported.

--
You received this message because you are subscribed to the Google Groups "torch7" group.
To unsubscribe from this group and stop receiving emails from it, send an email to torch7+un...@googlegroups.com.

Kiran Vaidhya

unread,
Nov 10, 2015, 11:43:29 AM11/10/15
to torch7
Is there a fix for this? When I hit python in the terminal, I still get python2.7.6

torch@sankara-CELSIUS-M730power:~/fblualib/fblualib$ python
Python 2.7.6 (default, Jun 22 2015, 17:58:13) 
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 




On Tuesday, November 10, 2015 at 9:00:49 PM UTC+5:30, smth chntla wrote:
Python 3.4 is not supported with fb.python, only python 2.x is supported.
...

Kiran Vaidhya

unread,
Nov 10, 2015, 11:55:56 AM11/10/15
to torch7
Is there a way to disable python3.x and use only python2.x for running the build.sh?

alban desmaison

unread,
Nov 10, 2015, 12:17:23 PM11/10/15
to torch7
You could try modifying this line https://github.com/facebook/fblualib/blob/master/fblualib/python/CMakeLists.txt#L28 with
FIND_PACKAGE(PythonLibs 2.7 REQUIRED)

then cleaning the cmake cache of the fb.python package:
rm -r fblualib/python/build

then re-runing the build script

Kiran Vaidhya

unread,
Nov 10, 2015, 12:23:48 PM11/10/15
to torch7
Oh my God.. Thanks mate! You made my day!

Kiran Vaidhya

unread,
Nov 28, 2015, 12:14:11 PM11/28/15
to torch7
I get the following error when I run ./install_all.sh

  inflating: gtest-1.7.0/configure
  inflating: gtest-1.7.0/CHANGES
  inflating: gtest-1.7.0/CONTRIBUTORS
  inflating: gtest-1.7.0/LICENSE
  inflating: gtest-1.7.0/CMakeLists.txt
-- 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 Folly: /usr/local/include
-- Found Glog: /usr/include
CMake Error at CMakeLists.txt:26 (FIND_PACKAGE):
  By not providing "FindTorch.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Torch", but
  CMake did not find one.

  Could not find a package configuration file provided by "Torch" with any of
  the following names:

    TorchConfig.cmake
    torch-config.cmake

  Add the installation prefix of "Torch" to CMAKE_PREFIX_PATH or set
  "Torch_DIR" to a directory containing one of the above files.  If "Torch"
  provides a separate development package or SDK, be sure it has been
  installed.


-- Configuring incomplete, errors occurred!
See also "/tmp/fblualib-build.XlDWeC/thpp/thpp/build/CMakeFiles/CMakeOutput.log".



Kiran Vaidhya

unread,
Nov 28, 2015, 12:28:43 PM11/28/15
to torch7
I have torch installed in the comp as well. Wonder why this is throwing up an error now. 

Kiran Vaidhya

unread,
Dec 20, 2015, 4:46:29 PM12/20/15
to torch7
-- Build files have been written to: /home/bmi/fblualib/fblualib/python/build
Scanning dependencies of target lua_module
[ 12%] Building CXX object CMakeFiles/lua_module.dir/Debug.cpp.o
[ 25%] Building CXX object CMakeFiles/lua_module.dir/Lib.cpp.o
[ 37%] Building CXX object CMakeFiles/lua_module.dir/LuaToPython.cpp.o
[ 50%] Building CXX object CMakeFiles/lua_module.dir/NumpyArrayAllocator.cpp.o
[ 62%] Building CXX object CMakeFiles/lua_module.dir/PythonToLua.cpp.o
[ 75%] Building CXX object CMakeFiles/lua_module.dir/Ref.cpp.o
[ 87%] Building CXX object CMakeFiles/lua_module.dir/Storage.cpp.o
[100%] Building CXX object CMakeFiles/lua_module.dir/Utils.cpp.o
Linking CXX shared module lib.so
[100%] Built target lua_module
        cd build
&& make install
   
[100%] Built target lua_module
Install the project...
-- Install configuration: ""
-- Installing: /home/bmi/torch/install/lib/luarocks/rocks/fbpython/0.1-1/lib/fb/python/lib.so
-- Set runtime path of "/home/bmi/torch/install/lib/luarocks/rocks/fbpython/0.1-1/lib/fb/python/lib.so" to "$ORIGIN/../lib:/home/bmi/torch/install/lib:/usr/local/lib"
-- Installing: /home/bmi/torch/install/lib/luarocks/rocks/fbpython/0.1-1/lua/fb
-- Installing: /home/bmi/torch/install/lib/luarocks/rocks/fbpython/0.1-1/lua/fb/python
-- Installing: /home/bmi/torch/install/lib/luarocks/rocks/fbpython/0.1-1/lua/fb/python/init.lua
Updating manifest for /home/bmi/torch/install/lib/luarocks/rocks
fbpython
0.1-1 is now built and installed in /home/bmi/torch/install/ (license: BSD)

bmi@bmi
:~/fblualib/fblualib$ th
 
  ______             __  
|  Torch7                                        
 
/_  __/__  ________/ /   |  Scientific computing for Lua.
 
/ / / _ \/ __/ __/ _ \  |  Type ? for help                                
 
/_/  \___/_/  \__/_//_/  |  https://github.com/torch        
                         
|  http://torch.ch                  

   
th
> py = require('fb.python')
ImportError: numpy.core.multiarray failed to import
/home/bmi/torch/install/share/lua/5.1/trepl/init.lua:383: /home/bmi/torch/install/share/lua/5.1/trepl/init.lua:383: Python error: import numpy array module
ImportError: numpy.core.multiarray failed to import


stack traceback
:
   
[C]: in function 'error'

   
/home/bmi/torch/install/share/lua/5.1/trepl/init.lua:383: in function 'require'

   
[string "py = require('fb.python')"]:1: in main chunk
   
[C]: in function 'xpcall'

   
/home/bmi/torch/install/share/lua/5.1/trepl/init.lua:668: in function 'repl'
   
.../bmi/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:199: in main chunk
   
[C]: at 0x00406670    
                                                                     
[0.0938s]    
th
>


I have removed the cmake cache and reran the build script. I'm still not able to import it. I've tried updating numpy to the latest version too. I do not see where I'm going wrong. Could you help me with this please?

Kiran Vaidhya

unread,
Dec 20, 2015, 4:56:18 PM12/20/15
to torch7
Issue resolved by updating numpy to the latest version.

   
/home/bmi/torch/install/share/lua/5.1/trepl<span style="

Andrey Bondarenko

unread,
Apr 4, 2016, 11:46:47 AM4/4/16
to torch7
Hi Kiran!
I'm facing same problem - python 2.7 + normally built/installed fblualib, but exception inside th looks just like the above one... 
Can you tell hat version of python + numpy have you installed (used with torch7) ?

Andrey Bondarenko

unread,
Apr 4, 2016, 11:50:43 AM4/4/16
to torch7
Running command "luarocks list" gives this:
fbcomplex
   0.1-1 (installed) - /usr/lib/luarocks/rocks

fbdebugger
   0.1-1 (installed) - /usr/lib/luarocks/rocks

fbeditline
   0.1-1 (installed) - /usr/lib/luarocks/rocks

fbffivector
   0.1-1 (installed) - /usr/lib/luarocks/rocks

fbluaunit
   0.1-1 (installed) - /usr/lib/luarocks/rocks

fbmattorch
   0.1-1 (installed) - /usr/lib/luarocks/rocks

fbthrift
   0.1-1 (installed) - /usr/lib/luarocks/rocks

fbtrepl
   0.1-1 (installed) - /usr/lib/luarocks/rocks

fbutil
   0.1-1 (installed) - /usr/lib/luarocks/rocks

So fb.python is really not installed...


On Monday, 4 April 2016 18:46:47 UTC+3, Andrey Bondarenko wrote:
Hi Kiran!
I'm facing same problem - python 2.7 + normally built/installed fblualib, but exception inside th looks just like the above one... 
Can you tell what version of python + numpy have you installed (used with torch7) ?

Andrey Bondarenko

unread,
Apr 4, 2016, 12:44:37 PM4/4/16
to torch7
I've updated CMakeLists.txt under python to include '2.7' but still it seems that builder silently ignores python package to be built.
That's strange as fblualib/build.sh contains:

rocks="util luaunit complex \
  ffivector editline trepl debugger mattorch python thrift"

So it should be built.

Andrey Bondarenko

unread,
Apr 4, 2016, 12:52:30 PM4/4/16
to torch7
I basically have no strings in output like: 

fbpython
or
error

Andrey Bondarenko

unread,
Apr 4, 2016, 5:49:44 PM4/4/16
to torch7
updated to numpy 1.11 - without any results - python module is the only one which is not builded. Looks like make totally ignores it.


On Monday, 4 April 2016 18:46:47 UTC+3, Andrey Bondarenko wrote:

Sergey Zagoruyko

unread,
Apr 4, 2016, 5:52:24 PM4/4/16
to torch7 on behalf of Andrey Bondarenko
Hi Andrey,

have you tried this?

cd fblualib/fblualib/python
luarocks make rockspec/fbpython-0.1-1.rockspec

--
You received this message because you are subscribed to the Google Groups "torch7" group.
To unsubscribe from this group and stop receiving emails from it, send an email to torch7+un...@googlegroups.com.
To post to this group, send email to tor...@googlegroups.com.

Andrey Bondarenko

unread,
Apr 4, 2016, 6:31:08 PM4/4/16
to torch7
Hi Sergey,

Yes, it gives:

andrey@redstone:~/works/PythonProjects/fblualib-master/fblualib/python$ sudo luarocks make rockspec/fbpython-0.1-1.rockspec 
        cmake -E make_directory build &&
        cd build &&
        cmake -DROCKS_PREFIX=/usr/lib/luarocks/rocks/fbpython/0.1-1 \
              -DROCKS_LUADIR=/usr/lib/luarocks/rocks/fbpython/0.1-1/lua \
              -DROCKS_LIBDIR=/usr/lib/luarocks/rocks/fbpython/0.1-1/lib \
              .. &&
        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 Folly: /usr/local/include  
-- Found Glog: /usr/include  
-- Found Torch7 in /usr
-- Found Folly: /usr/local/include  
-- Found Folly: /usr/local/include  
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython2.7.so (found suitable version "2.7.6", minimum required is "2.7") 
-- Found PythonInterp: /usr/bin/python (found version "2.7.6") 
-- Found NumPy: version "1.11.0" /usr/local/lib/python2.7/dist-packages/numpy-1.11.0-py2.7-linux-x86_64.egg/numpy/core/include
-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    ROCKS_PREFIX


-- Build files have been written to: /home/andrey/works/PythonProjects/fblualib-master/fblualib/python/build
Scanning dependencies of target lua_module
[ 12%] Building CXX object CMakeFiles/lua_module.dir/Debug.cpp.o
[ 25%] Building CXX object CMakeFiles/lua_module.dir/Lib.cpp.o
In file included from /home/andrey/works/PythonProjects/fblualib-master/fblualib/python/Utils.h:24:0,
                 from /home/andrey/works/PythonProjects/fblualib-master/fblualib/python/LuaToPython.h:15,
                 from /home/andrey/works/PythonProjects/fblualib-master/fblualib/python/Lib.cpp:20:
/home/andrey/works/PythonProjects/fblualib-master/fblualib/python/../../fblualib/LuaUtils.h:99:40: error: ‘thpp::TensorPtr’ has not been declared
 void luaPushTensor(lua_State* L, thpp::TensorPtr<thpp::Tensor<NT>> tensor);
                                        ^
/home/andrey/works/PythonProjects/fblualib-master/fblualib/python/../../fblualib/LuaUtils.h:99:49: error: expected ‘,’ or ‘...’ before ‘<’ token
 void luaPushTensor(lua_State* L, thpp::TensorPtr<thpp::Tensor<NT>> tensor);
                                                 ^
In file included from /home/andrey/works/PythonProjects/fblualib-master/fblualib/python/../../fblualib/LuaUtils.h:264:0,
                 from /home/andrey/works/PythonProjects/fblualib-master/fblualib/python/Utils.h:24,
                 from /home/andrey/works/PythonProjects/fblualib-master/fblualib/python/LuaToPython.h:15,
                 from /home/andrey/works/PythonProjects/fblualib-master/fblualib/python/Lib.cpp:20:
/home/andrey/works/PythonProjects/fblualib-master/fblualib/python/../../fblualib/LuaUtils-inl.h:122:40: error: ‘thpp::TensorPtr’ has not been declared
 void luaPushTensor(lua_State* L, thpp::TensorPtr<thpp::Tensor<T>> tensor) {
                                        ^
/home/andrey/works/PythonProjects/fblualib-master/fblualib/python/../../fblualib/LuaUtils-inl.h:122:49: error: expected ‘,’ or ‘...’ before ‘<’ token
 void luaPushTensor(lua_State* L, thpp::TensorPtr<thpp::Tensor<T>> tensor) {
                                                 ^
/home/andrey/works/PythonProjects/fblualib-master/fblualib/python/../../fblualib/LuaUtils-inl.h: In function ‘void fblualib::luaPushTensor(lua_State*, int)’:
/home/andrey/works/PythonProjects/fblualib-master/fblualib/python/../../fblualib/LuaUtils-inl.h:123:21: error: ‘tensor’ was not declared in this scope
   luaT_pushudata(L, tensor.moveAsTH(), thpp::Tensor<T>::kLuaTypeName);
                     ^
/home/andrey/works/PythonProjects/fblualib-master/fblualib/python/../../fblualib/LuaUtils-inl.h: At global scope:
/home/andrey/works/PythonProjects/fblualib-master/fblualib/python/../../fblualib/LuaUtils-inl.h:263:6: error: ‘IsTensorPtr’ is not a member of ‘thpp’
     (thpp::IsTensorPtr<T>::value || thpp::IsStorage<T>::value)>::type>
      ^
/home/andrey/works/PythonProjects/fblualib-master/fblualib/python/../../fblualib/LuaUtils-inl.h:263:26: error: ‘::value’ has not been declared
     (thpp::IsTensorPtr<T>::value || thpp::IsStorage<T>::value)>::type>
                          ^
/home/andrey/works/PythonProjects/fblualib-master/fblualib/python/../../fblualib/LuaUtils-inl.h:263:37: error: ‘IsStorage’ is not a member of ‘thpp’
     (thpp::IsTensorPtr<T>::value || thpp::IsStorage<T>::value)>::type>
                                     ^
/home/andrey/works/PythonProjects/fblualib-master/fblualib/python/../../fblualib/LuaUtils-inl.h:263:55: error: ‘::value’ has not been declared
     (thpp::IsTensorPtr<T>::value || thpp::IsStorage<T>::value)>::type>
                                                       ^
/home/andrey/works/PythonProjects/fblualib-master/fblualib/python/../../fblualib/LuaUtils-inl.h:263:63: error: template argument 1 is invalid
     (thpp::IsTensorPtr<T>::value || thpp::IsStorage<T>::value)>::type>
                                                               ^
/home/andrey/works/PythonProjects/fblualib-master/fblualib/python/../../fblualib/LuaUtils-inl.h:263:70: error: expected ‘(’ before ‘>’ token
     (thpp::IsTensorPtr<T>::value || thpp::IsStorage<T>::value)>::type>
                                                                      ^
/home/andrey/works/PythonProjects/fblualib-master/fblualib/python/../../fblualib/LuaUtils-inl.h:263:70: error: template argument 2 is invalid
/home/andrey/works/PythonProjects/fblualib-master/fblualib/python/../../fblualib/LuaUtils-inl.h:264:3: error: expected ‘::’ before ‘:’ token
   : public LuaOpBase<T, LuaOp<T>> {
   ^
/home/andrey/works/PythonProjects/fblualib-master/fblualib/python/../../fblualib/LuaUtils-inl.h:264:3: error: expected identifier before ‘:’ token
/home/andrey/works/PythonProjects/fblualib-master/fblualib/python/../../fblualib/LuaUtils-inl.h:264:3: error: qualified name does not name a class before ‘:’ token
/home/andrey/works/PythonProjects/fblualib-master/fblualib/python/../../fblualib/LuaUtils-inl.h:264:3: error: expected ‘{’ before ‘:’ token
/home/andrey/works/PythonProjects/fblualib-master/fblualib/python/../../fblualib/LuaUtils-inl.h:264:3: error: expected unqualified-id before ‘:’ token
/home/andrey/works/PythonProjects/fblualib-master/fblualib/python/../../fblualib/LuaUtils-inl.h:282:27: error: ‘IsTensor’ is not a member of ‘thpp’
   typename std::enable_if<thpp::IsTensor<T>::value>::type>
                           ^
/home/andrey/works/PythonProjects/fblualib-master/fblualib/python/../../fblualib/LuaUtils-inl.h:282:27: error: ‘IsTensor’ is not a member of ‘thpp’
/home/andrey/works/PythonProjects/fblualib-master/fblualib/python/../../fblualib/LuaUtils-inl.h:282:43: error: template argument 1 is invalid
   typename std::enable_if<thpp::IsTensor<T>::value>::type>
                                           ^
/home/andrey/works/PythonProjects/fblualib-master/fblualib/python/../../fblualib/LuaUtils-inl.h:282:51: error: expected ‘(’ before ‘>’ token
   typename std::enable_if<thpp::IsTensor<T>::value>::type>
                                                   ^
/home/andrey/works/PythonProjects/fblualib-master/fblualib/python/../../fblualib/LuaUtils-inl.h:282:51: error: template argument 2 is invalid
/home/andrey/works/PythonProjects/fblualib-master/fblualib/python/../../fblualib/LuaUtils-inl.h:282:54: error: expected ‘{’ or ‘:’ before ‘type’
   typename std::enable_if<thpp::IsTensor<T>::value>::type>
                                                      ^
/home/andrey/works/PythonProjects/fblualib-master/fblualib/python/../../fblualib/LuaUtils-inl.h:282:54: error: expected ‘{’ before ‘type’
/home/andrey/works/PythonProjects/fblualib-master/fblualib/python/../../fblualib/LuaUtils-inl.h:282:58: error: expected initializer before ‘>’ token
   typename std::enable_if<thpp::IsTensor<T>::value>::type>
                                                          ^
make[2]: *** [CMakeFiles/lua_module.dir/Lib.cpp.o] Error 1
make[1]: *** [CMakeFiles/lua_module.dir/all] Error 2
make: *** [all] Error 2

Error: Build error: Failed building.

I'm quite amateurish with cpp, so this error does not say to me anything..


On Tuesday, 5 April 2016 00:52:24 UTC+3, Sergey Zagoruyko wrote:
Hi Andrey,

have you tried this?

cd fblualib/fblualib/python
luarocks make rockspec/fbpython-0.1-1.rockspec

Sergey Zagoruyko

unread,
Apr 5, 2016, 7:31:22 PM4/5/16
to torch7 on behalf of Andrey Bondarenko
One reason it might fail is using `sudo luarocks`. This is highly not recommended with torch luarocks, I’d suggest to remove local torch and fblualib and try again without sudo. or fix the permissions.

Afroze Ibrahim

unread,
Apr 22, 2016, 10:41:35 AM4/22/16
to torch7
I am having the exact same issue. As for the "sudo luarocks" may not work, it seems even in fblualib/build.sh they do sudo, as follows:

  # Unfortunately, luarocks doesn't like separating the "build" and
  # "install" phases, so we have to run as root.
  sudo luarocks make rockspec/fb$rock-$version.rockspec 


One very curious thing is that when I try to run the build.sh script myself it results in error (the same Andrey pasted). However, if I do everything at once with "install_all.sh", then "build.sh" runs without errors, but mysteriously skips over fbpython.....




On Wednesday, April 6, 2016 at 1:31:22 AM UTC+2, Sergey Zagoruyko wrote:
One reason it might fail is using `sudo luarocks`. This is highly not recommended with torch luarocks, I’d suggest to remove local torch and fblualib and try again without sudo. or fix the permissions.
Hi Kiran!
 help                                
 
/_/  \___/_/  \__/_//_/  |  https://github.com/torch         <br cl

aj

unread,
May 5, 2016, 12:51:55 PM5/5/16
to torch7

Hello,

I have been following this thread, since I am facing similar problems that @andrey has mentioned. 

Ubuntu verison : 14.04

I cloned the fblualib repo and setup using the install , and the build looks like this .

When I do "require 'fb.python' " , I get this 

Then I follow the instruction that @sergey provided by doing a "luarocks make rockspec/fbpython-0.1-1.rockspec" and I get an error as this

I have been at this for a while now.  

Thank you for your time on this.

alban desmaison

unread,
May 5, 2016, 1:06:43 PM5/5/16
to torch7
The module cannot be found because on soumith's branch, the install script is modified not to install it: https://github.com/soumith/fblualib/blob/master/fblualib/build.sh#L28

aj

unread,
May 5, 2016, 1:21:28 PM5/5/16
to torch7
Ah. Thanks for pointing that out @alban. Is there another way that i can build fbpython for me ?

alban desmaison

unread,
May 5, 2016, 1:34:51 PM5/5/16
to torch7
I don't know why it was removed here, if you add it back, does the installation works as expected?

Arjun Raj Rajanna (RIT Student)

unread,
May 5, 2016, 4:15:29 PM5/5/16
to torch7 on behalf of alban desmaison
@alban, I did a fresh install using the fb repo. I get the same set of errors, when I use the build.sh within. 


--
You received this message because you are subscribed to a topic in the Google Groups "torch7" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/torch7/213kQbWgMS4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to torch7+un...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages