Re: configure can't detect proper pthread flags - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: configure can't detect proper pthread flags
Date
Msg-id 559F89C0.5050106@iki.fi
Whole thread Raw
In response to Re: configure can't detect proper pthread flags  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 07/08/2015 08:50 PM, Tom Lane wrote:
> Heikki Linnakangas <hlinnaka@iki.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




pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: WAL logging problem in 9.4.3?
Next
From: Andres Freund
Date:
Subject: Re: WAL logging problem in 9.4.3?