From: seebs@seebs.net
To: pgsql-bugs@postgresql.org
Subject: BUG #7816: test for compiler output produces bogus results
Date: Sun, 20 Jan 2013 05:26:47 +0000
Message-ID: <E1TwnQd-0006iq-Sk@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
The following bug has been logged on the website:
Bug reference: 7816
Logged by: Peter Seebach
Email address: seebs@seebs.net
PostgreSQL version: 9.1.4
Operating system: Linux
Description:
Your modified acx_pthread.m4 tests for any compiler output to stderr at all,
and considers it evidence that a flag is invalid.
This test is not actually correct, although it usually works.
The reason this bit me is that I have cause to build stuff with a patched
gcc which has a check for possible licensing-related stuff (not for gcc
itself, but because gcc's in the usage path; long story), and if that fails
or can't be run, it prints a diagnostic to stderr. This is not an error, and
it does not prevent successful compilation.
But if it happens during the postgresql configure, it results in configure
deciding that -lpthread isn't available, and dying.
In general, it is Bad Mojo to assume that all messages on stderr indicate
failures. If there is an error, the compiler is expected to exit with a
non-zero exit status. If it doesn't exit non-zero, you should assume that it
worked. This is why configure doesn't normally fail tests just because there
is some message on stderr...
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: seebs@seebs.net
Subject: Re: BUG #7816: test for compiler output produces bogus results
In-Reply-To: <E1TwnQd-0006iq-Sk@wrigleys.postgresql.org>
References: <E1TwnQd-0006iq-Sk@wrigleys.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox