Re: configure can't detect proper pthread flags

From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Max Filippov <jcmvbkbc(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>, Bruce Momjian <bruce(at)momjian(dot)us>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Peter Seiderer <ps(dot)report(at)gmx(dot)net>
Subject: Re: configure can't detect proper pthread flags
Date: 2015-07-10 09:00:48
Message-ID: 559F89C0.5050106@iki.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 07/08/2015 08:50 PM, Tom Lane wrote:
> Heikki Linnakangas <hlinnaka(at)iki(dot)fi> writes:
>> The only scenario where you might now get warnings if we switch to
>> upstream version, and didn't before, is if one of the flags makes
>> pthreads to work, but also creates compiler warnings, while another flag
>> later in the list would make it work without warnings. That's not
>> totally inconceivable, but I doubt it happens. In any case, there's
>> nothing PostgreSQL-specific about that, so if that happens, I'd like to
>> find out so that we can complain to the upstream.
>
> Actually, it looks like the modern version of ax_pthread.m4 adds -Werror
> while testing, so that this should not be an issue anyway (at least on
> compilers that accept -Werror).

To conclude this thread: I replaced our custom pthread-checking autoconf
macro with the latest upstream version, in PostgreSQL master. That
should fix your original problem with the uClibc, OpenSSL, and pthreads
combination, in PostgreSQL master (i.e. the future 9.6 version).

As a workaround for current versions, you can give
PTHREAD_CFLAGS=-pthread (or whatever the right flag for that platform
is) explicitly on the configure command line. That way the autoconf
script will only test if that option works, skipping the autodetection
logic and the warnings-test, so it will pass.

- Heikki

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2015-07-10 09:14:20 Re: WAL logging problem in 9.4.3?
Previous Message Andres Freund 2015-07-10 08:59:32 Re: WAL logging problem in 9.4.3?