MacOS 10.6.7: OpenCV + Python27

Brickle Macho bricklemacho at gmail.com
Tue Apr 5 18:06:35 PDT 2011


I am trying to install OpenCV, QT and Python on MacOS 10.6.7 via Mac
Ports.  Everything seems to install except for OpenCV.   I am just
learning Python, OpenCV and QT so hopefully I may have overlooked
something simple, like setting an environment variable.  The MacPorts
OpenCV installation fails.  I have followed the following steps:

After doing a selfupdate and upgrade outdated I installed: python27,
py27-qt4, python27-numpy, and python_select install sucessfully.   I
then ran python_select python27. I am able to run the examples from Mark
Summerfiled's book:  Rapid GUI Programming with Python and QT so suggest
that PYQT4 is working.  Then I attempted to install opencv with python
bindings as follows:

sudo port install opencv +python27

Any help with the following error would be appreciated:


....
--->  Building opencv
Error: Target org.macports.build returned: shell command failed (see log
for details)
Log for opencv is at:
/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_graphics_opencv/main.log
Error: Status 1 encountered during processing.
To report a bug, see <http://guide.macports.org/#project.tickets>


Looking at the log file I see:

tail -20
/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_graphics_opencv/main.log

:info:build Generating file index...
:info:build Generating example index...
:info:build Generating file member index...
:info:build finalizing index lists...
:info:build finished...
:info:build /opt/local/bin/cmake -E cmake_progress_report
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_graphics_opencv/work/OpenCV-2.2.0/CMakeFiles

:info:build [ 74%] Built target DOXY_HTML
:info:build make[2]: ***
[modules/features2d/CMakeFiles/opencv_features2d.dir/src/matchers.o] Error 1
:info:build make[1]: ***
[modules/features2d/CMakeFiles/opencv_features2d.dir/all] Error 2
:info:build make: *** [all] Error 2
:info:build shell command " cd
"/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_graphics_opencv/work/OpenCV-2.2.0"
&& /usr/bin/make -j4 all " returned error 2
:error:build Target org.macports.build returned: shell command failed
(see log for details)
:debug:build Backtrace: shell command failed (see log for details)
    while executing
"command_exec build"
    (procedure "portbuild::build_main" line 8)
    invoked from within
"$procedure $targetname"
:info:build Warning: the following items did not execute (for opencv):
org.macports.activate org.macports.build org.macports.destroot
org.macports.install
:notice:build Log for opencv is at:
/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_graphics_opencv/main.log


More information about the macports-users mailing list