WARNING: This server is unstable and will be retired in the next days. If you want to keep this forum available, please request immediately a migration on the Nabble Support forum. Forums that don't receive any migration request will be deleted forever.

 « Return to Thread: Gazebo Build Fails

Re: Gazebo Build Fails

by luca.gherardi :: Rate this Message:

| View in Thread

Hello all,

I'm trying to build from source and I currently have the same problem described in this post.

I tried to edit the file  /usr/include/libavutil/common.h (not  /usr/local/include/libavutil/common.h) accordingly to the instructions described here but it didn't fix the problem.
Are there any know issue? How can I fix it?

This is the result of cmake:

brics@brics-desktop:~/Downloads/gazebo-0.10.0/build$ cmake ..
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Gazebo version 0.10.0
--

====== Finding 3rd Party Packages ======
-- Operating system is Linux
-- Looking for XOpenDisplay in /usr/lib/i386-linux-gnu/libX11.so;/usr/lib/i386-linux-gnu/libXext.so
-- Looking for XOpenDisplay in /usr/lib/i386-linux-gnu/libX11.so;/usr/lib/i386-linux-gnu/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /usr/lib/i386-linux-gnu/libX11.so
-- Found FLTK: fltk_images;fltk_forms;fltk_gl;/usr/lib/libGL.so;fltk
-- checking for module 'ode>=0.10.1'
--   found ode, version 0.11.1
-- checking for module 'freeimage>=3.9.0'
--   package 'freeimage>=3.9.0' not found
--   freeimage.pc not found, trying freeimage_include_dir and freeimage_library_dir flags.
--   Looking for FreeImage.h - found
--   Looking for libfreeimage - found
-- checking for module 'OGRE>=1.6.3'
--   found OGRE, version 1.6.4
-- checking for module 'libxml-2.0'
--   found libxml-2.0, version 2.7.8
-- checking for module 'xft'
--   found xft, version 2.2.0
-- checking for module 'openal'
--   found openal, version 1.12.854
-- checking for module 'libavformat'
--   found libavformat, version 52.64.2
-- checking for module 'libavcodec'
--   found libavcodec, version 52.72.2
-- checking for module 'playercore>=3.0'
--   package 'playercore>=3.0' not found
-- Warning: Player not found. The gazebo plugin for player will not be built. See the following website: http://playerstage.sourceforge.net
-- checking for module 'websim'
--   package 'websim' not found
-- Warning: Websim not found. Webgazebo will not be built
-- Boost version: 1.42.0
-- Boost version: 1.42.0
-- Found the following Boost libraries:
--   thread
--   signals
-- Boost Include Path: /usr/include
-- Boost Library Path: /usr/lib
-- Boost Libraries: ;optimized;/usr/lib/libboost_thread-mt.so;debug;/usr/lib/libboost_thread-mt.so;optimized;/usr/lib/libboost_signals-mt.so;debug;/usr/lib/libboost_signals-mt.so
-- Threadpool Include Path:
-- Looking for avformat.h - found
-- Looking for avcodec.h - found
-- Looking for event.h - found
-- Looking for ltdl.h - found
-- Looking for libltdl - found
-- Looking for dlfcn.h - found
-- Looking for libdl - found
-- Looking for assimp.hpp - not found. Using built in version.
-- Looking for libassimp - not found. Using builtin version.
-- Looking for btBulletDynamicsCommon.h - not found
-- Looking for bullet libraries - found
-- ----------------------------------------

-- Cmake C Flags:
-- Build Type: RELEASE
-- Install path: /usr/local
-- Configuration successful. Type make to compile gazebo
-- Configuring done
-- Generating done
-- Build files have been written to: ~/Downloads/gazebo-0.10.0/build


If you need more information about everything just ask me.
Thanks,
Luca

blacksheep423 wrote:
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


------------------------------------------------------------------------------
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

 « Return to Thread: Gazebo Build Fails