MrNiebieski / pyopencv

Automatically exported from code.google.com/p/pyopencv
0 stars 0 forks source link

build failure ! #8

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

When i run "python setup.py build" on ubuntu 8.04 , build fails

Steps followed;

1. Downloaded OpenCV2.1.0 performed make and make install--> no issues
2. Download Boost.Python version 1.41.0
3. Manually downloaded bjam from sourceforge
3. Downloaded pyopencv via svn checkout 
http://pyopencv.googlecode.com/svn/trunk/ pyopencv-read-only
4. created config.py as per example ie

"
import os
from glob import glob

# OpenCV 2.x library, to be linked against using bjam+gcc
opencv_dir = "/usr/local"
opencv_include_dirs = [opencv_dir+"/include/opencv"]
opencv_library_dirs = [opencv_dir+"/lib"]
opencv_libraries = ["highgui", "ml", "cvaux", "cv", "cxcore"]
opencv_runtime_library_dirs = []
opencv_runtime_libraries_to_be_bundled = []

# Boost library's source distribution, to be linked against using bjam+gcc 
and bundled with
boost_include_dirs = ["/home/paul/boost_1_41_0"]
boost_library_dirs = []
boost_libraries = []
boost_runtime_library_dirs = []
boost_runtime_libraries_to_be_bundled = []
"

5. ran python setup.py install but got build error. Part of the errors 
follow below :

running build_py
copying pyopencv/config.py -> build/lib.linux-i686-2.6/pyopencv
running build_ext
building 'pyopencv.pyopencvext' extension
bjam release test link=static
notice: no Python configured in user-config.jam
notice: will use default configuration
...patience...
...patience...
...found 2665 targets...
...updating 252 targets...
gcc.compile.c++ bin/gcc-4.3.3/release/link-
static/pyopencv/pyopencvext/lsh_hash.pypp.o
In file included from 
/home/paul/boost_1_41_0/boost/python/detail/prefix.hpp:13,
                 from /home/paul/boost_1_41_0/boost/python/args.hpp:8,
                 from /home/paul/boost_1_41_0/boost/python.hpp:11,
                 from pyopencv/pyopencvext/lsh_hash.pypp.cpp:3:
/home/paul/boost_1_41_0/boost/python/detail/wrap_python.hpp:75:24: error: 
patchlevel.h: No such file or directory
/home/paul/boost_1_41_0/boost/python/detail/wrap_python.hpp:78:2: error: 
#error Python 2.2 or higher is required for this version of Boost.Python.
/home/paul/boost_1_41_0/boost/python/detail/wrap_python.hpp:142:21: error: 
Python.h: No such file or directory
/home/paul/boost_1_41_0/boost/python/detail/wrap_python.hpp:203:4: error: 
#error "HAVE_LONG_LONG defined but not PY_LONG_LONG or LONG_LONG"
In file included from /home/paul/boost_1_41_0/boost/python/cast.hpp:13,
                 from /home/paul/boost_1_41_0/boost/python/handle.hpp:10,
                 from /home/paul/boost_1_41_0/boost/python/args_fwd.hpp:10,
                 from /home/paul/boost_1_41_0/boost/python/args.hpp:10,
                 from /home/paul/boost_1_41_0/boost/python.hpp:11,
                 from pyopencv/pyopencvext/lsh_hash.pypp.cpp:3:
/home/paul/boost_1_41_0/boost/python/base_type_traits.hpp:24: error: 
‘PyObject’ was not declared in this scope
/home/paul/boost_1_41_0/boost/python/base_type_traits.hpp:24: error: 
template argument 1 is invalid
/home/paul/boost_1_41_0/boost/python/base_type_traits.hpp:30: error: 
‘PyTypeObject’ was not declared in this scope
/home/paul/boost_1_41_0/boost/python/base_type_traits.hpp:30: error: 
template argument 1 is invalid
/home/paul/boost_1_41_0/boost/python/base_type_traits.hpp:36: error: 
‘PyMethodObject’ was not declared in this scope
/home/paul/boost_1_41_0/boost/python/base_type_traits.hpp:36: error: 
template argument 1 is invalid
In file included from /home/paul/boost_1_41_0/boost/python/handle.hpp:11,
                 from /home/paul/boost_1_41_0/boost/python/args_fwd.hpp:10,
                 from /home/paul/boost_1_41_0/boost/python/args.hpp:10,
                 from /home/paul/boost_1_41_0/boost/python.hpp:11,
                 from pyopencv/pyopencvext/lsh_hash.pypp.cpp:3:
/home/paul/boost_1_41_0/boost/python/errors.hpp:51: error: expected 
constructor, destructor, or type conversion before ‘*’ token
In file included from /home/paul/boost_1_41_0/boost/python/handle.hpp:13,
                 from /home/paul/boost_1_41_0/boost/python/args_fwd.hpp:10,
                 from /home/paul/boost_1_41_0/boost/python/args.hpp:10,
                 from /home/paul/boost_1_41_0/boost/python.hpp:11,
                 from pyopencv/pyopencvext/lsh_hash.pypp.cpp:3:
/home/paul/boost_1_41_0/boost/python/handle_fwd.hpp:12: error: expected 
type-specifier before ‘PyObject’
/home/paul/boost_1_41_0/boost/python/handle_fwd.hpp:12: error: expected ‘>’ 
before ‘PyObject’
In file included from /home/paul/boost_1_41_0/boost/python/handle.hpp:14,
                 from /home/paul/boost_1_41_0/boost/python/args_fwd.hpp:10,
                 from /home/paul/boost_1_41_0/boost/python/args.hpp:10,
                 from /home/paul/boost_1_41_0/boost/python.hpp:11,
                 from pyopencv/pyopencvext/lsh_hash.pypp.cpp:3:
/home/paul/boost_1_41_0/boost/python/refcount.hpp: In function ‘T* 
boost::python::incref(T*)’:
/home/paul/boost_1_41_0/boost/python/refcount.hpp:16: error: ‘PyObject’ was 
not declared in this scope
/home/paul/boost_1_41_0/boost/python/refcount.hpp: In function ‘T* 
boost::python::xincref(T*)’:
/home/paul/boost_1_41_0/boost/python/refcount.hpp:23: error: ‘PyObject’ was 
not declared in this scope
/home/paul/boost_1_41_0/boost/python/refcount.hpp: In function ‘void 
boost::python::decref(T*)’:
/home/paul/boost_1_41_0/boost/python/refcount.hpp:30: error: ‘PyObject’ was 
not declared in this scope
/home/paul/boost_1_41_0/boost/python/refcount.hpp: In function ‘void 
boost::python::xdecref(T*)’:
/home/paul/boost_1_41_0/boost/python/refcount.hpp:36: error: ‘PyObject’ was 
not declared in this scope
In file included from /home/paul/boost_1_41_0/boost/python/args_fwd.hpp:10,
                 from /home/paul/boost_1_41_0/boost/python/args.hpp:10,
                 from /home/paul/boost_1_41_0/boost/python.hpp:11,
                 from pyopencv/pyopencvext/lsh_hash.pypp.cpp:3:
/home/paul/boost_1_41_0/boost/python/handle.hpp: In constructor 
‘boost::python::handle<T>::handle(boost::python::detail::borrowed_reference
_t*)’:
/home/paul/boost_1_41_0/boost/python/handle.hpp:130: error: ‘PyObject’ was 
not declared in this scope
/home/paul/boost_1_41_0/boost/python/handle.hpp:130: error: expected 
primary-expression before ‘)’ token
/home/paul/boost_1_41_0/boost/python/handle.hpp: At global scope:
/home/paul/boost_1_41_0/boost/python/handle.hpp:157: error: ‘PyTypeObject’ 
was not declared in this scope
/home/paul/boost_1_41_0/boost/python/handle.hpp:157: error: template 
argument 1 is invalid
/home/paul/boost_1_41_0/boost/python/handle.hpp:157: error: invalid type in 
declaration before ‘;’ token
/home/paul/boost_1_41_0/boost/python/handle.hpp:256: error: expected 
initializer before ‘*’ token
In file included from /home/paul/boost_1_41_0/boost/python/args.hpp:10,
                 from /home/paul/boost_1_41_0/boost/python.hpp:11,
                 from pyopencv/pyopencvext/lsh_hash.pypp.cpp:3:
/home/paul/boost_1_41_0/boost/python/args_fwd.hpp:26: error: template 
argument 1 is invalid
In file included from 
/home/paul/boost_1_41_0/boost/python/object/pointer_holder.hpp:14,
                 from 
/home/paul/boost_1_41_0/boost/python/to_python_indirect.hpp:10,
                 from 
/home/paul/boost_1_41_0/boost/python/converter/arg_to_python.hpp:10,
                 from /home/paul/boost_1_41_0/boost/python/call.hpp:15,
                 from 
/home/paul/boost_1_41_0/boost/python/object_core.hpp:12,
                 from /home/paul/boost_1_41_0/boost/python/args.hpp:25,
                 from /home/paul/boost_1_41_0/boost/python.hpp:11,
                 from pyopencv/pyopencvext/lsh_hash.pypp.cpp:3:
/home/paul/boost_1_41_0/boost/python/instance_holder.hpp:34: error: 
‘PyObject’ has not been declared
/home/paul/boost_1_41_0/boost/python/instance_holder.hpp:41: error: 
expected ‘;’ before ‘(’ token
/home/paul/boost_1_41_0/boost/python/instance_holder.hpp:45: error: 
‘PyObject’ has not been declared
In file included from 
/home/paul/boost_1_41_0/boost/python/object/pointer_holder.hpp:21,
                 from 
/home/paul/boost_1_41_0/boost/python/to_python_indirect.hpp:10,
                 from 
/home/paul/boost_1_41_0/boost/python/converter/arg_to_python.hpp:10,
                 from /home/paul/boost_1_41_0/boost/python/call.hpp:15,
                 from 
/home/paul/boost_1_41_0/boost/python/object_core.hpp:12,
                 from /home/paul/boost_1_41_0/boost/python/args.hpp:25,
                 from /home/paul/boost_1_41_0/boost/python.hpp:11,
                 from pyopencv/pyopencvext/lsh_hash.pypp.cpp:3:
/home/paul/boost_1_41_0/boost/python/detail/wrapper_base.hpp:21: error: 
expected initializer before ‘*’ token
/home/paul/boost_1_41_0/boost/python/detail/wrapper_base.hpp:23: error: 
expected initializer before ‘*’ token
/home/paul/boost_1_41_0/boost/python/detail/wrapper_base.hpp:30: error: 
expected initializer before ‘*’ token
/home/paul/boost_1_41_0/boost/python/detail/wrapper_base.hpp:34: error: 
expected initializer before ‘*’ token
/home/paul/boost_1_41_0/boost/python/detail/wrapper_base.hpp:43: error: 
‘PyObject’ has not been declared
/home/paul/boost_1_41_0/boost/python/detail/wrapper_base.hpp:44: error: ISO 
C++ forbids declaration of ‘PyObject’ with no type
/home/paul/boost_1_41_0/boost/python/detail/wrapper_base.hpp:44: error: 
‘PyObject’ is neither function nor member function; cannot be declared 
friend
/home/paul/boost_1_41_0/boost/python/detail/wrapper_base.hpp:44: error: 
expected ‘;’ before ‘*’ token
/home/paul/boost_1_41_0/boost/python/detail/wrapper_base.hpp:49: error: 
‘PyTypeObject’ has not been declared
/home/paul/boost_1_41_0/boost/python/detail/wrapper_base.hpp:55: error: ISO 
C++ forbids declaration of ‘PyObject’ with no type
/home/paul/boost_1_41_0/boost/python/detail/wrapper_base.hpp:55: error: 
expected ‘;’ before ‘*’ token
/home/paul/boost_1_41_0/boost/python/detail/wrapper_base.hpp: In 
constructor ‘boost::python::detail::wrapper_base::wrapper_base()’:
/home/paul/boost_1_41_0/boost/python/detail/wrapper_base.hpp:46: error: 
class ‘boost::python::detail::wrapper_base’ does not have any field named 
‘m_self’
/home/paul/boost_1_41_0/boost/python/detail/wrapper_base.hpp: At global 
scope:
/home/paul/boost_1_41_0/boost/python/detail/wrapper_base.hpp:61: error: 
expected initializer before ‘*’ token
/home/paul/boost_1_41_0/boost/python/detail/wrapper_base.hpp:71: error: 
expected initializer before ‘*’ token
/home/paul/boost_1_41_0/boost/python/detail/wrapper_base.hpp:77: error: 
variable or field ‘initialize_wrapper’ declared void
/home/paul/boost_1_41_0/boost/python/detail/wrapper_base.hpp:77: error: 
‘PyObject’ was not declared in this scope
/home/paul/boost_1_41_0/boost/python/detail/wrapper_base.hpp:77: error: 
‘self’ was not declared in this scope
/home/paul/boost_1_41_0/boost/python/detail/wrapper_base.hpp:77: error: 
expected primary-expression before ‘*’ token
/home/paul/boost_1_41_0/boost/python/detail/wrapper_base.hpp:77: error: ‘w’ 
was not declared in this scope
/home/paul/boost_1_41_0/boost/python/detail/wrapper_base.hpp:82: error: 
variable or field ‘initialize_wrapper’ declared void
/home/paul/boost_1_41_0/boost/python/detail/wrapper_base.hpp:82: error: 
‘PyObject’ was not declared in this scope
/home/paul/boost_1_41_0/boost/python/detail/wrapper_base.hpp:82: error: 
expected primary-expression before ‘,’ token
/home/paul/boost_1_41_0/boost/python/detail/wrapper_base.hpp:82: error: 
expected primary-expression before ‘...’ token
In file included from 
/home/paul/boost_1_41_0/boost/preprocessor/iteration/detail/iter/forward1.h
pp:47,
                 from 
/home/paul/boost_1_41_0/boost/python/object/pointer_holder.hpp:63,
                 from 
/home/paul/boost_1_41_0/boost/python/to_python_indirect.hpp:10,
                 from 
/home/paul/boost_1_41_0/boost/python/converter/arg_to_python.hpp:10,
                 from /home/paul/boost_1_41_0/boost/python/call.hpp:15,
                 from 
/home/paul/boost_1_41_0/boost/python/object_core.hpp:12,
                 from /home/paul/boost_1_41_0/boost/python/args.hpp:25,
                 from /home/paul/boost_1_41_0/boost/python.hpp:11,
                 from pyopencv/pyopencvext/lsh_hash.pypp.cpp:3:
/home/paul/boost_1_41_0/boost/python/object/pointer_holder.hpp:186: error: 
expected `)' before ‘*’ token
In file included from 
/home/paul/boost_1_41_0/boost/preprocessor/iteration/detail/iter/forward1.h
pp:52,
                 from 
/home/paul/boost_1_41_0/boost/python/object/pointer_holder.hpp:63,
                 from 
/home/paul/boost_1_41_0/boost/python/to_python_indirect.hpp:10,
                 from 
/home/paul/boost_1_41_0/boost/python/converter/arg_to_python.hpp:10,
                 from /home/paul/boost_1_41_0/boost/python/call.hpp:15,
                 from 
/home/paul/boost_1_41_0/boost/python/object_core.hpp:12,
                 from /home/paul/boost_1_41_0/boost/python/args.hpp:25,
                 from /home/paul/boost_1_41_0/boost/python.hpp:11,
                 from pyopencv/pyopencvext/lsh_hash.pypp.cpp:3:
/home/paul/boost_1_41_0/boost/python/object/pointer_holder.hpp:186: error: 
expected `)' before ‘*’ token
In file included from 
/home/paul/boost_1_41_0/boost/preprocessor/iteration/detail/iter/forward1.h
pp:57,
                 from 
/home/paul/boost_1_41_0/boost/python/object/pointer_holder.hpp:63,
                 from 
/home/paul/boost_1_41_0/boost/python/to_python_indirect.hpp:10,
                 from 
/home/paul/boost_1_41_0/boost/python/converter/arg_to_python.hpp:10,
                 from /home/paul/boost_1_41_0/boost/python/call.hpp:15,
                 from 
/home/paul/boost_1_41_0/boost/python/object_core.hpp:12,
                 from /home/paul/boost_1_41_0/boost/python/args.hpp:25,
                 from /home/paul/boost_1_41_0/boost/python.hpp:11,
                 from pyopencv/pyopencvext/lsh_hash.pypp.cpp:3:
/home/paul/boost_1_41_0/boost/python/object/pointer_holder.hpp:186: error: 
expected `)' before ‘*’ token
In file included from 
/home/paul/boost_1_41_0/boost/preprocessor/iteration/detail/iter/forward1.h
pp:62,
                 from 
/home/paul/boost_1_41_0/boost/python/object/pointer_holder.hpp:63,
                 from 
/home/paul/boost_1_41_0/boost/python/to_python_indirect.hpp:10,
                 from 
/home/paul/boost_1_41_0/boost/python/converter/arg_to_python.hpp:10,
                 from /home/paul/boost_1_41_0/boost/python/call.hpp:15,
                 from 
/home/paul/boost_1_41_0/boost/python/object_core.hpp:12,
                 from /home/paul/boost_1_41_0/boost/python/args.hpp:25,
                 from /home/paul/boost_1_41_0/boost/python.hpp:11,
                 from pyopencv/pyopencvext/lsh_hash.pypp.cpp:3:
/home/paul/boost_1_41_0/boost/python/object/pointer_holder.hpp:186: error: 
expected `)' before ‘*’ token
In file included from 
/home/paul/boost_1_41_0/boost/preprocessor/iteration/detail/iter/forward1.h
pp:67,
                 from 
/home/paul/boost_1_41_0/boost/python/object/pointer_holder.hpp:63,
                 from 
/home/paul/boost_1_41_0/boost/python/to_python_indirect.hpp:10,
                 from 
/home/paul/boost_1_41_0/boost/python/converter/arg_to_python.hpp:10,
                 from /home/paul/boost_1_41_0/boost/python/call.hpp:15,
                 from 
/home/paul/boost_1_41_0/boost/python/object_core.hpp:12,
                 from /home/paul/boost_1_41_0/boost/python/args.hpp:25,
                 from /home/paul/boost_1_41_0/boost/python.hpp:11,
                 from pyopencv/pyopencvext/lsh_hash.pypp.cpp:3:
/home/paul/boost_1_41_0/boost/python/object/pointer_holder.hpp:186: error: 
expected `)' before ‘*’ token
In file included from 
/home/paul/boost_1_41_0/boost/preprocessor/iteration/detail/iter/forward1.h
pp:72,
                 from 
/home/paul/boost_1_41_0/boost/python/object/pointer_holder.hpp:63,
                 from 
/home/paul/boost_1_41_0/boost/python/to_python_indirect.hpp:10,
                 from 
/home/paul/boost_1_41_0/boost/python/converter/arg_to_python.hpp:10,
                 from /home/paul/boost_1_41_0/boost/python/call.hpp:15,
                 from 
/home/paul/boost_1_41_0/boost/python/object_core.hpp:12,
                 from /home/paul/boost_1_41_0/boost/python/args.hpp:25,
                 from /home/paul/boost_1_41_0/boost/python.hpp:11,
                 from pyopencv/pyopencvext/lsh_hash.pypp.cpp:3:
/home/paul/boost_1_41_0/boost/python/object/pointer_holder.hpp:186: error: 
expected `)' before ‘*’ token
In file included from 
/home/paul/boost_1_41_0/boost/preprocessor/iteration/detail/iter/forward1.h
pp:77,
                 from 
/home/paul/boost_1_41_0/boost/python/object/pointer_holder.hpp:63,
                 from 
/home/paul/boost_1_41_0/boost/python/to_python_indirect.hpp:10,
                 from 
/home/paul/boost_1_41_0/boost/python/converter/arg_to_python.hpp:10,
                 from /home/paul/boost_1_41_0/boost/python/call.hpp:15,
                 from 
/home/paul/boost_1_41_0/boost/python/object_core.hpp:12,
                 from /home/paul/boost_1_41_0/boost/python/args.hpp:25,
                 from /home/paul/boost_1_41_0/boost/python.hpp:11,
                 from pyopencv/pyopencvext/lsh_hash.pypp.cpp:3:
/home/paul/boost_1_41_0/boost/python/object/pointer_holder.hpp:186: error: 
expected `)' before ‘*’ token
In file included from 
/home/paul/boost_1_41_0/boost/preprocessor/iteration/detail/iter/forward1.h
pp:82,
                 from 
/home/paul/boost_1_41_0/boost/python/object/pointer_holder.hpp:63,
                 from 
/home/paul/boost_1_41_0/boost/python/to_python_indirect.hpp:10,
                 from 

Original issue reported on code.google.com by paul.mat...@gmail.com on 13 Apr 2010 at 1:26

GoogleCodeExporter commented 9 years ago
Thanks for the detailed log. If you look at the following line:

/home/paul/boost_1_41_0/boost/python/detail/wrap_python.hpp:78:2: error:
#error Python 2.2 or higher is required for this version of Boost.Python. 

It suggests that Python version lower than 2.2 was detected. PyOpenCV requires 
Python
2.5 or later. Thus, is it alright if you check if Python 2.5 is installed on 
that
machine?

Cheers,
Minh-Tri

Original comment by pmtri80@gmail.com on 13 Apr 2010 at 1:47

GoogleCodeExporter commented 9 years ago
Also, this line:

/home/paul/boost_1_41_0/boost/python/detail/wrap_python.hpp:142:21: error: 
Python.h: No such file or directory

suggests that you should have python-dev installed on Ubuntu.

Cheers,
Minh-Tri

Original comment by pmtri80@gmail.com on 13 Apr 2010 at 1:49

GoogleCodeExporter commented 9 years ago
Thanks for you prompt response. I have python2.5,2.6 and three installed. The 
problem 
was caused by python-dev. After I installed it, the build and install was 
successfull. 
Going forward can you list python-dev as one of the requirements as well ? 
alternatively can setup.py be setup such that it checks all the minimum 
requirements.

PS: Great Work

Original comment by paul.mat...@gmail.com on 13 Apr 2010 at 2:08

GoogleCodeExporter commented 9 years ago
Yes, I'm doing it now. Thanks.

Cheers,
Minh-Tri

Original comment by pmtri80@gmail.com on 13 Apr 2010 at 2:16