Re: pg_regress breaks on msys - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pg_regress breaks on msys
Date
Msg-id 22560.1153361976@sss.pgh.pa.us
Whole thread Raw
In response to Re: pg_regress breaks on msys  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: pg_regress breaks on msys  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: pg_regress breaks on msys  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> Unless it also lies on the echoed command line this seems an 
> unconvincing explanation. The seahorse log says:

> gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wdeclaration-after-statement -Wendif-labels
-fno-strict-aliasing -I../../../src/include -I./src/include/port/win32 -DEXEC_BACKEND  -I/c/tcl/include
"-I../../../src/include/port/win32"'-DPGBINDIR="/home/pgbuild/pgfarmbuild/HEAD/inst/bin"'
'-DLIBDIR="/home/pgbuild/pgfarmbuild/HEAD/inst/lib"'
'-DPGSHAREDIR="/home/pgbuild/pgfarmbuild/HEAD/inst/share/postgresql"''-DHOST_TUPLE="i686-pc-mingw32"'
'-DMAKEPROG="make"''-DSHELLPROG="/bin/sh.exe"' -c -o pg_regress.o pg_regress.c
 

> If those -D values are not what it gets then that would be quite evil.

Indeed ... but if those *are* what it gets then how can you explain the
constructed paths?

I just committed a change to extract the paths via pg_config_paths.h.
If that doesn't fix it then I guess the next thing is to put in some
debug printout to show what values are really getting compiled in :-(

> We used to pass these values almost same way when we first did initdb in 
> C, and I don't recall any such problems. We had:

> override CPPFLAGS := -DPGBINDIR=\"$(*bindir*)\" -DPGDATADIR=\"$(*datadir*)\" -DFRONTEND -I$(*libpq_srcdir*)
$(*CPPFLAGS*)

That seems a bit interesting.  What are the stars for?  I don't see
anything about a syntax like that in my gmake documentation.

> There is also this warning, by the way:
> pg_regress.c:63: warning: 'shellprog' defined but not used

Good catch, fix committed.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Christopher Kings-Lynne
Date:
Subject: Re: Progress bar updates
Next
From: Tom Lane
Date:
Subject: Re: pg_regress breaks on msys