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

Jörn Heusipp osmanx at problemloesungsmaschine.de
Tue Oct 17 11:01:34 EEST 2017

On 10/16/2017 11:38 PM, Hendrik Leppkes wrote:
> On Mon, Oct 16, 2017 at 11:02 PM, James Almer <jamrial at gmail.com> wrote:

>> 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?

The problem here is, that we (libopenmpt) do not actually know what the 
name of the standard library is. It is chosen basically by the toolchain 
and there is no standard way to ask it what it uses. There is also no 
standard autoconf check which determines it (but the more I think about 
the issue, the more I think there actually needs to be one).

> 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.

Correct, mismatching C++ standard libraries will not work.

Jörn (libopenmpt maintainer)

More information about the ffmpeg-devel mailing list