I'm building OpenCV2.4.3 on ubuntu12.04, it stops here.
Linking CXX executable ../../bin/opencv_perf_gpu
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvCapture_FFMPEG::init()':
ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG4initEv+0x0): multiple definition of
CvCapture_FFMPEG::init()'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4initEv+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvCapture_FFMPEG::close()':
ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG5closeEv+0x0): multiple definition of
CvCapture_FFMPEG::close()'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG5closeEv+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvCapture_FFMPEG::open(char const*)':
ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKc+0x0): multiple definition of
CvCapture_FFMPEG::open(char const)'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKc+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvCapture_FFMPEG::retrieveFrame(int, unsigned char**, int*, int*, int*, int*)':
ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG13retrieveFrameEiPPhPiS2_S2_S2_+0x0): multiple definition of
CvCapture_FFMPEG::retrieveFrame(int, unsigned char, int, int, int, int)'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG13retrieveFrameEiPPhPiS2_S2_S2_+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvCapture_FFMPEG::r2d(AVRational)':
ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG3r2dE10AVRational+0x0): multiple definition of
CvCapture_FFMPEG::r2d(AVRational)'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG3r2dE10AVRational+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvCapture_FFMPEG::get_duration_sec()':
ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG16get_duration_secEv+0x0): multiple definition of
CvCapture_FFMPEG::get_duration_sec()'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG16get_duration_secEv+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvCapture_FFMPEG::get_bitrate()':
ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG11get_bitrateEv+0x0): multiple definition of
CvCapture_FFMPEG::get_bitrate()'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG11get_bitrateEv+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvCapture_FFMPEG::get_fps()':
ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG7get_fpsEv+0x0): multiple definition of
CvCapture_FFMPEG::get_fps()'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG7get_fpsEv+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvCapture_FFMPEG::get_total_frames()':
ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG16get_total_framesEv+0x0): multiple definition of
CvCapture_FFMPEG::get_total_frames()'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG16get_total_framesEv+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvCapture_FFMPEG::getProperty(int)':
ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG11getPropertyEi+0x0): multiple definition of
CvCapture_FFMPEG::getProperty(int)'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG11getPropertyEi+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvCapture_FFMPEG::dts_to_sec(long long)':
ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG10dts_to_secEx+0x0): multiple definition of
CvCapture_FFMPEG::dts_to_sec(long long)'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG10dts_to_secEx+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvCapture_FFMPEG::dts_to_frame_number(long long)':
ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG19dts_to_frame_numberEx+0x0): multiple definition of
CvCapture_FFMPEG::dts_to_frame_number(long long)'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG19dts_to_frame_numberEx+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvCapture_FFMPEG::grabFrame()':
ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG9grabFrameEv+0x0): multiple definition of
CvCapture_FFMPEG::grabFrame()'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG9grabFrameEv+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvCapture_FFMPEG::seek(long long)':
ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG4seekEx+0x0): multiple definition of
CvCapture_FFMPEG::seek(long long)'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4seekEx+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvCapture_FFMPEG::seek(double)':
ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG4seekEd+0x0): multiple definition of
CvCapture_FFMPEG::seek(double)'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4seekEd+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvCapture_FFMPEG::setProperty(int, double)':
ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG11setPropertyEid+0x0): multiple definition of
CvCapture_FFMPEG::setProperty(int, double)'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG11setPropertyEid+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvVideoWriter_FFMPEG::init()':
ffmpeg_video_source.cpp:(.text._ZN20CvVideoWriter_FFMPEG4initEv+0x0): multiple definition of
CvVideoWriter_FFMPEG::init()'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4initEv+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvVideoWriter_FFMPEG::writeFrame(unsigned char const*, int, int, int, int, int)':
ffmpeg_video_source.cpp:(.text._ZN20CvVideoWriter_FFMPEG10writeFrameEPKhiiiii+0x0): multiple definition of
CvVideoWriter_FFMPEG::writeFrame(unsigned char const, int, int, int, int, int)'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG10writeFrameEPKhiiiii+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvVideoWriter_FFMPEG::close()':
ffmpeg_video_source.cpp:(.text._ZN20CvVideoWriter_FFMPEG5closeEv+0x0): multiple definition of
CvVideoWriter_FFMPEG::close()'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG5closeEv+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvVideoWriter_FFMPEG::open(char const*, int, double, int, int, bool)':
ffmpeg_video_source.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiib+0x0): multiple definition of
CvVideoWriter_FFMPEG::open(char const, int, double, int, int, bool)'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiib+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function cvCreateFileCapture_FFMPEG':
ffmpeg_video_source.cpp:(.text.cvCreateFileCapture_FFMPEG+0x0): multiple definition of
cvCreateFileCapture_FFMPEG'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.cvCreateFileCapture_FFMPEG+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function cvReleaseCapture_FFMPEG':
ffmpeg_video_source.cpp:(.text.cvReleaseCapture_FFMPEG+0x0): multiple definition of
cvReleaseCapture_FFMPEG'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.cvReleaseCapture_FFMPEG+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function cvSetCaptureProperty_FFMPEG':
ffmpeg_video_source.cpp:(.text.cvSetCaptureProperty_FFMPEG+0x0): multiple definition of
cvSetCaptureProperty_FFMPEG'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.cvSetCaptureProperty_FFMPEG+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function cvGetCaptureProperty_FFMPEG':
ffmpeg_video_source.cpp:(.text.cvGetCaptureProperty_FFMPEG+0x0): multiple definition of
cvGetCaptureProperty_FFMPEG'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.cvGetCaptureProperty_FFMPEG+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function cvGrabFrame_FFMPEG':
ffmpeg_video_source.cpp:(.text.cvGrabFrame_FFMPEG+0x0): multiple definition of
cvGrabFrame_FFMPEG'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.cvGrabFrame_FFMPEG+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function cvRetrieveFrame_FFMPEG':
ffmpeg_video_source.cpp:(.text.cvRetrieveFrame_FFMPEG+0x0): multiple definition of
cvRetrieveFrame_FFMPEG'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.cvRetrieveFrame_FFMPEG+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function cvCreateVideoWriter_FFMPEG':
ffmpeg_video_source.cpp:(.text.cvCreateVideoWriter_FFMPEG+0x0): multiple definition of
cvCreateVideoWriter_FFMPEG'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.cvCreateVideoWriter_FFMPEG+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function cvReleaseVideoWriter_FFMPEG':
ffmpeg_video_source.cpp:(.text.cvReleaseVideoWriter_FFMPEG+0x0): multiple definition of
cvReleaseVideoWriter_FFMPEG'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.cvReleaseVideoWriter_FFMPEG+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function cvWriteFrame_FFMPEG':
ffmpeg_video_source.cpp:(.text.cvWriteFrame_FFMPEG+0x0): multiple definition of
cvWriteFrame_FFMPEG'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.cvWriteFrame_FFMPEG+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function OutputMediaStream_FFMPEG::close()':
ffmpeg_video_source.cpp:(.text._ZN24OutputMediaStream_FFMPEG5closeEv+0x0): multiple definition of
OutputMediaStream_FFMPEG::close()'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN24OutputMediaStream_FFMPEG5closeEv+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function OutputMediaStream_FFMPEG::addVideoStream(AVFormatContext*, CodecID, int, int, int, double, PixelFormat)':
ffmpeg_video_source.cpp:(.text._ZN24OutputMediaStream_FFMPEG14addVideoStreamEP15AVFormatContext7CodecIDiiid11PixelFormat+0x0): multiple definition of
OutputMediaStream_FFMPEG::addVideoStream(AVFormatContext, CodecID, int, int, int, double, PixelFormat)'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN24OutputMediaStream_FFMPEG14addVideoStreamEP15AVFormatContext7CodecIDiiid11PixelFormat+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function OutputMediaStream_FFMPEG::open(char const*, int, int, double)':
ffmpeg_video_source.cpp:(.text._ZN24OutputMediaStream_FFMPEG4openEPKciid+0x0): multiple definition of
OutputMediaStream_FFMPEG::open(char const, int, int, double)'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN24OutputMediaStream_FFMPEG4openEPKciid+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function OutputMediaStream_FFMPEG::write(unsigned char*, int, int)':
ffmpeg_video_source.cpp:(.text._ZN24OutputMediaStream_FFMPEG5writeEPhii+0x0): multiple definition of
OutputMediaStream_FFMPEG::write(unsigned char, int, int)'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN24OutputMediaStream_FFMPEG5writeEPhii+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function create_OutputMediaStream_FFMPEG':
ffmpeg_video_source.cpp:(.text.create_OutputMediaStream_FFMPEG+0x0): multiple definition of
create_OutputMediaStream_FFMPEG'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.create_OutputMediaStream_FFMPEG+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function release_OutputMediaStream_FFMPEG':
ffmpeg_video_source.cpp:(.text.release_OutputMediaStream_FFMPEG+0x0): multiple definition of
release_OutputMediaStream_FFMPEG'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.release_OutputMediaStream_FFMPEG+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function write_OutputMediaStream_FFMPEG':
ffmpeg_video_source.cpp:(.text.write_OutputMediaStream_FFMPEG+0x0): multiple definition of
write_OutputMediaStream_FFMPEG'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.write_OutputMediaStream_FFMPEG+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function InputMediaStream_FFMPEG::open(char const*, int*, int*, int*, int*)':
ffmpeg_video_source.cpp:(.text._ZN23InputMediaStream_FFMPEG4openEPKcPiS2_S2_S2_+0x0): multiple definition of
InputMediaStream_FFMPEG::open(char const, int, int, int, int)'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN23InputMediaStream_FFMPEG4openEPKcPiS2_S2_S2_+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function InputMediaStream_FFMPEG::close()':
ffmpeg_video_source.cpp:(.text._ZN23InputMediaStream_FFMPEG5closeEv+0x0): multiple definition of
InputMediaStream_FFMPEG::close()'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN23InputMediaStream_FFMPEG5closeEv+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function release_InputMediaStream_FFMPEG':
ffmpeg_video_source.cpp:(.text.release_InputMediaStream_FFMPEG+0x0): multiple definition of
release_InputMediaStream_FFMPEG'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.release_InputMediaStream_FFMPEG+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function create_InputMediaStream_FFMPEG':
ffmpeg_video_source.cpp:(.text.create_InputMediaStream_FFMPEG+0x0): multiple definition of
create_InputMediaStream_FFMPEG'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.create_InputMediaStream_FFMPEG+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function InputMediaStream_FFMPEG::read(unsigned char**, int*, int*)':
ffmpeg_video_source.cpp:(.text._ZN23InputMediaStream_FFMPEG4readEPPhPiS2_+0x0): multiple definition of
InputMediaStream_FFMPEG::read(unsigned char, int, int)'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN23InputMediaStream_FFMPEG4readEPPhPiS2_+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function read_InputMediaStream_FFMPEG':
ffmpeg_video_source.cpp:(.text.read_InputMediaStream_FFMPEG+0x0): multiple definition of
read_InputMediaStream_FFMPEG'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.read_InputMediaStream_FFMPEG+0x0): first defined here
collect2: ld 返回 1
make[2]: [bin/opencv_perf_gpu] 错误 1
make[1]: [modules/gpu/CMakeFiles/opencv_perf_gpu.dir/all] 错误 2
make: ** [all] 错误 2
Some functions are defined by two files of OpenCV, but I don't know how to deal with it.