Error installing fb.python

344 views
Skip to first unread message

Vislab

unread,
Oct 12, 2016, 1:07:16 PM10/12/16
to torch7
I'm trying to install fb.python using "luarocks install fbpython" but during installation cmake is getting a different PythonLibs version than the required. 

...
(other stuff not worth mentioning)
...

-- Found the following Boost libraries:
--   thread
CMake Error at /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:108 (message):
 
Could NOT find PythonLibs: Found unsuitable version "2.7.6", but required
 
is at least "2.7.12" (found
 
/usr/lib/python2.7/config-x86_64-linux-gnu/libpython2.7.so)

Call Stack (most recent call first):
 
/usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:313 (_FPHSA_FAILURE_MESSAGE)
 
/usr/share/cmake-2.8/Modules/FindPythonLibs.cmake:208 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
 
CMakeLists.txt:47 (FIND_PACKAGE)


-- Configuring incomplete, errors occurred!
See also "/home/mf/Toolkits/fblualib/fblualib/python/build/CMakeFiles/CMakeOutput.log".

Error: Build error: Failed building.

It seems FIND_PACKAGE(PythonLibs ${PYTHON_VERSION_STRING} REQUIRED) is not finding the correct file.
I went to look if other files exists using "find /usr/lib -name 'libpython2.7.so'" and found other versions of the same file:

/usr/lib/python3.4/config-3.4m-x86_64-linux-gnu/libpython3.4m-pic.a
/usr/lib/python3.4/config-3.4m-x86_64-linux-gnu/libpython3.4.so
/usr/lib/python3.4/config-3.4m-x86_64-linux-gnu/libpython3.4m.a
/usr/lib/python3.4/config-3.4m-x86_64-linux-gnu/libpython3.4m.so
/usr/lib/python2.7/config-x86_64-linux-gnu/libpython2.7.a
/usr/lib/python2.7/config-x86_64-linux-gnu/libpython2.7.so
/usr/lib/python2.7/config-x86_64-linux-gnu/libpython2.7-pic.a
/usr/lib/x86_64-linux-gnu/libpython3.4m.a
/usr/lib/x86_64-linux-gnu/libpython2.7.a
/usr/lib/x86_64-linux-gnu/libpython3.4m.so.1.0
/usr/lib/x86_64-linux-gnu/libpython2.7.so
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
/usr/lib/x86_64-linux-gnu/libpython3.4m.so.1
/usr/lib/x86_64-linux-gnu/libpython3.4m.so
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1
/usr/lib/libpeas-1.0/loaders/libpythonloader.so
/usr/lib/libpeas-1.0/loaders/libpython3loader.so

To me this looks like a case of finding the wrong file. If so, how can I tell cmake to use a different path to search for the right file? If not, does anyone know a work-around?

PS: I'm using ubuntu 14.04 and I've updated python using anaconda to the latest version.

Any suggestion would be helpful.
Thanks

Vislab

unread,
Oct 12, 2016, 4:04:28 PM10/12/16
to torch7
So, I went and started setting/adding paths left and right in the CMakeLists.txt file before the FIND_PACKAGE, and basically I've ended up with something like the if statement in https://github.com/facebook/fblualib/blob/master/fblualib/python/CMakeLists.txt#L35, so basically I just swapped if(APPLE) with if(UNIX) and it built nicely.

garb...@umich.edu

unread,
Dec 19, 2017, 3:00:10 PM12/19/17
to torch7

I am trying to install fb-python library -a bridge between Lua and Python:https://github.com/facebookarchive/fblualib/tree/master/fblualib/python

on my Linux machine using the command

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


however all my attempts are encountering the error below:

    cmake -E make_directory build &&
    cd build &&
    cmake -DROCKS_PREFIX=/home/current_user/torch/install/lib/luarocks/rocks/fbpython/0.1-1 \
          -DROCKS_LUADIR=/home/current_user/torch/install/lib/luarocks/rocks/fbpython/0.1-1/lua \
          -DROCKS_LIBDIR=/home/current_user/torch/install/lib/luarocks/rocks/fbpython/0.1-1/lib \
          .. &&
    make

CMake Error at /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:108 (message):

  REQUIRED_ARGS (missing: GLOG_INCLUDE_DIR GLOG_LIBRARY)

Call Stack (most recent call first):

  /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:315 
(_FPHSA_FAILURE_MESSAGE)
  cmake/FindGlog.cmake:21 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:27 (FIND_PACKAGE)



-- Configuring incomplete, errors occurred!


I have ensured that I install the glog library, however I keep on getting the same error. I am not sure how to overcome this hurdle. Any suggestion is appreciated. Thank you!

cham

unread,
Dec 29, 2017, 2:11:39 AM12/29/17
to torch7
I'm encountering exctly the same error. I am following https://github.com/AaronJackson/vrn for fb-python installation. Has anyone handled this? Will appreciate some help. Thanks. 

cshort

unread,
Apr 10, 2018, 8:27:00 PM4/10/18
to torch7
in the fblualib/fblualib/python folder, I tried `luarocks make rockspec/fbpython-0.1-1.rockspec` and it seems built correctly:

        cmake -E make_directory build &&
        cd build &&
        cmake -DROCKS_PREFIX=/home/wei/torch/install/lib/luarocks/rocks/fbpython/0.1-1 \
              -DROCKS_LUADIR=/home/wei/torch/install/lib/luarocks/rocks/fbpython/0.1-1/lua \
              -DROCKS_LIBDIR=/home/wei/torch/install/lib/luarocks/rocks/fbpython/0.1-1/lib \
              .. &&
        make
   
-- Found Torch7 in /home/wei/torch/install
-- Boost version: 1.58.0

-- Found the following Boost libraries:
--   thread
--   chrono
--   system
--   date_time
--   atomic
-- Found PythonInterp: /usr/bin/python2.7 (found suitable version "2.7.12", minimum required is "2.7")
-- Found PythonInterp: /usr/bin/python2.7 (found version "2.7.12")
-- Configuring done
-- Generating done
-- Build files have been written to: /home/wei/src/fblualib/fblualib/python/build
[100%] Built target lua_module
        cd build && make install
   
[100%] Built target lua_module
Install the project...
-- Install configuration: ""
-- Installing: /home/wei/torch/install/lib/luarocks/rocks/fbpython/0.1-1/lib/fb/python/lib.so
-- Set runtime path of "/home/wei/torch/install/lib/luarocks/rocks/fbpython/0.1-1/lib/fb/python/lib.so" to "$ORIGIN/../lib:/home/wei/torch/install/lib"
-- Installing: /home/wei/torch/install/lib/luarocks/rocks/fbpython/0.1-1/lua/fb
-- Installing: /home/wei/torch/install/lib/luarocks/rocks/fbpython/0.1-1/lua/fb/python
-- Installing: /home/wei/torch/install/lib/luarocks/rocks/fbpython/0.1-1/lua/fb/python/init.lua
Updating manifest for /home/wei/torch/install/lib/luarocks/rocks
fbpython 0.1-1 is now built and installed in /home/wei/torch/install/ (license: BSD)



However, when I `th> local py = require('fb.python')`, it said
/home/wei/torch/install/share/lua/5.1/trepl/init.lua:389: /home/wei/torch/install/share/lua/5.1/trepl/init.lua:389: /home/wei/torch/install/share/lua/5.1/luarocks/loader.lua:117: error loading module 'fb.python.lib' from file '/home/wei/torch/install/lib/lua/5.1/fb/python/lib.so':
    /home/wei/torch/install/lib/lua/5.1/fb/python/lib.so: undefined symbol: _ULx86_64_init_local
stack traceback:
    [C]: in function 'error'
    /home/wei/torch/install/share/lua/5.1/trepl/init.lua:389: in function 'require'
    [string "local py = require('fb.python')"]:1: in main chunk
    [C]: in function 'xpcall'
    /home/wei/torch/install/share/lua/5.1/trepl/init.lua:679: in function 'repl'
    .../wei/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:204: in main chunk
    [C]: at 0x00405d50   


Does anyone have same problem? How do you fix this? thanks!
Reply all
Reply to author
Forward
0 new messages