Opened 15 years ago

Closed 14 years ago

#23806 closed defect (worksforme)

opencv @2.0.0 build failure

Reported by: matteo.soccorsi@… Owned by: stante@…
Priority: Normal Milestone:
Component: ports Version: 1.8.2
Keywords: Cc: ryanlei750328@…, meo85@…, daniel.hornung@…, info@…
Port: opencv

Description

PPC G4 Mac OS 10.4.11 Xcode 2.5

libtool: compile:  /usr/bin/gcc-4.0 -DHAVE_CONFIG_H -I. -I.. -I../3rdparty/include -DNDEBUG -I../3rdparty/flann -I../3rdparty/flann/algorithms -I../3rdparty/flann/nn -I../3rdparty/flann/util -I/opt/local/include -O3 -falign-loops-max-skip=15 -falign-jumps-max-skip=15 -falign-loops=16 -falign-jumps=16 -falign-functions=16 -ffast-math -fstrict-aliasing -funroll-loops -ftree-loop-linear -ftree-loop-memset -mcpu=G4 -mpowerpc-gpopt -mtune=G5 -fsched-interblock -fgcse-sm -g -O2 -arch ppc -O2 -arch ppc -MT dlasq2.lo -MD -MP -MF .deps/dlasq2.Tpo -c lapack/dlasq2.c  -fno-common -DPIC -o .libs/dlasq2.o
lapack/dlasq2.c: In function 'dlasq2_':
lapack/dlasq2.c:13: internal compiler error: in memset_analyze_data_refs, at tree-ssa-loop-memset.c:138
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://developer.apple.com/bugreporter> for instructions.
make[2]: *** [dlasq2.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_graphics_opencv/work/OpenCV-2.0.0" && /usr/bin/make -j1 all " returned error 2
DEBUG: Backtrace: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_graphics_opencv/work/OpenCV-2.0.0" && /usr/bin/make -j1 all " returned error 2
    while executing
"command_exec build"
    (procedure "portbuild::build_main" line 9)
    invoked from within
"$procedure $targetname"
Warning: the following items did not execute (for opencv): org.macports.destroot org.macports.build
DEBUG: Registry error: unzip not registered as installed & active.
    while executing
"registry::active $portname"
Error: Unable to upgrade port: 1

Attachments (1)

opencv-Portfile.patch (437 bytes) - added by daniel.hornung@… 14 years ago.
Patch to the opencv Portfile

Download all attachments as: .zip

Change History (11)

comment:1 Changed 15 years ago by ryanlei750328@…

Intel C2D, Mac OS X 10.6.2, Xcode 3.2.1 (64-bit):

Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_graphics_opencv/work/OpenCV-2.0.0" && /usr/bin/make -j2 all " returned error 2
Command output: /usr/bin/make  all-recursive
Making all in 3rdparty
make[2]: Nothing to be done for `all'.
Making all in src
/bin/sh ../libtool  --tag=CXX   --mode=compile /usr/bin/g++-4.2 -DHAVE_CONFIG_H -I. -I..  -DNDEBUG  -I../include/opencv -I/opt/local/include -D_REENTRANT -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include   -I/opt/local/include/gtk-2.0 -I/opt/local/lib/gtk-2.0/include -I/opt/local/include/atk-1.0 -I/opt/local/include/cairo -I/opt/local/include/pango-1.0 -I/opt/local/include -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include/pixman-1 -I/opt/local/include/freetype2 -I/opt/local/include/libpng12 -fast -g  -O2 -arch x86_64 -MT lib_highgui_la-cvcap_ffmpeg.lo -MD -MP -MF .deps/lib_highgui_la-cvcap_ffmpeg.Tpo -c -o lib_highgui_la-cvcap_ffmpeg.lo `test -f 'highgui/cvcap_ffmpeg.cpp' || echo './'`highgui/cvcap_ffmpeg.cpp
libtool: compile:  /usr/bin/g++-4.2 -DHAVE_CONFIG_H -I. -I.. -DNDEBUG -I../include/opencv -I/opt/local/include -D_REENTRANT -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -I/opt/local/include/gtk-2.0 -I/opt/local/lib/gtk-2.0/include -I/opt/local/include/atk-1.0 -I/opt/local/include/cairo -I/opt/local/include/pango-1.0 -I/opt/local/include -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include/pixman-1 -I/opt/local/include/freetype2 -I/opt/local/include/libpng12 -fast -g -O2 -arch x86_64 -MT lib_highgui_la-cvcap_ffmpeg.lo -MD -MP -MF .deps/lib_highgui_la-cvcap_ffmpeg.Tpo -c highgui/cvcap_ffmpeg.cpp  -fno-common -DPIC -o .libs/lib_highgui_la-cvcap_ffmpeg.o
highgui/cvcap_ffmpeg.cpp:87:30: error: ffmpeg/avcodec.h: No such file or directory
highgui/cvcap_ffmpeg.cpp:93:30: error: ffmpeg/swscale.h: No such file or directory
highgui/cvcap_ffmpeg.cpp: In member function 'virtual bool CvVideoWriter_FFMPEG::open(const char*, int, double, CvSize, bool)':
highgui/cvcap_ffmpeg.cpp:1213: warning: 'av_alloc_format_context' is deprecated (declared at /opt/local/include/libavformat/avformat.h:873)
highgui/cvcap_ffmpeg.cpp:1213: warning: 'av_alloc_format_context' is deprecated (declared at /opt/local/include/libavformat/avformat.h:873)
make[2]: *** [lib_highgui_la-cvcap_ffmpeg.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Error: Status 1 encountered during processing.

As I checked, there's no folder ffmpeg in /opt/local/include. Instead, there're libavcodec, libavdevice, libavfilter, libavformat, libavutil, libpostproc, libswscale, possibly containing those missing headers. These directories are also found in ffmpeg source code.

comment:2 Changed 15 years ago by jmroot (Joshua Root)

Cc: stante@… removed
Keywords: opencv 2.0.0 build failure removed
Owner: changed from macports-tickets@… to stante@…

comment:3 Changed 15 years ago by ryanlei750328@…

Cc: ryanlei750328@… added

Cc Me!

comment:4 Changed 15 years ago by ryanlei750328@…

I don't know by whom and how it was fixed. But it works now! Thanks.

--->  Fetching opencv
--->  Verifying checksum(s) for opencv
--->  Extracting opencv
--->  Configuring opencv
--->  Building opencv
--->  Staging opencv into destroot
--->  Installing opencv @2.0.0_0
--->  Activating opencv @2.0.0_0
--->  Cleaning opencv

Regarding the "file not found" problems, you can fix the ffmpeg links like this:

sudo mkdir /opt/local/include/ffmpeg
cd /opt/local/include/ffmpeg
sudo ln -s /opt/local/include/libavcodec/avcodec.h avcodec.h
sudo ln -s /opt/local/include/libavformat/avformat.h avformat.h
sudo ln -s /opt/local/include/libswscale/swscale.h swscale.h
sudo ln -s /opt/local/include/libavformat/avio.h avio.h
sudo ln -s /opt/local/include/libavutil/avutil.h avutil.h

by setting links ffmpeg/xxx.h to /opt/local/include/libxxx/xxx.h.

comment:5 Changed 15 years ago by meo85@…

Cc: meo85@… added

Cc Me!

comment:6 Changed 15 years ago by meo85@…

Replying to matteo.soccorsi@…:

PPC G4 Mac OS 10.4.11 Xcode 2.5

 
 libtool: compile:  /usr/bin/gcc-4.0 -DHAVE_CONFIG_H -I. -I.. -I../3rdparty/include -DNDEBUG -I../3rdparty/flann -I../3rdparty/flann/algorithms -I../3rdparty/flann/nn -I../3rdparty/flann/util -I/opt/local/include -O3 -falign-loops-max-skip=15 -falign-jumps-max-skip=15 -falign-loops=16 -falign-jumps=16 -falign-functions=16 -ffast-math -fstrict-aliasing -funroll-loops -ftree-loop-linear -ftree-loop-memset -mcpu=G4 -mpowerpc-gpopt -mtune=G5 -fsched-interblock -fgcse-sm -g -O2 -arch ppc -O2 -arch ppc -MT dlasq2.lo -MD -MP -MF .deps/dlasq2.Tpo -c lapack/dlasq2.c  -fno-common -DPIC -o .libs/dlasq2.o
 lapack/dlasq2.c: In function 'dlasq2_':
 lapack/dlasq2.c:13: internal compiler error: in memset_analyze_data_refs, at tree-ssa-loop-memset.c:138
 Please submit a full bug report,
 with preprocessed source if appropriate.
 See <URL:http://developer.apple.com/bugreporter> for instructions.
 make[2]: *** [dlasq2.lo] Error 1
 make[1]: *** [all-recursive] Error 1
 make: *** [all] Error 2
 Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_graphics_opencv/work/OpenCV-2.0.0" && /usr/bin/make -j1 all " returned error 2
 DEBUG: Backtrace: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_graphics_opencv/work/OpenCV-2.0.0" && /usr/bin/make -j1 all " returned error 2
     while executing
 "command_exec build"
     (procedure "portbuild::build_main" line 9)
     invoked from within
 "$procedure $targetname"
 Warning: the following items did not execute (for opencv): org.macports.destroot org.macports.build
 DEBUG: Registry error: unzip not registered as installed & active.
     while executing
 "registry::active $portname"
 Error: Unable to upgrade port: 1
 

I have exactly the SAME problem on a Powermac G5 Quad (PPC) with OSX Leopard 10.5.8 The version of opencv is 2.0.0_1... any ideas? Thanks, Matteo

comment:7 Changed 14 years ago by daniel.hornung@…

I also had an "internal compiler error" with opencv on this machine:

9.6.0 Darwin Kernel Version 9.6.0: Mon Nov 24 17:39:01 PST 2008; root:xnu-1228.9.59~1/RELEASE_PPC Power Macintosh

The solution seems to be to enter the following line into the portfile, thus getting rid of gcc-4.0:

configure.compiler              gcc-4.2

I'll attach a small patch with this fix.

Changed 14 years ago by daniel.hornung@…

Attachment: opencv-Portfile.patch added

Patch to the opencv Portfile

comment:8 Changed 14 years ago by daniel.hornung@…

Cc: daniel.hornung@… added

Cc Me!

comment:9 Changed 14 years ago by info@…

Cc: info@… added

Cc Me!

comment:10 Changed 14 years ago by mf2k (Frank Schima)

Resolution: worksforme
Status: newclosed

Compiles fine for me with version 2.2. Someone can re-open if it's still a problem for them on Leopard or higher. If this is a Tiger problem, supply a patch or this bug won't be fixed.

Note: See TracTickets for help on using tickets.