[FFmpeg-devel] [PATCH] configure: add libm ldflags globally

Hendrik Leppkes h.leppkes at gmail.com
Tue Oct 17 00:38:03 EEST 2017


On Mon, Oct 16, 2017 at 11:02 PM, James Almer <jamrial at gmail.com> wrote:
> On 10/16/2017 2:36 PM, Jan Ekstrom wrote:
>> On Mon, Oct 16, 2017 at 7:31 PM, James Almer <jamrial at gmail.com> wrote:
>>> On 10/14/2017 12:59 PM, James Almer wrote:
>>>> It's used by every library, and by making it global we simplify a lot
>>>> of checks.
>>>>
>>
>> LGTM.
>>
>> I dislike the fact that we have to fix issues caused by 3rd party
>> libraries' pkg-config files but at this point the simplification for
>> things we also utilize kind of makes sense.
>
> Some failures are indeed pkg-config files not listing libm and pthreads
> as required, but with others we're doing custom checks, the require()
> ones, where we're the ones that should state what libraries to link to
> in static builds. This is the case with libilbc, libmysofa and
> apparently libmp3lame.
>
> The remaining issue after this patchset is applied is linking to the C++
> standard library with some external deps. According to Jörn Heusipp, the
> libopenmpt maintainer, it's not something that can be safely included in
> a pkg-config file, and by hardcoding a -lstdc++ ldflag in configure
> checks we're apparently breaking detection on systems where the compiler
> uses libc++, like it seems to be the case with Clang on MacOS.
>

Perhaps such libraries shouldn't hardcode -lstdc++ in there, but
dynamically put whichever C++ library they built against in there
instead?
Its not like you can actually use a static library build with another
C++ library, that *may* randomly work, but its not something anyone
should be doing.

- Hendrik


More information about the ffmpeg-devel mailing list