Skip to content
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

PostgreSQL 17 support #67

Open
devrimgunduz opened this issue Jul 29, 2024 · 2 comments
Open

PostgreSQL 17 support #67

devrimgunduz opened this issue Jul 29, 2024 · 2 comments

Comments

@devrimgunduz
Copy link

Hi,

2.6.0 fails to build against PostgreSQL 17. v17 beta2 is already out. Can you please take a look? Thanks! Devrim

gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wshadow=compatible-local -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -g -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fPIC -fvisibility=hidden -I. -I./ -I/usr/pgsql-17/include/server -I/usr/pgsql-17/include/internal -D_GNU_SOURCE -I/usr/include/libxml2 -DWITH_GZFILEOP -I/usr/include -c -o topn.o topn.c
/usr/bin/clang -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/pgsql-17/include/server -I/usr/pgsql-17/include/internal -D_GNU_SOURCE -I/usr/include/libxml2 -DWITH_GZFILEOP -I/usr/include -flto=thin -emit-llvm -c -o topn.bc topn.c
topn.c:1181:8: error: too few arguments to function call, expected 5, have 4
1181 | lex = makeJsonLexContextCstringLenCompat(json, len, GetDatabaseEncoding(), true);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
topn.c:61:64: note: expanded from macro 'makeJsonLexContextCstringLenCompat'
61 | makeJsonLexContextCstringLen(json, len, encoding, need_escapes);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
/usr/pgsql-17/include/server/common/jsonapi.h:194:24: note: 'makeJsonLexContextCstringLen' declared here
194 | extern JsonLexContext *makeJsonLexContextCstringLen(JsonLexContext *lex,
| ^ ~~~~~~~~~~~~~~~~~~~~
195 | const char *json,
| ~~~~~~~~~~~~~~~~~
196 | size_t len,
| ~~~~~~~~~~~
197 | int encoding,
| ~~~~~~~~~~~~~
198 | bool need_escapes);
| ~~~~~~~~~~~~~~~~~
1 error generated.
make[1]: *** [/usr/pgsql-17/lib/pgxs/src/makefiles/../../src/Makefile.global:1085: topn.bc] Error 1
make[1]: *** Waiting for unfinished jobs....
topn.c: In function ‘jsonb_from_cstring’:
topn.c:1181:50: error: passing argument 1 of ‘makeJsonLexContextCstringLen’ from incompatible pointer type [-Wincompatible-pointer-types]
1181 | lex = makeJsonLexContextCstringLenCompat(json, len, GetDatabaseEncoding(), true);
| ^~~~
| |
| char *
topn.c:61:38: note: in definition of macro ‘makeJsonLexContextCstringLenCompat’
61 | makeJsonLexContextCstringLen(json, len, encoding, need_escapes);
| ^~~~
In file included from topn.c:21:
/usr/pgsql-17/include/server/common/jsonapi.h:194:69: note: expected ‘JsonLexContext *’ but argument is of type ‘char *’
194 | extern JsonLexContext *makeJsonLexContextCstringLen(JsonLexContext *lex,
| ~~~~~~~~~~~~~~~~^~~
topn.c:1181:56: error: passing argument 2 of ‘makeJsonLexContextCstringLen’ makes pointer from integer without a cast [-Wint-conversion]
1181 | lex = makeJsonLexContextCstringLenCompat(json, len, GetDatabaseEncoding(), true);
| ^~~
| |
| int
topn.c:61:44: note: in definition of macro ‘makeJsonLexContextCstringLenCompat’
61 | makeJsonLexContextCstringLen(json, len, encoding, need_escapes);
| ^~~
/usr/pgsql-17/include/server/common/jsonapi.h:195:117: note: expected ‘const char *’ but argument is of type ‘int’
195 | const char *json,
| ~~~~~~~~~~~~^~~~
topn.c:61:9: error: too few arguments to function ‘makeJsonLexContextCstringLen’
61 | makeJsonLexContextCstringLen(json, len, encoding, need_escapes);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
topn.c:1181:15: note: in expansion of macro ‘makeJsonLexContextCstringLenCompat’
1181 | lex = makeJsonLexContextCstringLenCompat(json, len, GetDatabaseEncoding(), true);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/pgsql-17/include/server/common/jsonapi.h:194:24: note: declared here
194 | extern JsonLexContext *makeJsonLexContextCstringLen(JsonLexContext *lex,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[1]: *** [: topn.o] Error 1

@devrimgunduz
Copy link
Author

ping

1 similar comment
@devrimgunduz
Copy link
Author

ping

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

1 participant