[GRASS-dev] NVIZ compile error with missing -lavformat

Glynn Clements glynn at gclements.plus.com
Mon Dec 17 20:07:33 EST 2007


Glynn Clements wrote:

> > > Compiling NVIZ from SVN trunk, I get following problem:
> > ....
> > >
> > /home/neteler/svngrass/dist.x86_64-unknown-linux-gnu/lib/libgrass_ogsf.so:
> > > undefined reference to `guess_format'
> > >
> > /home/neteler/svngrass/dist.x86_64-unknown-linux-gnu/lib/libgrass_ogsf.so:
> > > undefined reference to `av_destruct_packet_nofree'
> > ....
> > > collect2: ld returned 1 exit status
> > > make[1]: *** [nvwish] Error 1
> > > make[1]: Leaving directory
> > > `/home/neteler/svngrass/visualization/nviz/src'
> > > make: *** [default] Error 2
> > > 
> > > If I manually add -lavformat, the compilation works ok.
> > ...
> > > Any ideas how to automate that -lavformat is included?
> > 
> > 
> > the new ffmpeg movie format-by-extension code needs libavformat which
> > may come in a separate package to libavcodec.
> > (libavformat-dev and libavcodec-dev packages on Debian)
> > 
> > I don't know much about ./config scripts, but the attached is an
> > untested cut & paste job which might work. (I don't know about
> > -lavutil,..)
> 
> >  LOC_CHECK_LIBS(avcodec, avcodec_init, FFMPEG, $FFMPEGLIBPATH, FFMPEGLIB,,,,-lavutil $MATHLIB)
> > +LOC_CHECK_LIBS(avformat, av_set_parameters, FFMPEG, $FFMPEGLIBPATH, FFMPEGLIB,,,,-lavutil $MATHLIB)
> 
> I initially thought that this would replace FFMPEGLIB, but it will
> actually append to it, so it should be okay.

Committed.

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-dev mailing list