ilikecats567 / pyopencv

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

Error while run setup.py build #7

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Download OpenCV
2. Compile and Install Boost_1_42_0, NumPy, bjam
3. Install PyOpenCV

What is the expected output? What do you see instead?

/usr/lib/python2.6/dist-packages/Pyrex/Compiler/Errors.py:17: 
DeprecationWarning: BaseException.message has been deprecated as of Python 
2.6
  self.message = message
running build
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
error: at /usr/share/boost-build/build/project.jam:884 
error: duplicate initialization of gcc with the following parameters: 
error: version = 4.3.3
error: previous initialization at /usr/share/boost-
build/build/project.jam:884

error: command 'bjam' failed with exit status 1

What version of the product are you using? On what operating system?
Python 2.6, Boost 1.42.0, Boost-Jam 3.1.17, Python-NumPy 1.2.1, PyOpenCV2.0 
wr.1.1.0, Ubuntu 9.04

Please provide any additional information below.

Original issue reported on code.google.com by dna.extrim on 1 Apr 2010 at 8:23

GoogleCodeExporter commented 8 years ago
The problem is probably at how you configure Boost. Please don't use Ubuntu's
pre-built boost (i.e. see my comments on the Installation page of Boost and 
bjam). It
won't work for now. Instead, please use boost's source distribution, and let me 
know
if the problem still persists.

Thanks.
Minh-Tri

Original comment by pmtri80@gmail.com on 1 Apr 2010 at 10:18

GoogleCodeExporter commented 8 years ago
Perhaps, if you could post your config.py file, it would be easier to determine 
where
the error was.

Original comment by pmtri80@gmail.com on 1 Apr 2010 at 10:43

GoogleCodeExporter commented 8 years ago
import os
from glob import glob

# OpenCV 2.0 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_dir = "/usr/local"
boost_include_dirs = [boost_dir+"/include/boost"]
boost_library_dirs = [boost_dir+"/lib"]
boost_libraries = []
boost_runtime_library_dirs = []
boost_runtime_libraries_to_be_bundled = []

Original comment by dna.extrim on 2 Apr 2010 at 8:57

GoogleCodeExporter commented 8 years ago
Thanks. That config.py file pretty much confirms that you are connecting 
PyOpenCV to
an Ubuntu's pre-built boost package. Please download a Boost source distribution
modify your config.py file to connect to the Boost source distribution instead.

Cheers,
Minh-Tri

Original comment by pmtri80@gmail.com on 3 Apr 2010 at 11:00

GoogleCodeExporter commented 8 years ago
I have download the source of boost, but when I try to keep showing the same 
error 
message. Then I tried to replace boost_include_dirs variables with arbitrary 
values. 
Example:
boost_include_dirs = ["zxcvbnm"]
and the result is the same error.

is there any python package or another package that has not been installed?

Thank you very much earlier.

Sorry if my english not very good.

Original comment by dna.extrim on 3 Apr 2010 at 8:49

GoogleCodeExporter commented 8 years ago
I don't think you have missed out any package at all. Could you modify your 
config.py
file as follows with 'boost_dir' adapted to your system and post the resultant 
error
message?

# Boost library's source distribution, to be linked against using bjam+gcc and 
bundled with
boost_dir = "/home/<your_username>/boost_1.41.0/" # enter your boost source 
folder here
boost_include_dirs = [boost_dir]
boost_library_dirs = []
boost_libraries = []
boost_runtime_library_dirs = []
boost_runtime_libraries_to_be_bundled = []

Also, what is the response when you go to the boost source folder and type 
"bjam"?

Cheers,
Minh-Tri

Original comment by pmtri80@gmail.com on 3 Apr 2010 at 9:16

GoogleCodeExporter commented 8 years ago
I had to modify config.py file, but still the same error appears. To more 
clearly I 
included a video at the time run the "setup.sh build" in the flv format.

If I run the command bjam in boost in the source folder will be the compilation 
process.

Thanks.

Original comment by dna.extrim on 4 Apr 2010 at 6:15

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks for the video. I think I know where the problem is. It appears that 
there is a
file named 'site-config.jam' lurking around somewhere in your home folder. 
Could you
please try running bjam manually with --debug-configuration and look for a line 
that
looks like:

notice: Loading site-config configuration file site-config.jam from
path/to/site-config.jam . 

and then uncomment a line that looks like

using gcc ;

in that file, and run setup.py again?

Minh-Tri

Original comment by pmtri80@gmail.com on 4 Apr 2010 at 10:58

GoogleCodeExporter commented 8 years ago
For this problem already finished, but i having new problem. Do I must write 
new 
problem my on issue new?

Original comment by dna.extrim on 7 Apr 2010 at 6:26

GoogleCodeExporter commented 8 years ago
Glad to know that you have fixed the first problem. For the second problem, 
just file
it here if it is related to the first one. It doesn't matter to me where you 
file it
though.

Cheers,
Minh-Tri

Original comment by pmtri80@gmail.com on 7 Apr 2010 at 10:05

GoogleCodeExporter commented 8 years ago
Thank you for the solution because I have fixed my first problem. The following 
error 
messages on the second problem when running "setup build."

... Failed gcc.compile.c + + / 
home/dnaextrim/boost_1_42_0/bin.v2/libs/python/build/gcc-4.3.3/release/link-
static/exec.o ...
... Skipped <p/home/dnaextrim/boost_1_42_0/bin.v2/libs/python/build/gcc-
4.3.3/release/link-static> object / function_doc_signature.o for lack of / 
home/dnaextrim/boost_1_42_0 / bin.v2/libs/python/build/gcc-4.3.3/release/link-
static/object ...
... Skipped <p/home/dnaextrim/boost_1_42_0/bin.v2/libs/python/build/gcc-
4.3.3/release/link-static> libboost_python.a (clean) for lack of <p / home / 
dnaextrim / 
boost_1_42_0/bin.v2/libs/python/build/gcc-4.3.3/release/link-static> 
numeric.o ...
... Skipped <p/home/dnaextrim/boost_1_42_0/bin.v2/libs/python/build/gcc-
4.3.3/release/link-static> libboost_python.a for lack of 
<p/home/dnaextrim/boost_1_42_0 / 
bin.v2/libs/python/build/gcc-4.3.3/release/link-
static> numeric.o ...
... Skipped <pbin/gcc-4.3.3/release/link-static> pyopencvext.so for lack of 
<p/home/dnaextrim/boost_1_42_0/bin.v2/libs/python/build/gcc-4.3.3 / release / 
link-
static> libboost_python.a ...
... Skipped for lack of <pbin/test_ext.test/gcc-4.3.3/release/link-static> 
test_ext 
<pbin/gcc-4.3.3/release/link-static> pyopencvext.so ...
... Failed updating 16 targets ...
... Skipped 19 targets ...
... Updated 217 targets ...
error: command 'bjam' failed with exit status 1

Original comment by dna.extrim on 7 Apr 2010 at 10:34

GoogleCodeExporter commented 8 years ago
I tried to re-compile using the source boost_1_41_0 displays an error message 
like 
the following. 

capture-output bin/test_ext.test/gcc-4.3.3/release/link-static/test_ext 
====== BEGIN OUTPUT ====== 
Segmentation fault 

EXIT STATUS: 139 
====== END OUTPUT ====== 

    LD_LIBRARY_PATH = / usr / bin: / usr / lib: / usr/lib32: / usr/lib64: $ 
LD_LIBRARY_PATH 
export LD_LIBRARY_PATH 

    PYTHONPATH = bin/gcc-4.3.3/release/link-static 
export PYTHONPATH 
 "Python" "_get_ext.py"> "bin/test_ext.test/gcc-4.3.3/release/link-
static/test_ext.output" 2> & 1 
    status = $? 
    echo>> "bin/test_ext.test/gcc-4.3.3/release/link-static/test_ext.output" 
    echo EXIT STATUS: $ status>> "bin/test_ext.test/gcc-4.3.3/release/link-
static/test_ext.output" 
    if test $ status-eq 0; then 
        cp "bin/test_ext.test/gcc-4.3.3/release/link-static/test_ext.output" 
"bin/test_ext.test/gcc-4.3.3/release/link-static/test_ext" 
    fi 
    verbose = 0 
    if the test $ status-ne 0; then 
        verbose = 1 
    fi 
    if test $ verbose-eq 1; then 
        echo ====== BEGIN OUTPUT ====== 
        paint "bin/test_ext.test/gcc-4.3.3/release/link-static/test_ext.output" 
        echo ====== END OUTPUT ====== 
    fi 
    exit $ status 

... Failed bin/test_ext.test/gcc-4.3.3/release/link-static/test_ext 
capture-output 
... 
... Failed updating 1 target ... 
... Skipped 1 target ... 
... Updated 218 targets ... 
error: command 'bjam' failed with exit status 1 

Original comment by dna.extrim on 8 Apr 2010 at 4:04

GoogleCodeExporter commented 8 years ago
Sorry for my late response. I have been busy with other stuff. Have you managed 
to
fix the problem yet? Anyway, I haven't seen this kind of error before. Among the
error messages you received, was there any one more specific, e.g., one that 
looks
like "<path_to_some_source_file>: error: ....."? 

Original comment by pmtri80@gmail.com on 9 Apr 2010 at 10:19

GoogleCodeExporter commented 8 years ago
I think I have found a bug at the bjamcompiler.py file. Could you please, for 
now,
install numpy 1.3.0 or later first, and then try installing PyOpenCV again?

Thanks,

Cheers,
Minh-Tri

Original comment by pmtri80@gmail.com on 13 Apr 2010 at 3:33

GoogleCodeExporter commented 8 years ago
Thank you for your solution, now I have successfully installed pyopencv 
perfectly. 
Apparently the problem is in NumPy version, after I installed NumPy version 1.3 
installation process went well.

Thanks,

Cheers,
Dony Wahyu Isp

Original comment by dna.extrim on 17 Apr 2010 at 4:49

GoogleCodeExporter commented 8 years ago
Glad to know you have the problem resolved. Fyi, I have patched the bug-fix 
code for
this issue to PyOpenCV 2.1.0.wr.1.0.1.

Cheers,
Minh-Tri

Original comment by pmtri80@gmail.com on 17 Apr 2010 at 8:03

GoogleCodeExporter commented 8 years ago
Is there any other way to get this working on Ubuntu, except to edit 
/etc/bjam/site-
config.jam and remove:

using gcc ;

Is this unexcepted behavior? if this is a Ubuntu bug I will report this 
upstream.

Original comment by gijsmole...@gmail.com on 20 Apr 2010 at 1:46

GoogleCodeExporter commented 8 years ago
Hi Gijs,

It's neither a bug nor an unexpected behavior. As far as I know, some Linux
distributions include this "using gcc ;" line in the user's configuration file 
for
boost by default, and some don't. The local 'Jamroot' file is generated by the
'bjamcompiler.py' file every time the user runs setup.py. Therefore, to avoid 
having
to edit '/etc/bjam/site-config.jam', we can edit file 'bjamcompiler.py' and 
write
extra code to check if "using gcc ;" has been included. However, I am still 
learning
the bjam syntax myself and I just don't have time to tweak the 
'bjamcompiler.py' file
yet.

Cheers,
Minh-Tri

Original comment by pmtri80@gmail.com on 20 Apr 2010 at 2:37