[MPlayer-cvslog] r36022 - trunk/configure

Ivan Kalvachev ikalvachev at gmail.com
Fri Mar 22 01:45:20 CET 2013


On 3/20/13, Diego Biurrun <diego at biurrun.de> wrote:
> On Wed, Mar 20, 2013 at 01:44:22PM +0100, Reimar Döffinger wrote:
>> diego <subversion at mplayerhq.hu> wrote:
>> >
>> >Log:
>> >configure: Only add _POSIX_C_SOURCE and _XOPEN_SOURCE to CFLAGS for
>> >glibc.
>>
>> Could you please explain that a bit an add comments?
>
> Oops, I wanted to amend the commit and add a small comment to this
> yesterday,
> but I forgot before pushing today when I saw the Cygwin/MinGW tests had
> run successfully.
>
>> Because I am rather inclined to agree with Ivan that this is a silly,
>> messy hack. To my knowledge _POSIX_C_SOURCE is in no way specific
>> to glibc and should be used to indicate that we want to use POSIX
>> features. To me it seems that with this change it would be reasonable
>> to expect compilation to fail on all non-glibc systems with pedantic
>> headers (which probably is an empty set though).
>
> The way different libcs handle CPPFLAGS is not compatible, so trying to
> reuse flags is bound to fail.  FreeBSD for example enables everything by
> default and POSIX (or whatever) flags trigger limitations in the APIs
> that are exposed.  For glibc it is the other way around.
>
> I tried for a very long time to find a set of common flags to satisfy
> all system libcs, but that is just a fool's errand.  There will always
> be one system that chokes on a flag that another requires.

This still holds true, even if you split it on glibc and everything else.
You haven't fixed one thing, you just made 2 problems out of 1.
(in Ronald's words)



> What we did before my set of commits - setting libc-specific flags
> depending on the compiler that is detected is just completely wrong.
>


There is a user on irc who is having problem, linked to r36009.
( Linux Mint Elyssa,  glibc 2.7.  gcc 4.2.4 )

The problem is related to our "osdep/strsep.h". It seems that the
configure detection fails, but later when the compilation begins, it
conflicts with the system strsep() macro.

It turned out that SDL adds -D_GNU_SOURCE to the cflags, this
revealing strsep() . Since SDL test is after libc tests, it is not
discovered at configure time.


I think this issue illustrates a lot more fundamental problem.
External libraries may depend on their own set of flags... that they
would bring into the mplayer cli.


More information about the MPlayer-cvslog mailing list