isolationtester and 'specs' subdirectory

Lists: pgsql-hackers
From: Josh Kupershmidt <schmiddy(at)gmail(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: isolationtester and 'specs' subdirectory
Date: 2013-06-20 23:10:30
Message-ID: CAK3UJRGN00uQphYQLJmUnyxb8KmqQfyjkZVrr5MWFB-o+fyW1w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Hi all,
I have a Debian machine with gcc 4.7.2-5 where make check-world fails
in the isolation check, like so:

...
make[2]: Leaving directory `/home/josh/src/postgresql/src/test/regress'
make -C isolation check

[snip]

gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith
-Wdeclaration-after-statement -Wendif-labels
-Wmissing-format-attribute -Wformat-security -fno-strict-aliasing
-fwrapv -fexcess-precision=standard -g -I.
-I../../../src/interfaces/libpq -I./../regress -I../../../src/include
-D_GNU_SOURCE -c -o isolation_main.o isolation_main.c
gcc: error: ./specs: Is a directory
make[2]: *** [isolation_main.o] Error 1
...

I eventually tracked down the cause of this failure to a trailing ':'
in my $LIBRARY_PATH, which causes gcc to look inside the current
directory for a 'specs' file [1] among other things. Although I
probably don't need that trailing ':', it seems like we should avoid
naming this directory 'specs' nonetheless to avoid confusion with gcc.

Renaming the 'specs' directory to something like 'isolation_specs' and
adjusting isolation_main.c accordingly lets me pass `make
check-world`. Proposed patch attached.

Josh

[1] http://gcc.gnu.org/ml/gcc-help/2010-05/msg00292.html

Attachment Content-Type Size
rename_specs.diff.gz application/x-gzip 28.3 KB

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Josh Kupershmidt <schmiddy(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: isolationtester and 'specs' subdirectory
Date: 2013-06-25 16:15:01
Message-ID: CA+TgmoZXAZv_7Awe_rOpSk4UYfBK4PXUob-kFANJOtdOitOw0w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Thu, Jun 20, 2013 at 7:10 PM, Josh Kupershmidt <schmiddy(at)gmail(dot)com> wrote:
> I eventually tracked down the cause of this failure to a trailing ':'
> in my $LIBRARY_PATH, which causes gcc to look inside the current
> directory for a 'specs' file [1] among other things. Although I
> probably don't need that trailing ':', it seems like we should avoid
> naming this directory 'specs' nonetheless to avoid confusion with gcc.
>
> Renaming the 'specs' directory to something like 'isolation_specs' and
> adjusting isolation_main.c accordingly lets me pass `make
> check-world`. Proposed patch attached.

This seems like pretty stupid behavior on the part of gcc. And, we're
generally reluctant to rename things too blithely because it
complicates back-patching. But on the flip side, back-patching
changes to the isolation specs is probably a rare event.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company