[Buildroot] [PATCH] ffmpeg: fix static linking build failure when using libavutil

Thomas Petazzoni thomas.petazzoni at bootlin.com
Fri Oct 12 19:50:08 UTC 2018


Hello,

On Fri, 12 Oct 2018 19:38:14 +0200, Giulio Benetti wrote:

> >>>> Indeed, when we're dynamic linking, there is no need to link consumers
> >>>> of libavutil with libdrm. It is only when we're statically linking that
> >>>> it should be done. And that's exactly what Libs vs. Libs.private is for.  
> >>>
> >>> You've explained me it very well, but by now FFmpeg upstreamed my patch:
> >>> https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/c50dc77ac708e98d02da7c422a6b9cbf9f565aa5
> >>>
> >>> So, do I rework and resubmit to them or can I re-create a patch for BR
> >>> with what you've pointed me above?  
> I've missed one thing to ask you about ffmpeg:
> Can I still use this hack:
> https://git.ffmpeg.org/gitweb/ffmpeg.git/blobdiff/bc2301429e9c779237e43acf913331af018211f2..c50dc77ac708e98d02da7c422a6b9cbf9f565aa5:/configure
> 
> to obtain if -ldrm is used and then add it to Libs.private like this:
> Libs.private: -ldrm
> 
> as you've pointed me.
> 
> Or there is something that makes it simpler and better?

I'm not sure what "hack" you're talking about here. My only point it is
only needed to link "indirect" libraries when static linking, and
therefore such "indirect" libraries should be listed in Libs.private
and not Libs in pkg-config files.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


More information about the buildroot mailing list