On Debian 13 (trixie), `make coverage-html` command triggers an lcov failure.
There have been past reports of this failure in pgsql-hackers here.
APT package repositories on Debian 13 default to lcov v2 (2.3.1-1) which is stricter about a few warnings and triggers an error. This commit in lcov details some of the changes for lcov v2, including the stricter error handling (see bullet b)).
After applying the attached patches to the current master branch, `make coverage-html` starts working with lcov v2.
---
More details:
Without applying any of the patches, with --enable-coverage and in-tree build (no vpath), make check && make coverage-html results in the following error:
genhtml: ERROR: (corrupt) unable to read trace file 'lcov_base.info': genhtml: ERROR: (inconsistent) "lcov_base.info":507880: duplicate function 'blockreftable_create' starts on line "/home/admin/postgres/src/include/lib/simplehash.h":450 but previous definition started on 447 while merging lcov_base.info while loading lcov_base.info.
(use "genhtml --ignore-errors inconsistent ..." to bypass this error)
(use "genhtml --ignore-errors corrupt ..." to bypass this error)