make installcheck-world in a clean environment

Alexander Law <exclusion@gmail.com>

From: Alexander Lakhin <exclusion@gmail.com>
To: pgsql-hackers@postgresql.org
Date: 2018-04-02T09:12:12Z
Lists: pgsql-hackers

Attachments

Hello,

I am trying to perform "make installcheck-world" after "make clean" (or 
after installing a precompiled binaries), but it fails.
The error I get is related to ECPG regression test:
make -C test installcheck
make[2]: Entering directory 
`/home/postgres/postgres/src/interfaces/ecpg/test'
gcc -Wall -Wmissing-prototypes -Wpointer-arith 
-Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute 
-Wformat-security -fno-strict-aliasing -fwrapv 
-fexcess-precision=standard -O2 '-I../../../../src/port' 
'-I../../../../src/test/regress' '-DHOST_TUPLE="x86_64-pc-linux-gnu"' 
'-DSHELLPROG="/bin/sh"' '-DDLSUFFIX=".so"' -I../../../../src/include  
-D_GNU_SOURCE   -c -o pg_regress_ecpg.o pg_regress_ecpg.c
gcc -Wall -Wmissing-prototypes -Wpointer-arith 
-Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute 
-Wformat-security -fno-strict-aliasing -fwrapv 
-fexcess-precision=standard -O2 -L../../../../src/port 
-L../../../../src/common -Wl,--as-needed 
-Wl,-rpath,'/usr/local/pgsql/lib',--enable-new-dtags pg_regress_ecpg.o 
../../../../src/test/regress/pg_regress.o -lpgcommon -lpgport -lpthread 
-lz -lreadline -lrt -lcrypt -ldl -lm  -o pg_regress
make -C connect all
make[3]: Entering directory 
`/home/postgres/postgres/src/interfaces/ecpg/test/connect'
make[3]: *** No rule to make target `test1.c', needed by `test1.o'.  Stop.
make[3]: Leaving directory 
`/home/postgres/postgres/src/interfaces/ecpg/test/connect'

Is it a supported scenario to make installcheck-world without performing 
"make" first?
(If I do "make -C src/interfaces/ecpg" and then "make 
installcheck-world", then this error is gone. And when I set up all the 
extensions, all tests passed successfully.)
And even if we need to perform make, I wonder, should the recompiled 
ecpg binary be checked instead of installed one?
I tried to modify Makefile to target installed ecpg binary and it's libs 
(see the patch attached), it works, but this fix is only suited for 
installcheck.
So if this scenario should be supported, a more elaborated fix is needed.

Best regards,
------
Alexander Lakhin
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

Commits

  1. Ensure we build generated headers at the start of some more cases.