cpluspluscheck/headerscheck require build in REL_16_STABLE
Hello, hackers!
When running cpluspluscheck/headerscheck on REL_16_STABLE [1]https://github.com/postgres/postgres/commit/e177da5c87a10abac97c028bfb427bafb7353aa2 I found
that everything was ok only if it was preceded by a build and make
maintainer-clean was not used:
$ ./configure --without-icu --with-perl --with-python > configure.txt &&
make -j16 > make.txt &&
make -j16 clean > clean.txt &&
make -j16 cpluspluscheck > cpluspluscheck.txt
$ ./configure --without-icu --with-perl --with-python > configure_1.txt
&&
make -j16 > make.txt &&
make -j16 distclean > clean.txt &&
./configure --without-icu --with-perl --with-python > configure_2.txt &&
make -j16 cpluspluscheck > cpluspluscheck.txt
Otherwise cpluspluscheck/headerscheck will fail:
$ ./configure --without-icu --with-perl --with-python > configure_1.txt
&&
make -j16 > make.txt &&
make -j16 maintainer-clean > clean.txt &&
./configure --without-icu --with-perl --with-python > configure_2.txt &&
make -j16 cpluspluscheck > cpluspluscheck.txt
$ ./configure --without-icu --with-perl --with-python > configure.txt &&
make -j16 cpluspluscheck > cpluspluscheck.txt
In file included from /tmp/cpluspluscheck.Zy4645/test.cpp:3:
/home/marina/postgrespro/postgrespro/src/backend/parser/gramparse.h:29:10:
fatal error: gram.h: No such file or directory
29 | #include "gram.h"
| ^~~~~~~~
compilation terminated.
In file included from /tmp/cpluspluscheck.Zy4645/test.cpp:3:
/home/marina/postgrespro/postgrespro/src/backend/utils/adt/jsonpath_internal.h:26:10:
fatal error: jsonpath_gram.h: No such file or directory
26 | #include "jsonpath_gram.h"
| ^~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [GNUmakefile:141: cpluspluscheck] Error 1
In the other branches everything is fine: these problems begin with
commits [2]https://github.com/postgres/postgres/commit/dac048f71ebbcf2f980d280711f8ff8001331c5d (jsonpath_gram.h) and [3]https://github.com/postgres/postgres/commit/ecaf7c5df54f7fa9df2fdc7225d2bb4e283f0081 (gram.h) and in the master branch
there're no such problems after commit [4]https://github.com/postgres/postgres/commit/721856ff24b3722ce8e894e5a32c9c063cd48455. The attached diff.patch
fixes this issue for me. (IIUC internal headers generated by Bison are
usually excluded from such checks so I also excluded gramparse.h and
jsonpath_internal.h...)
[1]: https://github.com/postgres/postgres/commit/e177da5c87a10abac97c028bfb427bafb7353aa2
https://github.com/postgres/postgres/commit/e177da5c87a10abac97c028bfb427bafb7353aa2
[2]: https://github.com/postgres/postgres/commit/dac048f71ebbcf2f980d280711f8ff8001331c5d
https://github.com/postgres/postgres/commit/dac048f71ebbcf2f980d280711f8ff8001331c5d
[3]: https://github.com/postgres/postgres/commit/ecaf7c5df54f7fa9df2fdc7225d2bb4e283f0081
https://github.com/postgres/postgres/commit/ecaf7c5df54f7fa9df2fdc7225d2bb4e283f0081
[4]: https://github.com/postgres/postgres/commit/721856ff24b3722ce8e894e5a32c9c063cd48455
https://github.com/postgres/postgres/commit/721856ff24b3722ce8e894e5a32c9c063cd48455
--
Marina Polyakova
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
Attachments:
diff.patchtext/x-diff; name=diff.patchDownload+4-2
On Fri, Apr 12, 2024 at 11:51 PM Marina Polyakova
<m.polyakova@postgrespro.ru> wrote:
Hello, hackers!
When running cpluspluscheck/headerscheck on REL_16_STABLE [1] I found
that everything was ok only if it was preceded by a build and make
maintainer-clean was not used:
I can reproduce this.
In the other branches everything is fine: these problems begin with
commits [2] (jsonpath_gram.h) and [3] (gram.h) and in the master branch
there're no such problems after commit [4]. The attached diff.patch
fixes this issue for me. (IIUC internal headers generated by Bison are
usually excluded from such checks so I also excluded gramparse.h and
jsonpath_internal.h...)
I'm not in favor of this patch because these files build fine on
master, so there is no good reason to exclude them. We should arrange
so that they build fine on PG16 as well. The problem is, not all the
required headers are generated when invoking `make headerscheck`. The
attached patch brings in some Makefile rules from master to make this
work. Does this fix it for you?
Attachments:
v1-build-headers-for-pg16-headerscheck.patchtext/x-patch; charset=US-ASCII; name=v1-build-headers-for-pg16-headerscheck.patchDownload+6-3
On 2024-04-13 08:40, John Naylor wrote:
On Fri, Apr 12, 2024 at 11:51 PM Marina Polyakova
<m.polyakova@postgrespro.ru> wrote:
...
In the other branches everything is fine: these problems begin with
commits [2] (jsonpath_gram.h) and [3] (gram.h) and in the master
branch
there're no such problems after commit [4]. The attached diff.patch
fixes this issue for me. (IIUC internal headers generated by Bison are
usually excluded from such checks so I also excluded gramparse.h and
jsonpath_internal.h...)I'm not in favor of this patch because these files build fine on
master, so there is no good reason to exclude them. We should arrange
so that they build fine on PG16 as well. The problem is, not all the
required headers are generated when invoking `make headerscheck`. The
attached patch brings in some Makefile rules from master to make this
work. Does this fix it for you?
Everything seems to work with this patch, thank you!
--
Marina Polyakova
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
On Mon, Apr 15, 2024 at 9:20 PM Marina Polyakova
<m.polyakova@postgrespro.ru> wrote:
On 2024-04-13 08:40, John Naylor wrote:
so that they build fine on PG16 as well. The problem is, not all the
required headers are generated when invoking `make headerscheck`. The
attached patch brings in some Makefile rules from master to make this
work. Does this fix it for you?Everything seems to work with this patch, thank you!
Glad to hear it -- I'll push next week when I get back from vacation,
unless there are objections.
On Wed, Apr 17, 2024 at 7:21 AM John Naylor <johncnaylorls@gmail.com> wrote:
On Mon, Apr 15, 2024 at 9:20 PM Marina Polyakova
<m.polyakova@postgrespro.ru> wrote:Everything seems to work with this patch, thank you!
Glad to hear it -- I'll push next week when I get back from vacation,
unless there are objections.
Pushed, thanks for the report!
On 2024-04-27 09:14, John Naylor wrote:
On Wed, Apr 17, 2024 at 7:21 AM John Naylor <johncnaylorls@gmail.com>
wrote:On Mon, Apr 15, 2024 at 9:20 PM Marina Polyakova
<m.polyakova@postgrespro.ru> wrote:Everything seems to work with this patch, thank you!
Glad to hear it -- I'll push next week when I get back from vacation,
unless there are objections.Pushed, thanks for the report!
Thank you again!
--
Marina Polyakova
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company