[GRASS-dev] cvs compilation problem - nviz?

Bob Covill bcovill at tekmap.ns.ca
Thu Jul 26 09:17:16 EDT 2007


On Thu, 2007-07-26 at 00:07 +0100, Glynn Clements wrote:
> Glynn Clements wrote:
> 
> > > almost similar to a recent post of Helena, I have problems compiling cvs 
> > > on a fedora 7 / NVIDIA machine. But I get another error:
> > > Errors in:
> > > /usr/local/src/grass-cvs/grass6/lib/ogsf
> > > /usr/local/src/grass-cvs/grass6/visualization/nviz
> > > 
> > > Changing to /lib/ogsf and running make:
> > > gcc -I/usr/local/src/grass-cvs/grass6/dist.i686-pc-linux-gnu/include -g 
> > > -O2 -fPIC -DPACKAGE=\""grasslibs"\" -I/usr/local/include 
> > > -DPACKAGE=\""grasslibs"\" -I/usr/local/include/ffmpeg 
> > > -I/usr/local/src/grass-cvs/grass6/dist.i686-pc-linux-gnu/include \
> > > -o OBJ.i686-pc-linux-gnu/gsd_img_ppm.o -c gsd_img_ppm.c
> > > In file included from gsd_img_ppm.c:20:
> > > /usr/local/include/ffmpeg/avcodec.h:2252: warning: "ImgReSampleContext" is deprecated
> > > /usr/local/include/ffmpeg/avcodec.h:2258: warning: "ImgReSampleContext" is deprecated
> > > gsd_img_ppm.c: In function "gsd_init_mpeg":
> > > gsd_img_ppm.c:122: error: "mpeg1video_encoder" undeclared (first use in this function)
> > > gsd_img_ppm.c:122: error: (Each undeclared identifier is reported only once
> > > gsd_img_ppm.c:122: error: for each function it appears in.)
> > > make: *** [OBJ.i686-pc-linux-gnu/gsd_img_ppm.o] Error 1
> > > 
> > > As far as I can tell ffmpeg is installed correctly (mpeg1video_encoder 
> > > is defined in config.h, no errors) ... any tip?
> > 
> > It should be declared in avcodec.h:
> > 
> > 	extern AVCodec mpeg1video_encoder;
> > 
> > I don't have a config.h in the ffmpeg include directory, and
> > gsd_image_ppm.c doesn't #include it (in fact, if it did have
> > "#include <config.h>", there's no guarantee that it would be ffmpeg's
> > config.h which was included; config.h is a rather common name).
> > 
> > It appears that your version of ffmpeg isn't compatible with the OGSF
> > library; I can only suggest removing --with-ffmpeg from your configure
> > command.
> 
> I've just upgraded to ffmpeg 0.4.9, and I see the same problem. None
> of the installed headers define the *_encoder variables, so I assume
> that the only solution which will work with recent versions of ffmpeg
> is to replace register_avcodec() with avcodec_register_all().
> 

Glynn,

I just grabbed the latest version of FFMPEG and get the same problem. I
replaced register_avcodec() with avcodec_register_all() and rebuilt ogsf
and nviz. I then generated a movie and it worked with this change. With
this change the 2nd avcodec_register_all() and
register_avcodec(&xvid_encoder) should probably be removed (?) from
gsd_img_ppm.c. They are inside "#ifdef USE_XVID".

--
Bob




More information about the grass-dev mailing list