OpenCV 2.4.3 ffmpeg multiple definition [static build]
I'm building OpenCV 2.4.3 on ubuntu 12.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 ...