[FFmpeg-user] Problem building with OpenCV support

Misha Penkov misha.penkov at gmail.com
Thu Jun 28 05:05:34 CEST 2012


On 27 June 2012 21:29, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:
> Misha Penkov <misha.penkov <at> gmail.com> writes:
>
>> --as-needed isn't in my man gcc,
>
> man ld

I see.

> You could try --extra-ldflags=--no-as-needed

This doesn't have an effect.  I don't think the actual --as-needed
flag is the problem here, though, because this works fine:

gcc -Wl --as-needed -I/usr/local/include/opencv -I/usr/local/include
/usr/local/lib/libopencv_calib3d.so
/usr/local/lib/libopencv_contrib.so /usr/local/lib/libopencv_core.so
/usr/local/lib/libopencv_features2d.so
/usr/local/lib/libopencv_flann.so /usr/local/lib/libopencv_gpu.so
/usr/local/lib/libopencv_highgui.so
/usr/local/lib/libopencv_imgproc.so /usr/local/lib/libopencv_legacy.so
/usr/local/lib/libopencv_ml.so /usr/local/lib/libopencv_nonfree.so
/usr/local/lib/libopencv_objdetect.so
/usr/local/lib/libopencv_photo.so
/usr/local/lib/libopencv_stitching.so /usr/local/lib/libopencv_ts.so
/usr/local/lib/libopencv_video.so
/usr/local/lib/libopencv_videostab.so -o check.out check.o
-lopencore-amrwb -lopencore-amrnb -lmp3lame -lfaac -lm -pthread -lbz2
-lz -lrt

but this doesn't:

gcc -Wl,--as-needed -I/usr/local/include/opencv -I/usr/local/include
/usr/local/lib/libopencv_calib3d.so
/usr/local/lib/libopencv_contrib.so /usr/local/lib/libopencv_core.so
/usr/local/lib/libopencv_features2d.so
/usr/local/lib/libopencv_flann.so /usr/local/lib/libopencv_gpu.so
/usr/local/lib/libopencv_highgui.so
/usr/local/lib/libopencv_imgproc.so /usr/local/lib/libopencv_legacy.so
/usr/local/lib/libopencv_ml.so /usr/local/lib/libopencv_nonfree.so
/usr/local/lib/libopencv_objdetect.so
/usr/local/lib/libopencv_photo.so
/usr/local/lib/libopencv_stitching.so /usr/local/lib/libopencv_ts.so
/usr/local/lib/libopencv_video.so
/usr/local/lib/libopencv_videostab.so -o check.out check.o
-lopencore-amrwb -lopencore-amrnb -lmp3lame -lfaac -lm -pthread -lbz2
-lz -lrt

The culprit seems to be the comma before --as-needed.  How can I get
rid of it?  More importantly, what's going on?  Is it a compiler bug?

I tried this with gcc 4.4.3 and gcc-4.6.2 -- the result is the same.

Cheers,
Misha

>
>> but I googled around and found this:
>
> I don't think what is described there helps with your problem.
>
> Carl Eugen
>
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user


More information about the ffmpeg-user mailing list