Recently
I installed Ubuntu 12.04(precision pangolin) on my Mac OS X lion. As
I would like to play with Parrot AR. Drone quadcopter platform, I
have to install AR. Drone SDK firstly. Due to my colleague has made
this SDK compile straight away on Ubuntu 11.10, I thought the same
story happen on Ubuntu 12.04. Unfortunately, I encounter some video
codec and recorder issue from ffmpeg and some library missing
issue(e.g., libcwiid1.dev) .
Here
I listed several issues I encounter when I compile this SDK on Ubuntu
12.04 as following:
In
file included from ../../VLIB/../VLIB/video_controller.h:5:0,
from
../../VLIB/../VLIB/video_codec.h:4,
from
../../VLIB/video_codec.c:1:
../VP_Api/vp_api_picture.h:16:30:
fatal error: libavutil/avutil.h: No such file or directory
compilation
terminated.
make[4]:
***
[../../Soft/Build/targets_versions/ffmpeg_Intel_PROD_MODE_Linux_3.2.0-24-generic-pae_GNU_Linux_gcc_4.6.3/video_codec.o]
Error 1
make[3]:
*** [all] Error 2
make[2]:
*** [build_vlib] Error 2
make[1]:
*** [all] Error 2
make:
*** [build_libs] Error 2
Then
I followed this link
(https://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuide) to
install ffmepg, and then compile SDK again. It seems like the above
error is gone. However, I got the following error.
In
file included from
../..//Soft/Lib/ardrone_tool/Video/video_stage_ffmpeg_recorder.c:43:0:
/usr/local/include/libavfilter/avfilter.h:992:19: fatal error: audio.h: No such file or directory
compilation terminated.
make4: *** [../../Soft/Build/targets_versions/ardrone_lib_PROD_MODE_ffmpeg_Intel_Linux_3.2.0-24-generic_GNU_Linux_gcc_4.6.3/ardrone_tool/Video/video_stage_ffmpeg_recorder.o] Error 1
make3: *** [all] Error 2
make2: *** [build_lib] Error 2
make1: *** [all] Error 2
make: *** [build_libs] Error 2
/usr/local/include/libavfilter/avfilter.h:992:19: fatal error: audio.h: No such file or directory
compilation terminated.
make4: *** [../../Soft/Build/targets_versions/ardrone_lib_PROD_MODE_ffmpeg_Intel_Linux_3.2.0-24-generic_GNU_Linux_gcc_4.6.3/ardrone_tool/Video/video_stage_ffmpeg_recorder.o] Error 1
make3: *** [all] Error 2
make2: *** [build_lib] Error 2
make1: *** [all] Error 2
make: *** [build_libs] Error 2
When
I double check the ffmpeg library in my system, I found there are two
identical header files about ffmepg in my system. One is under
/usr/include/libavformat, the other is
/usr/local/include/libavformat. By carefully comparing, they have
different size even though their names are exactly the same. The one
under /usr/include should be the latest one which are created when
you follow the above ffmpeg link, while the other under
/usr/local/include should be come with system. I just overwrite the
system one by the latest one.
sudo
cp -rf /usr/include/libavformat /usr/local/include
And
then compile the SDK again, it passed the compilation. Hopefully it
would help you as well.
By
the way, if it keeps prompt you to install libcwiid1.dev when you are
compilling, you can go to open ardrone_SDK/ARDroneLib/Soft/Build/check_dependencies.sh and then
subtitute the libcwiid1.dev to libcwiid.dev, which works for me.