[Ffmpeg-devel] [PATCH] rewrite vhook/drawtext.c

Víctor Paesa wzrlpy
Tue Sep 5 18:35:35 CEST 2006


> Hi,
>
>> On 9/5/06, V?ctor Paesa <wzrlpy at arsystel.com> wrote:
>>> Hi,
>>>
>>> > On 9/4/06, Gustavo Sverzut Barbieri <barbieri at gmail.com> wrote:
>>> >> On 9/4/06, Diego Biurrun <diego at biurrun.de> wrote:
>>> >> > On Mon, Sep 04, 2006 at 10:19:39AM -0300, Gustavo Sverzut Barbieri
>>> >> wrote:
>>> >> > >
>>> >> > > Comments are always welcome!
>>> >> > >
>>> >> > > --- Makefile  (revision 6159)
>>> >> > > +++ Makefile  (working copy)
>>> >> > > @@ -15,12 +15,18 @@
>>> >> > >
>>> >> > >  ifeq ($(HAVE_FREETYPE2),yes)
>>> >> > >      HOOKS += drawtext$(SLIBSUF)
>>> >> > > -    CFLAGS += `freetype-config --cflags`
>>> >> > > -    LDFLAGS += `freetype-config --libs`
>>> >> > > +
>>> >> > > +drawtext.o: drawtext.c
>>> >> > > +     $(CC) $(CFLAGS) -Wall -Werror -g -c -o $@ $<
>>> $(VHOOKCFLAGS)
>>> >> `freetype-config --cflags`
>>> >> >
>>> >> > Leave this like it was before, this is redundant.
>>> >>
>>> >> So, should I add $(freetype-config --cflags) and $(freetype-config
>>> >> --libs) to flags so every hook will like to it?
>>> >
>>> > Okay, the old way do not work (as imlib2 vhook also doesn't) because
>>> > it do not find symbols.
>>> >
>>> > looks like the -Wl,--as-needed is not working as expected... I never
>>> > played with this linker flag before, any hints?
>>> >
>>>
>>> In which platform are you finding undefined symbols?
>>>
>>> If it is Cygwin, the patch ffmpeg.cygwin.vhook.7.patch that is in
>>> http://thread.gmane.org/gmane.comp.video.ffmpeg.devel/33973/focus=35575
>>
>> regular linux (ubuntu dapper).
>>
>> does imlib2 vhook works for you? Seems that linker flag --as-need
>> works as expected for binaries, but not for libraries?
>>
>
> Yes, imlib2 and all the vhooks work (after applying
> ffmpeg.cygwin.vhook.7.patch).
>
> Cygwin ignores "-Wl,--as-needed" that's why I did the patch.
> Have you tried it?

Sorry, I expressed myself badly, I really mean "Have you tried to adapt it?"

You should add

+VHOOKSHFLAGS="-shared"
+VHOOKLIBS='-Wl,--no-whole-archive \
+           -L../libavformat -lavformat$(BUILDSUF) \
+           -L../libavcodec  -lavcodec$(BUILDSUF)  \
+           -L../libavutil   -lavutil$(BUILDSUF) $(EXTRALIBS)'

and also

+echo "VHOOKLIBS=$VHOOKLIBS" >> config.mak

somewhere in your platform section in configure.

And copy as they are the patch chunks that modify vhook/Makefile

Regards,
V?ctor




More information about the ffmpeg-devel mailing list