Installation failure

112 views
Skip to first unread message

Richard Gomes

unread,
Aug 29, 2012, 10:15:57 PM8/29/12
to copperhe...@googlegroups.com
Hello,

I'm having trouble to install copperhead.
It's not finding boost-python library, despite I'm pretty sure I'm passing the correct arguments.



siteconf.py:

BOOST_INC_DIR = "/opt/cuda-dev/boost-1.48.0/include"
BOOST_LIB_DIR = "/opt/cuda-dev/boost-1.48.0/lib"
BOOST_PYTHON_LIBNAME = "boost_python"
CUDA_INC_DIR = "/usr/local/cuda/include"
CUDA_LIB_DIR = "/usr/local/cuda/lib"
NP_INC_DIR = "/usr/lib/python2.7/dist-packages/numpy/core/include"
TBB_INC_DIR = None
TBB_LIB_DIR = None
THRUST_DIR = "/usr/local/cuda/include/thrust/"



Python and boost-python


(py27)rgomes@terra:~/local-git/github.com/copperhead/copperhead$ python
Python 2.7.3 (default, Aug  1 2012, 05:14:39)
[GCC 4.6.3] on linux2

(py27)rgomes@terra:~/local-git/github.com/copperhead/copperhead$ file /home/rgomes/.virtualenvs/py27/bin/python
/home/rgomes/.virtualenvs/py27/bin/python: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=0x623b662458af705775fcbd2576ca06eaa82bc482, stripped

(py27)rgomes@terra:~/local-git/github.com/copperhead/copperhead$ ls -al /opt/cuda-dev/boost-1.48.0/lib/libboost_python.*
-rw-rw-r-- 1 rgomes rgomes 667344 Aug 30 02:59 /opt/cuda-dev/boost-1.48.0/lib/libboost_python.a
lrwxrwxrwx 1 rgomes rgomes     25 Aug 30 02:52 /opt/cuda-dev/boost-1.48.0/lib/libboost_python.so -> libboost_python.so.1.48.0
-rwxrwxr-x 1 rgomes rgomes 402279 Aug 30 02:52 /opt/cuda-dev/boost-1.48.0/lib/libboost_python.so.1.48.0


Operating system:

(py27)rgomes@terra:~/local-git/github.com/copperhead/copperhead$ uname -a
Linux terra 3.2.0-29-generic #46-Ubuntu SMP Fri Jul 27 17:03:23 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

(py27)rgomes@terra:~/local-git/github.com/copperhead/copperhead$ cat /etc/debian_version
wheezy/sid


... and finally a failure during the installation:


(py27)rgomes@terra:~/local-git/github.com/copperhead/copperhead$ python setup.py install
/home/rgomes/local-git/github.com/copperhead/copperhead/setuptools-0.6c9-py2.7.egg-info already exists
scons: Reading SConscript files ...
Checking g++ version... (cached) 4.6.3
Checking nvcc version... (cached) 4.2
Checking for C++ library cudart... (cached) yes
Checking for C++ library python2.7... (cached) yes
Checking for C++ library boost_python... no
You need the Boost::Python library to compile this program
Consider installing it, or changing BOOST_PYTHON_LIBNAME in siteconf.py
Traceback (most recent call last):
  File "setup.py", line 40, in <module>
    raise CompileError("Error while building Python Extensions")
distutils.errors.CompileError: Error while building Python Extensions


Could you please help me understand what I'm doing wrong?

Thanks


Bryan Catanzaro

unread,
Aug 30, 2012, 1:11:26 AM8/30/12
to copperhe...@googlegroups.com
I've run into problems like this before due to stale SCons caches.  Can you try deleting your .scons_temp directory, the .sconsign.dblite database, and your config.log, and then rebuilding?  If that fails, please attach the config.log file that is produced by SCons.

Best,
bryan

Richard Gomes

unread,
Aug 30, 2012, 8:40:27 PM8/30/12
to copperhe...@googlegroups.com
Hello Bryan

Thanks a lot for your help.

On the spot, by the way.
I've deleted the directories you pointed out and it now works fine.

I just wanted to point out that configuration of THRUST_DIR is confusing.
I had to specify the directory which contains the "thrust" directory, not the "thrust" directory itself.
So, I had to enter

THRUST_DIR = "/opt/cuda-dev"

because I have actually thrust include files under directory /opt/cuda-dev/thrust/
This is my configuration, in case others find this thread useful:


BOOST_INC_DIR = "/opt/cuda-dev/boost-1.48.0/include"
BOOST_LIB_DIR = "/opt/cuda-dev/boost-1.48.0/lib"
BOOST_PYTHON_LIBNAME = "boost_python"
CUDA_INC_DIR = "/usr/local/cuda/include"
CUDA_LIB_DIR = "/usr/local/cuda/lib"
NP_INC_DIR = "/usr/lib/python2.7/dist-packages/numpy/core/include"
TBB_INC_DIR = None
TBB_LIB_DIR = None
THRUST_DIR = "/opt/cuda-dev"

I've also built Boost from sources into a separate directory (as can be seen from the configuration above) in order to avoid any sort of trouble in case system's Boost libraries change for whatever reason.

I believe that these points would be highly helpful in the installation instructions, including the trick related to SCons you mentioned.

Again, thanks a lot for your help and for Copperhead.

Cheers :)

-- Richard Gomes

Richard Gomes

unread,
Aug 30, 2012, 9:16:01 PM8/30/12
to copperhe...@googlegroups.com
Edit:

My architecture is AMD64.

It required a small change:

CUDA_LIB_DIR = "/usr/local/cuda/lib64"

... and a full recompilation:

$ rm -r -f .sconf_temp/ .sconsign.dblite config.log
$ python setup.py clean
$ python setup.py install

I've succesfully executed a couple of examples.

Thanks

-- Richard
Reply all
Reply to author
Forward
0 new messages