Skip to content

Build error against PostgreSQL 13 #26

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
devrimgunduz opened this issue Sep 24, 2020 · 5 comments
Closed

Build error against PostgreSQL 13 #26

devrimgunduz opened this issue Sep 24, 2020 · 5 comments

Comments

@devrimgunduz
Copy link

Hi,

PostgreSQL 13 is out today, and this extension fails to build against it. Can you please take a look?

Thanks! Devrim

/usr/lib64/ccache/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -O2 -I. -I./ -I/usr/pgsql-13/include/server -I/usr/pgsql-13/include/internal -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include -flto=thin -emit-llvm -c -o compat.bc compat.c
pg_wait_sampling.c: In function '_PG_init':
pg_wait_sampling.c:314:17: warning: assignment to 'planner_hook_type' {aka 'PlannedStmt * (*)(Query *, const char *, int, struct ParamListInfoData )'} from incompatible pointer type 'PlannedStmt * ()(Query *, int, struct ParamListInfoData *)' [-Wincompatible-pointer-types]
314 | planner_hook = pgws_planner_hook;
| ^
pg_wait_sampling.c: In function 'pgws_planner_hook':
pg_wait_sampling.c:798:35: warning: passing argument 2 of 'planner_hook_next' makes pointer from integer without a cast [-Wint-conversion]
798 | return planner_hook_next(parse, cursorOptions, boundParams);
| ^~~~~~~~~~~~~
| |
| int
pg_wait_sampling.c:798:35: note: expected 'const char *' but argument is of type 'int'
pg_wait_sampling.c:798:50: warning: passing argument 3 of 'planner_hook_next' makes integer from pointer without a cast [-Wint-conversion]
798 | return planner_hook_next(parse, cursorOptions, boundParams);
| ^~~~~~~~~~~
| |
| ParamListInfo {aka struct ParamListInfoData *}
pg_wait_sampling.c:798:50: note: expected 'int' but argument is of type 'ParamListInfo' {aka 'struct ParamListInfoData *'}
pg_wait_sampling.c:798:10: error: too few arguments to function 'planner_hook_next'
798 | return planner_hook_next(parse, cursorOptions, boundParams);
| ^~~~~~~~~~~~~~~~~
pg_wait_sampling.c:800:33: warning: passing argument 2 of 'standard_planner' makes pointer from integer without a cast [-Wint-conversion]
800 | return standard_planner(parse, cursorOptions, boundParams);
| ^~~~~~~~~~~~~
| |
| int
In file included from pg_wait_sampling.c:17:
/usr/pgsql-13/include/server/optimizer/planner.h:41:64: note: expected 'const char *' but argument is of type 'int'
41 | extern PlannedStmt *standard_planner(Query *parse, const char *query_string,
| ~~~~~~~~~~~~^~~~~~~~~~~~
pg_wait_sampling.c:800:48: warning: passing argument 3 of 'standard_planner' makes integer from pointer without a cast [-Wint-conversion]
800 | return standard_planner(parse, cursorOptions, boundParams);
| ^~~~~~~~~~~
| |
| ParamListInfo {aka struct ParamListInfoData *}
In file included from pg_wait_sampling.c:17:
/usr/pgsql-13/include/server/optimizer/planner.h:42:15: note: expected 'int' but argument is of type 'ParamListInfo' {aka 'struct ParamListInfoData *'}
42 | int cursorOptions,
| ~~~~^~~~~~~~~~~~~
pg_wait_sampling.c:800:9: error: too few arguments to function 'standard_planner'
800 | return standard_planner(parse, cursorOptions, boundParams);
| ^~~~~~~~~~~~~~~~
In file included from pg_wait_sampling.c:17:
/usr/pgsql-13/include/server/optimizer/planner.h:41:21: note: declared here
41 | extern PlannedStmt *standard_planner(Query *parse, const char *query_string,
| ^~~~~~~~~~~~~~~~
pg_wait_sampling.c:801:1: warning: control reaches end of non-void function [-Wreturn-type]
801 | }
| ^
collector.c: In function 'make_profile_hash':
collector.c:286:18: error: 'tag_hash' undeclared (first use in this function)
286 | hash_ctl.hash = tag_hash;
| ^~~~~~~~
collector.c:286:18: note: each undeclared identifier is reported only once for each function it appears in
make[1]: *** [: pg_wait_sampling.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [: collector.o] Error 1
collector.c:286:18: error: use of undeclared identifier 'tag_hash'
hash_ctl.hash = tag_hash;
^
1 error generated.
make[1]: *** [/usr/pgsql-13/lib/pgxs/src/makefiles/../../src/Makefile.global:1051: collector.bc] Error 1
pg_wait_sampling.c:314:17: warning: incompatible pointer types assigning to 'planner_hook_type' (aka 'struct PlannedStmt ()(struct Query *, const char *, int, struct ParamListInfoData *)') from 'PlannedStmt *(Query *, int, ParamListInfo)' (aka 'struct PlannedStmt *(struct Query *, int, struct ParamListInfoData *)') [-Wincompatible-pointer-types]
planner_hook = pgws_planner_hook;
^ ~~~~~~~~~~~~~~~~~
pg_wait_sampling.c:798:61: error: too few arguments to function call, expected 4, have 3
return planner_hook_next(parse, cursorOptions, boundParams);
~~~~~~~~~~~~~~~~~ ^
pg_wait_sampling.c:800:59: error: too few arguments to function call, expected 4, have 3
return standard_planner(parse, cursorOptions, boundParams);
~~~~~~~~~~~~~~~~ ^
/usr/pgsql-13/include/server/optimizer/planner.h:41:1: note: 'standard_planner' declared here
extern PlannedStmt *standard_planner(Query *parse, const char *query_string,
^
1 warning and 2 errors generated.

@rjuju
Copy link
Contributor

rjuju commented Oct 28, 2020

Hi @devrimgunduz. This extension should be compatible with pg13 since #24 was merged. Is the problem that there's no release that includes the fix?

@anayrat
Copy link
Collaborator

anayrat commented Oct 28, 2020

FYI, I opened a PR for debian packaging (#28)
I successfully ran regression tests on PG from 9.6 to 13.

@devrimgunduz
Copy link
Author

Hi @rjuju , we need a release, yes.

Thanks!

@ololobus
Copy link
Contributor

@anayrat, @devrimgunduz, everything seems to be working fine with PostgreSQL 13 now, so I've just tagged v1.1.2.

@anayrat
Copy link
Collaborator

anayrat commented Jan 29, 2021

@anayrat anayrat closed this as completed Jan 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants