Bug 256466

Summary: databases/postgresql12-client: fails on parallel build
Product: Ports & Packages Reporter: Paul Armstrong <freebsd>
Component: Individual Port(s)Assignee: pgsql
Status: New ---    
Severity: Affects Some People Flags: bugzilla: maintainer-feedback? (pgsql)
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   

Description Paul Armstrong 2021-06-07 11:01:54 UTC
When trying to build postgresql12-client using poudriere with MAKE_JOBS=4, it fails due to LOCALEDIR being used before it's defined.

Here's the relevant snippet from my logs:

cc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werro
r=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-alia
sing -fwrapv -Wno-unused-command-line-argument -O2 -pipe  -fstack-protector-strong
 -fno-strict-aliasing  -I../../src/port -DFRONTEND -I../../src/include  -I/usr/loc
al/include -I/usr/local/include -I/usr/local/include  -c -o noblock.o noblock.c
cc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werro
r=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-alia
sing -fwrapv -Wno-unused-command-line-argument -O2 -pipe  -fstack-protector-strong
 -fno-strict-aliasing  -pthread -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMAN
TICS -fPIC -DPIC -DFRONTEND -DUNSAFE_STAT_OK -I. -I../../../src/include  -I/usr/lo
cal/include -I/usr/local/include -I/usr/local/include -I../../../src/port -I../../
../src/port -DSO_MAJOR_VERSION=5  -c -o fe-print.o fe-print.c
echo "#define PGBINDIR \"/usr/local/bin\"" >pg_config_paths.h
echo "#define PGSHAREDIR \"/usr/local/share/postgresql\"" >>pg_config_paths.h
echo "#define SYSCONFDIR \"/usr/local/etc/postgresql\"" >>pg_config_paths.h
echo "#define INCLUDEDIR \"/usr/local/include\"" >>pg_config_paths.h
echo "#define PKGINCLUDEDIR \"/usr/local/include/postgresql\"" >>pg_config_paths.h
echo "#define INCLUDEDIRSERVER \"/usr/local/include/postgresql/server\"" >>pg_conf
ig_paths.h
echo "#define LIBDIR \"/usr/local/lib\"" >>pg_config_paths.h
echo "#define PKGLIBDIR \"/usr/local/lib/postgresql\"" >>pg_config_paths.h
fe-misc.c:1292:11: error: use of undeclared identifier 'LOCALEDIR'
                        ldir = LOCALEDIR;
                               ^
1 error generated.
gmake[1]: *** [<builtin>: fe-misc.o] Error 1
gmake[1]: *** Waiting for unfinished jobs....
echo "#define LOCALEDIR \"/usr/local/share/locale\"" >>pg_config_paths.h
cc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werro
r=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-alia
sing -fwrapv -Wno-unused-command-line-argument -O2 -pipe  -fstack-protector-strong
 -fno-strict-aliasing  -I../../src/port -DFRONTEND -I../../src/include  -I/usr/loc
al/include -I/usr/local/include -I/usr/local/include  -c -o pg_bitutils.o pg_bitut
ils.c
echo "#define DOCDIR \"/usr/local/share/doc//postgresql\"" >>pg_config_paths.h
echo "#define HTMLDIR \"/usr/local/share/doc//postgresql\"" >>pg_config_paths.h
echo "#define MANDIR \"/usr/local/man\"" >>pg_config_paths.h
cc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werro
r=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-alia
sing -fwrapv -Wno-unused-command-line-argument -O2 -pipe  -fstack-protector-strong
 -fno-strict-aliasing  -I../../src/port -DFRONTEND -I../../src/include  -I/usr/loc
al/include -I/usr/local/include -I/usr/local/include  -c -o pgcheckdir.o pgcheckdi
r.c
Comment 1 commit-hook freebsd_committer 2021-08-12 16:24:37 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=a271b9d5b7b2c0eb57d1a09fc44f2ecbbad7bc5a

commit a271b9d5b7b2c0eb57d1a09fc44f2ecbbad7bc5a
Author:     Palle Girgensohn <girgen@FreeBSD.org>
AuthorDate: 2021-08-12 15:48:09 +0000
Commit:     Palle Girgensohn <girgen@FreeBSD.org>
CommitDate: 2021-08-12 16:23:00 +0000

    databases/postgresql*: update to latest versions

    The PostgreSQL Global Development Group has released an update to all supported
    versions of our database system, including 13.4, 12.8, 11.13, 10.18, and
    9.6.23, as well as the third beta release of PostgreSQL 14. This release closes
    one security vulnerability and fixes over 75 bugs reported over the last three
    months.

    Turn off parallel builds since we continue to struggle with build problems when
    it is activated. [1]

    Avoid chasing latest LLVM version. [2]

    PR:             256466 [1], 256167 [2]
    Release notes:  https://www.postgresql.org/docs/release/
    Security:       b471130b-fb86-11eb-87db-6cc21735f730

 databases/postgresql10-server/Makefile             |   4 +-
 databases/postgresql10-server/distinfo             |   6 +-
 .../postgresql10-server/files/patch-icu68 (gone)   | 254 ---------------------
 databases/postgresql11-server/Makefile             |   4 +-
 databases/postgresql11-server/distinfo             |   6 +-
 databases/postgresql12-docs/Makefile               |  44 +---
 databases/postgresql12-server/Makefile             |   4 +-
 databases/postgresql12-server/distinfo             |   6 +-
 databases/postgresql13-docs/Makefile               |  44 +---
 databases/postgresql13-server/Makefile             |   4 +-
 databases/postgresql13-server/distinfo             |   6 +-
 databases/postgresql14-docs/Makefile               |   4 +-
 databases/postgresql14-server/Makefile             |  10 +-
 databases/postgresql14-server/distinfo             |   6 +-
 databases/postgresql14-server/pkg-plist-client     |   2 +-
 databases/postgresql14-server/pkg-plist-server     |   4 +-
 databases/postgresql96-server/Makefile             |   4 +-
 databases/postgresql96-server/distinfo             |   6 +-
 18 files changed, 42 insertions(+), 376 deletions(-)