pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alexander Lakhin <exclusion@gmail.com>
To: pgsql-hackers@postgresql.org
Subject: make installcheck-world in a clean environment
Date: Mon, 2 Apr 2018 12:12:12 +0300
Message-ID: <bfee872b-ab16-ec7c-8f8a-b3949add1c1b@gmail.com> (raw)

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

Attachments:

  [text/x-patch] ecpg-installcheck.patch (1.1K, ../bfee872b-ab16-ec7c-8f8a-b3949add1c1b@gmail.com/3-ecpg-installcheck.patch)
  download | inline diff:
diff --git a/src/interfaces/ecpg/test/Makefile.regress b/src/interfaces/ecpg/test/Makefile.regress
index b3d7c1e..5df1a44 100644
--- a/src/interfaces/ecpg/test/Makefile.regress
+++ b/src/interfaces/ecpg/test/Makefile.regress
@@ -5,14 +5,14 @@ override CPPFLAGS := -I../../include -I$(top_srcdir)/src/interfaces/ecpg/include
        -I$(libpq_srcdir) $(CPPFLAGS)
 override CFLAGS += $(PTHREAD_CFLAGS)
 
-override LDFLAGS := -L../../ecpglib -L../../pgtypeslib $(filter-out -l%, $(libpq)) $(LDFLAGS)
+override LDFLAGS := -L'$(DESTDIR)$(libdir)/' $(filter-out -l%, $(libpq)) $(LDFLAGS)
 override LIBS := -lecpg -lpgtypes $(filter -l%, $(libpq)) $(LIBS) $(PTHREAD_LIBS)
 
 # Standard way to invoke the ecpg preprocessor
-ECPG = ../../preproc/ecpg --regression -I$(srcdir)/../../include -I$(srcdir)
+ECPG = '$(DESTDIR)$(bindir)/ecpg' --regression -I$(srcdir)/../../include -I$(srcdir)
 
 # Files that most or all ecpg preprocessor test outputs depend on
-ECPG_TEST_DEPENDENCIES = ../../preproc/ecpg$(X) \
+ECPG_TEST_DEPENDENCIES =  \
        $(srcdir)/../regression.h \
        $(srcdir)/../../include/sqlca.h \
        $(srcdir)/../../include/sqlda.h \

view thread (37+ messages)  latest in thread

Message-ID: <bfee872b-ab16-ec7c-8f8a-b3949add1c1b@gmail.com>
Permalink:  ../bfee872b-ab16-ec7c-8f8a-b3949add1c1b@gmail.com/
Also on:    postgresql.org/message-id/bfee872b-ab16-ec7c-8f8a-b3949add1c1b@gmail.com

 ·  · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: exclusion@gmail.com
  Subject: Re: make installcheck-world in a clean environment
  In-Reply-To: <bfee872b-ab16-ec7c-8f8a-b3949add1c1b@gmail.com>

* 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