Subject: Re: Handling of implicit (but required) buildlink3.mk due to package options?
To: Hubert Feyrer <hubert@feyrer.de>
From: Brian de Alwis <bsd@cs.ubc.ca>
List: tech-pkg
Date: 03/15/2007 16:04:52
In /etc/mk.conf.  My PKG_OPTIONS.ffmpeg is actually:

    PKG_OPTIONS.ffmpeg=lame vorbis faac

Building multimedia/vlc produces an error while linking:

    /usr/pkg/lib/libavcodec.a(faac.o): In function `Faac_encode_init':
    faac.c:(.text+0x35): undefined reference to `faacEncOpen'
    faac.c:(.text+0x3f): undefined reference to `faacEncGetCurrentConfiguration'
    faac.c:(.text+0x8a): undefined reference to `faacEncSetConfiguration'
    faac.c:(.text+0xd8): undefined reference to `faacEncGetDecoderSpecificInfo'
    faac.c:(.text+0x111): undefined reference to `faacEncClose'
    /usr/pkg/lib/libavcodec.a(faac.o): In function `Faac_encode_close':
    faac.c:(.text+0x15f): undefined reference to `faacEncClose'
    /usr/pkg/lib/libavcodec.a(faac.o): In function `Faac_encode_frame':
    faac.c:(.text+0x18f): undefined reference to `faacEncEncode'
    /usr/pkg/lib/libavcodec.a(mp3lameaudio.o): In function `MP3lame_encode_init':
    mp3lameaudio.c:(.text+0x2d): undefined reference to `lame_init'
    mp3lameaudio.c:(.text+0x3f): undefined reference to `lame_set_in_samplerate'
    mp3lameaudio.c:(.text+0x4b): undefined reference to `lame_set_out_samplerate'
    mp3lameaudio.c:(.text+0x57): undefined reference to `lame_set_num_channels'
    mp3lameaudio.c:(.text+0x62): undefined reference to `lame_set_quality'
    [...]
    /usr/pkg/lib/libavcodec.a(oggvorbis.o): In function `oggvorbis_decode_frame':
    oggvorbis.c:(.text+0x4b): undefined reference to `vorbis_synthesis'
    oggvorbis.c:(.text+0x75): undefined reference to `vorbis_synthesis_pcmout'
    oggvorbis.c:(.text+0x13b): undefined reference to `vorbis_synthesis_read'
    oggvorbis.c:(.text+0x169): undefined reference to `vorbis_synthesis_blockin'
    [...]

The only solution I've found so far is to explicitly include the
buildlink3.mk's in multimedia/vlc/Makefile -- but that undesirable.

Brian.

On 2007.03.15 19:07:52 +0100, Hubert Feyrer wrote:
> On Thu, 15 Mar 2007, Brian de Alwis wrote:
> >>How did you build ffmpeg with additional options?
> >
> >Through the package options framework:
> >
> >   PKG_OPTIONS.ffmpeg=faad a52
> 
> in the environment, on the command line, in /etc/mk.conf, ...?
> 
> 
>  - Hubert

-- 
  Brian de Alwis | Software Practices Lab | UBC | http://www.cs.ubc.ca/~bsd/
      "Amusement to an observing mind is study." - Benjamin Disraeli