Can't build python Demo on Linux Mint

RCFProto support and general discussion.
Post Reply
bzis
Posts: 1
Joined: Mon Feb 10, 2014 7:40 pm

Can't build python Demo on Linux Mint

Post by bzis »

Hello,

I've just downloaded your RCFProto package and tried to build C++ and Python demos on AMD Mint 16 machine. I'm using your Getting Started Guide. Everything went smoothly with C++ demos - everything works. However, I'm having some problems with building Python Bindings. After I run command:

Code: Select all

cmake -G "Unix Makefiles" .. 
I get this output:

Code: Select all

CMAKE_BUILD_TYPE: Release
-- Boost version: 1.53.0
Using RCF source from directory: /home/bz/Desktop/RCFProto-src-0.9.0.6/cpp/src/RCF
************************************************
*** RCFProto build: Third party dependency summary ***
RCF include path: /home/bz/Desktop/RCFProto-src-0.9.0.6/cpp/src/RCF/include
Boost include path: /usr/include
Protobuf include path: /usr/include
Protobuf libs: optimized/usr/lib/libprotobuf.sodebug/usr/lib/libprotobuf.so
Protobuf debug lib: /usr/lib/libprotobuf.so
Protobuf Java class path: 
Python include paths: /usr/include/python2.7/usr/include/x86_64-linux-gnu/python2.7
Python libs: /usr/lib/x86_64-linux-gnu/libpython2.7.so
ZLIB include path: /usr/include
OpenSSL include path: /usr/include
************************************************
Using Python interpreter: /usr/bin/python
-- Configuring done
-- Generating done
-- Build files have been written to: /home/bz/Desktop/RCFProto-src-0.9.0.6/make
then I run

Code: Select all

make
and I get following error:

Code: Select all

[  6%] Built target CppDemoDir
[ 12%] Built target CppDemoProto
[ 18%] Built target RCF
[ 25%] Built target RCFProto
[ 50%] Built target DemoClientCpp
[ 75%] Built target DemoServerCpp
[ 81%] Building CXX object CMakeFiles/RCFProto_Python_impl.dir/cpp/src/swig/RCFProto_Python_impl.cpp.o
c++: fatal error: no input files
compilation terminated.
/bin/sh: 1: /usr/include/x86_64-linux-gnu/python2.7: Permission denied
make[2]: *** [CMakeFiles/RCFProto_Python_impl.dir/cpp/src/swig/RCFProto_Python_impl.cpp.o] Error 126
make[1]: *** [CMakeFiles/RCFProto_Python_impl.dir/all] Error 2
make: *** [all] Error 2
everything is executed as root, so I dont't understand the "Permission denied" error. Also I know, that the tutorial is for Ubuntu, but maybe there's something I can do, to run it on Mint?

P.S. I've also modified CMakeLists.txt, because I had following error:

Code: Select all

CMAKE_BUILD_TYPE: Release
-- The C compiler identification is GNU 4.8.1
-- The CXX compiler identification is GNU 4.8.1
-- 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
-- Boost version: 1.53.0
Using RCF source from directory: /home/bz/Desktop/RCFProto-src-0.9.0.6/cpp/src/RCF
-- Found PROTOBUF: /usr/lib/libprotobuf.so  
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.8") 
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libssl.so;/usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.0.1e") 
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython2.7.so (found version "2.7.5+") 
************************************************
*** RCFProto build: Third party dependency summary ***
RCF include path: /home/bz/Desktop/RCFProto-src-0.9.0.6/cpp/src/RCF/include
Boost include path: /usr/include
Protobuf include path: /usr/include
Protobuf libs: optimized/usr/lib/libprotobuf.sodebug/usr/lib/libprotobuf.so
Protobuf debug lib: /usr/lib/libprotobuf.so
Protobuf Java class path: 
Python include paths: /usr/include/python2.7/usr/include/x86_64-linux-gnu/python2.7
Python libs: /usr/lib/x86_64-linux-gnu/libpython2.7.so
ZLIB include path: /usr/include
OpenSSL include path: /usr/include
************************************************
CMake Error at CMakeLists.txt:458 (SET_TARGET_PROPERTIES):
  set_target_properties called with incorrect number of arguments.


-- Found PythonInterp: /usr/bin/python (found version "2.7.5") 
Using Python interpreter: /usr/bin/python
-- Configuring incomplete, errors occurred!
Modified this:

Code: Select all

PROPERTIES COMPILE_FLAGS -I${PYTHON_INCLUDE_DIRS}
to this:

Code: Select all

PROPERTIES COMPILE_FLAGS "-I${PYTHON_INCLUDE_DIRS}"
But this line still looks wrong:

Code: Select all

Python include paths: /usr/include/python2.7/usr/include/x86_64-linux-gnu/python2.7
I Hope you can help me!
Thank you.
Bzis.

jarl
Posts: 238
Joined: Mon Oct 03, 2011 4:53 am
Contact:

Re: Can't build python Demo on Linux Mint

Post by jarl »

Hi bzis,

It looks like your Python environment is a little different than the Ubuntu boxes we've tested on. On the Ubuntu systems, there is only one Python include path, whereas in your case there are two.

The change you made to the -I option should take care of that though. So the real problem looks to be the permission denied error:

Code: Select all

/bin/sh: 1: /usr/include/x86_64-linux-gnu/python2.7: Permission denied
Is there any way you can troubleshoot this further and determine why permission is being denied?
Kind Regards

Jarl Lindrud
Delta V Software
http://www.deltavsoft.com

Post Reply