[MacPorts] #21014: OpenCV 1.0.0 does not build on snow leopard

MacPorts noreply at macports.org
Sun Feb 21 15:29:05 PST 2010


#21014: OpenCV 1.0.0 does not build on snow leopard
-------------------------------------------+--------------------------------
  Reporter:  grundmann.matthias@…          |       Owner:  ryandesign@…           
      Type:  defect                        |      Status:  closed                 
  Priority:  Normal                        |   Milestone:                         
 Component:  ports                         |     Version:  1.8.0                  
Resolution:  fixed                         |    Keywords:  LP64                   
      Port:  opencv                        |  
-------------------------------------------+--------------------------------

Comment(by ryanlei750328@…):

 Replying to [comment:50 ryandesign@…]:
 > Updated and fixed in r64069.

 The latest port results in the following errors:
 {{{
 $ sudo port install -d opencv
 Password:
 --->  Computing dependencies for opencv
 --->  Building opencv
 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: ranlib: file: .libs/lib_cvaux.a(lib_cvaux_la-decomppoly.o)
 has no symbols
 ranlib: file: .libs/lib_cvaux.a(lib_cvaux_la-enmin.o) has no symbols
 ranlib: file: .libs/lib_cvaux.a(lib_cvaux_la-extendededges.o) has no
 symbols
 In file included from highgui/cvcap_ffmpeg.cpp:97:
 /opt/local/include/libavformat/avformat.h:164:1: warning: "PKT_FLAG_KEY"
 redefined
 In file included from highgui/cvcap_ffmpeg.cpp:87:
 /usr/local/include/ffmpeg/avcodec.h:991:1: warning: this is the location
 of the previous definition
 libtool: link: ( cd ".libs" && rm -f "lib_cvaux.la" && ln -s
 "../lib_cvaux.la" "lib_cvaux.la" )
 /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-grfmt_imageio.lo -MD -MP -MF .deps/lib_highgui_la-
 grfmt_imageio.Tpo -c -o lib_highgui_la-grfmt_imageio.lo `test -f
 'highgui/grfmt_imageio.cpp' || echo './'`highgui/grfmt_imageio.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-grfmt_imageio.lo -MD -MP -MF .deps
 /lib_highgui_la-grfmt_imageio.Tpo -c highgui/grfmt_imageio.cpp  -fno-
 common -DPIC -o .libs/lib_highgui_la-grfmt_imageio.o
 In file included from highgui/cvcap_ffmpeg.cpp:97:
 /opt/local/include/libavformat/avformat.h:117: error: redefinition of
 'struct AVPacket'
 /usr/local/include/ffmpeg/avcodec.h:942: error: previous definition of
 'struct AVPacket'
 /opt/local/include/libavformat/avformat.h:163: error: invalid type in
 declaration before ';' token
 /opt/local/include/libavformat/avformat.h:163: error: conflicting
 declaration 'typedef int AVPacket'
 /usr/local/include/ffmpeg/avcodec.h:988: error: 'AVPacket' has a previous
 declaration as 'typedef struct AVPacket AVPacket'
 /opt/local/include/libavformat/avformat.h: In function 'void
 av_free_packet(AVPacket*)':
 /opt/local/include/libavformat/avformat.h:211: error: 'void
 av_free_packet(AVPacket*)' was declared 'extern' and later 'static'
 /usr/local/include/ffmpeg/avcodec.h:2863: error: previous declaration of
 'void av_free_packet(AVPacket*)'
 highgui/cvcap_ffmpeg.cpp: In member function 'virtual bool
 CvCapture_FFMPEG::grabFrame()':
 highgui/cvcap_ffmpeg.cpp:546: warning: 'avcodec_decode_video' is
 deprecated (declared at /usr/local/include/ffmpeg/avcodec.h:3354)
 highgui/cvcap_ffmpeg.cpp:548: warning: 'avcodec_decode_video' is
 deprecated (declared at /usr/local/include/ffmpeg/avcodec.h:3354)
 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[2]: *** Waiting for unfinished jobs....
 mv -f .deps/lib_highgui_la-grfmt_imageio.Tpo .deps/lib_highgui_la-
 grfmt_imageio.Plo
 make[1]: *** [all-recursive] Error 1
 make: *** [all] Error 2

 Error: Status 1 encountered during processing.
 }}}

 I previously installed ffmpeg with no arguments. Is that wrong?

-- 
Ticket URL: <http://trac.macports.org/ticket/21014#comment:52>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list