#1140820 pg-stat-log: FTBFS with the nocheck build profile

#1140820#5
Date:
2026-06-27 00:00:19 UTC
From:
To:
Dear maintainer:

During a rebuild of all packages in unstable using the nocheck build profile,
this package failed to build. Below you will find the last part of the build log,
which is also the relevant part.

If required, the full build log is available here:

https://people.debian.org/~sanvila/build-logs/202606/

A wiki page discussing how to reproduce bugs in this category and
possible solutions is available here:

https://wiki.debian.org/qa.debian.org/FTBFS/nocheck

I'm tagging this report as "patch" because there is a trivial to fix it
(see below). No claim, however, that the patch is the only way to fix it.


About the archive rebuild: The build was made on virtual machines from AWS,
using sbuild and a reduced chroot with only build-essential packages.

If you cannot reproduce the bug please contact me privately, as I
am willing to provide ssh access to a virtual machine where the bug is
fully reproducible.

If this is really a bug in one of the build-depends, please use
reassign and add an affects on src:pg-stat-log, so that this is still
visible in the BTS web page for this package.

Thanks.
--------------------------------------------------------------------------------
[...]
   dh_auto_install --buildsystem=pgxs_loop --destdir=debian/postgresql-18-stat-log/
	pg_buildext loop postgresql-%v-stat-log
### PostgreSQL 18 loop ###
# 18: make
make[1]: Entering directory '/<<PKGBUILDDIR>>'
/usr/bin/clang-21 -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -Wno-format-truncation -O2  -I. -I./ -I/usr/include/postgresql/18/server -I/usr/include/postgresql/internal -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE  -I/usr/include/libxml2    -flto=thin -emit-llvm -c -o pg_stat_log.bc pg_stat_log.c
ERROR: cannot find errcodes.txt; set ERRCODES_FILE=/path/to/errcodes.txt
make[1]: *** [Makefile:22: pg_stat_log_errcodes.h] Error 1
make[1]: *** Waiting for unfinished jobs....
pg_stat_log.c:35:10: fatal error: 'pg_stat_log_errcodes.h' file not found
   35 | #include "pg_stat_log_errcodes.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make[1]: *** [/usr/lib/postgresql/18/lib/pgxs/src/makefiles/../../src/Makefile.global:1104: pg_stat_log.bc] Error 1
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
### End 18 loop (FAILED with exit code 2) ###
dh_auto_install: error: pg_buildext loop postgresql-%v-stat-log returned exit code 2
make: *** [debian/rules:4: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess failed with exit status 2
--------------------------------------------------------------------------------

The trivial patch:
--- a/debian/control +++ b/debian/control @@ -7,7 +7,7 @@ Uploaders: Build-Depends: architecture-is-64-bit <!pkg.postgresql.32-bit>, debhelper-compat (= 13), - postgresql-all <!nocheck>, + postgresql-all, postgresql-server-dev-all (>= 217~), Standards-Version: 4.7.4 Rules-Requires-Root: no
#1140820#8
Date:
2026-06-28 19:39:56 UTC
From:
To:
Hello,

Bug #1140820 in pg-stat-log reported by you has been fixed in the
Git repository and is awaiting an upload. You can see the commit
message below and you can check the diff of the fix at:

https://salsa.debian.org/postgresql/pg-stat-log/-/commit/e27b12f79a62c2978582fb9a0f8c20c44da575d4
Package needs errcodes.txt at build time.
------------------------------------------------------------------------

(this message was generated automatically)
-- 
Greetings

https://bugs.debian.org/1140820

#1140820#15
Date:
2026-06-28 20:43:46 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
pg-stat-log, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1140820@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Christoph Berg <myon@debian.org> (supplier of updated pg-stat-log package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Sun, 28 Jun 2026 21:38:19 +0200
Source: pg-stat-log
Architecture: source
Version: 0.1-2
Distribution: unstable
Urgency: medium
Maintainer: Debian PostgreSQL Maintainers <team+postgresql@tracker.debian.org>
Changed-By: Christoph Berg <myon@debian.org>
Closes: 1140820
Changes:
 pg-stat-log (0.1-2) unstable; urgency=medium
 .
   [ Santiago Vila ]
   * Fix FTBFS with the nocheck build profile. (Closes: #1140820)
Checksums-Sha1:
 45ae32c499fd10e97594fe5820a49da0a4c989ba 2125 pg-stat-log_0.1-2.dsc
 6e3c52714573ce86a1d54e528b5655b6b24e8aae 2272 pg-stat-log_0.1-2.debian.tar.xz
Checksums-Sha256:
 68a33bc963797265f4faa096a9ef5f58382c942790b7b0d168b1953c9f677273 2125 pg-stat-log_0.1-2.dsc
 3cd1b056007de7397bdabe3d661c5ffc973e5e43ce33ca4040ef13ead87b68ff 2272 pg-stat-log_0.1-2.debian.tar.xz
Files:
 87f26f33431096fbd57a625ed3bce031 2125 database optional pg-stat-log_0.1-2.dsc
 7107c5353bb244384d49fd94890cd57a 2272 database optional pg-stat-log_0.1-2.debian.tar.xz
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEXEj+YVf0kXlZcIfGTFprqxLSp64FAmpBeV8ACgkQTFprqxLS
p67KMRAAuWD6hxPQWewoPy/UmfQFKGEcmcaufA1jObjIc/yncvbcC25XYS/XCShO
pJIF1zqcu6ybOSlVWKB6MjfkP1EB+zRYSvGDSM2+TUhXHaEl6Tj14zSVesA5I11q
UHl9utKpgi7BFxdVJidfKB3libEtRAy9UpmIe/pHyfugm+2W52o/1xYNQuY3Ugvz
PFZsNsQjLPoLl0qqM1Y//zuBuNMplA5YplNVRzidQSU+K3cvymoJaC5xr0qEGVZx
wVhLpUGeqbOvviGjbhogApdqgM7jLWP9KXU7cRo+J89jBgDi67WxTPC/R0Ke+jBu
zQuiWnMBoYG3/wEmXNVKJnI2XRoFeWZjLwKIN7mvRwnHeLznotgAVb1lD/zrqBAI
eE1/MqfwnX1MZod6sshg0HVbZ68mv5G0e2WOzMnVnJ82qe7fPSxK2GrmuGKLr35V
UAAT5UpQG4PqSeNTWlkdo68S85o/YLERKk81h9SgZjXkA7qjZL1MjeyNFhC+Jg7j
XMHIymiVnyg34Nyf7rXJp4sBgp9scmT6/VBrUebbhnJ9t3WUi7uyHKN7wszzX+64
qVZneAsLOQTmQpldEiKpAnmmPMdMznxj4DMIve8N6QF4mnqur1zoKKCprtMpZ5ha
IcbFbas3+UaUYmvfBNj9XmAxA1EkUmTfZc4YHvgfoDNVaQyZYss=
=iPX2
-----END PGP SIGNATURE-----