I ran into this exact problem yesterday doing a Ubuntu source install of Gazebo, and fortunately remember just how to fix it!

As root, you have to edit the common.h file, so do:

sudo emacs(vim/nano/whatever) /usr/local/include/libavutil/common.h

and at the top, add the following lines:

#ifdef __cplusplus
#define __STDC_CONSTANT_MACROS

#ifdef  _STDINT_H
#undef _STDINT_H
#endif

#include <stdint.h>
#endif

You won't be allowed to edit this file, which is part of the notoriously buggy FFMpeg library, unless you have superuser privileges, so make sure you will be able to do this.  It should solve the problem, so just do a 'make clean', reconfigure using cmake and make it again.

Good luck!  This is but a speed bump on the long road known as Installing Gazebo

John


On Jun 23, 2011, at 12:53 PM, Hunter Allen wrote:


I am having trouble building Gazebo. The error has something to do with
libavcodec. I don't know what's wrong here... Here's the error:


allenh1@allenh1-Vostro-430:~/Gazebo/build$ make
[ 38%] Built target assimp
[ 41%] Built target gazeboshm
[ 48%] Built target gazebo_rendering
[ 56%] Built target gazebo_physics
[ 62%] Built target gazebo_physics_ode
[ 87%] Built target gazebo_server
[ 87%] Building CXX object
server/audio_video/CMakeFiles/gazebo_av-shared.dir/AudioDecoder.o
In file included from /usr/local/include/libavutil/avutil.h:96:0,
                from /usr/local/include/libavcore/avcore.h:27,
                from /usr/local/include/libavcore/samplefmt.h:22,
                from /usr/local/include/libavcodec/avcodec.h:30,
                from /usr/include/libavformat/avformat.h:56,
                from
/home/allenh1/Gazebo/server/audio_video/AudioDecoder.hh:36,
                from
/home/allenh1/Gazebo/server/audio_video/AudioDecoder.cc:33:
/usr/local/include/libavutil/common.h: In function ‘int32_t
av_clipl_int32_c(int64_t)’:
/usr/local/include/libavutil/common.h:168:47: error: ‘UINT64_C’ was not
declared in this scope
/home/allenh1/Gazebo/server/audio_video/AudioDecoder.cc: In member function
‘int AudioDecoder::Decode(uint8_t**, unsigned int*)’:
/home/allenh1/Gazebo/server/audio_video/AudioDecoder.cc:104:22: warning:
‘int avcodec_decode_audio2(AVCodecContext*, int16_t*, int*, const uint8_t*,
int)’ is deprecated (declared at
/usr/local/include/libavcodec/avcodec.h:3594)
/home/allenh1/Gazebo/server/audio_video/AudioDecoder.cc:105:49: warning:
‘int avcodec_decode_audio2(AVCodecContext*, int16_t*, int*, const uint8_t*,
int)’ is deprecated (declared at
/usr/local/include/libavcodec/avcodec.h:3594)
make[2]: ***
[server/audio_video/CMakeFiles/gazebo_av-shared.dir/AudioDecoder.o] Error 1
make[1]: *** [server/audio_video/CMakeFiles/gazebo_av-shared.dir/all] Error
2
make: *** [all] Error 2

--
View this message in context: http://old.nabble.com/Gazebo-Build-Fails-tp31911229p31911229.html
Sent from the playerstage-users mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It's vRanger. Get your free trial download today.
http://p.sf.net/sfu/quest-sfdev2dev
_______________________________________________
Playerstage-users mailing list
Playerstage-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-users