-
Notifications
You must be signed in to change notification settings - Fork 145
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
Build error against PostgreSQL 13 #261
Comments
Hello, There is already a PR for that here: #260 but random errors are reported on different builds. I haven't been able to reproduce it or understand the cause yet, so this is still on hold. |
Any word on supporting PostgreSQL 13? |
Hi @rdunklau - did these random build issues resolve in the meantime or is there any new update available? |
I've had the same problem and have the same question. I'm a little
technical, but... I couldn't figure out myself a suggested patch for
basic compatibility of multicorn with Python3 and PG13.
…On Mon, Nov 2, 2020 at 8:57 AM Christian Ehrhardt ***@***.***> wrote:
Hi @rdunklau <https://github.com/rdunklau> - did these random build
issues resolve in the meantime or is there any new update available?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#261 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMHOUSIVYGOIFUYAXGBVYC3SN23E5ANCNFSM4QS4I5KQ>
.
|
Well the initial patch seems to be in #260, yet it is incomplete for (to me) unknown reasons. |
Hello, I am running bitnami/postgresql chart which uses Debian 10 Buster. (Python 3.7; Debian 10; Postgresql 13)
Couldn't figure out what's wrong in the file. Appreciate your help !! |
The following commit by Tom Lane changed the call signatures of errstart() and errfinish(). commit 17a28b03645e27d73bf69a95d7569b61e58f06eb
|
I checked the Multicorn code and something like the following code will compile past src/errors.c, but then I get more errors looking similar with regards to PG's list handling.
|
That Multicorn code segment also looks a bit odd. Is it intentional to have errstart() and errfinish() to be unbalanced? |
@wieck it seems that the debian folks have patched this issue. I got this to build in the postgres:13-buster container. Note that their patch is a version of FROM postgres:13-buster
RUN apt-get update && apt-get install -y \
python3-multicorn \
libpython3-dev \
python3-dev \
postgresql-server-dev-13 libpq-dev \
python3-setuptools
ENV PYTHON_OVERRIDE python3.7
# postgresql-13-python3-multicorn is only available on bullseye and bookworm,
# not buster so we need to build it ourselves
RUN git clone --depth 1 --branch debian/1.4.0-3 https://salsa.debian.org/postgresql/postgresql-multicorn && \
cd postgresql-multicorn && \
# apply the debian patches
git apply debian/patches/drop-install-target.diff && \
git apply debian/patches/dual-python-build.diff && \
git apply debian/patches/pg13 && \
make && make install && ldconfig && \
echo "create extension multicorn;" > /docker-entrypoint-initdb.d/multicorn.sql Attached is my own patch file for CREATE SERVER multicorn_csv FOREIGN DATA WRAPPER multicorn OPTIONS (wrapper 's3fdw.s3fdw.S3Fdw'); This patch also completely ignores the user mapping settings, and relies on |
@rusty-jules: The patch in the Debian package is simply what I pushed as #260, but as said there, the patch is incomplete. Someone with an understanding of PG's and Multicorn's list handling should sit down a bit with that to fix my naive attempt. |
Same error here with Archlinux and its postgresql package:
|
Bump |
This works for me. But it is inconvenient for sure. Would be nice to have the fix in place. |
I would love it if my friend @wieck would look over the fixes I hacked into pgsql-io/multicorn2 to get it compiling and mostly working against pg13 & pg14. I hacked it into compiling and it seems to mostly work. I'd like to see a pg internals 3expert such as Jan look at my fixes for pg13 & pg14 whilst also making it work for pg15. |
Would also like to see this fixed and for the patch to be fully rolled out for PG13, attempted with multicorn-1.4.0:
|
Hi,
PostgreSQL is in beta3, and we are in the process of testing software. Multicorn fails to build against 13. 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 -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -g -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC -I/usr/include/python3.8 -I/usr/include/python3.8 -I. -I./ -I/usr/pgsql-13/include/server -I/usr/pgsql-13/include/internal -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include -c -o src/python.o src/python.c src/python.c: In function 'compareColumns': src/python.c:527:17: warning: passing argument 1 of 'lnext' from incompatible pointer type [-Wincompatible-pointer-types] 527 | cell1 = lnext(cell1); | ^~~~~ | | | ListCell * In file included from /usr/pgsql-13/include/server/access/tupdesc.h:19, from /usr/pgsql-13/include/server/access/htup_details.h:19, from /usr/pgsql-13/include/server/access/relscan.h:17, from src/multicorn.h:3, from src/python.c:4: /usr/pgsql-13/include/server/nodes/pg_list.h:321:19: note: expected 'const List *' but argument is of type 'ListCell *' 321 | lnext(const List *l, const ListCell *c) | ~~~~~~~~~~~~^ src/python.c:527:11: error: too few arguments to function 'lnext' 527 | cell1 = lnext(cell1); | ^~~~~ In file included from /usr/pgsql-13/include/server/access/tupdesc.h:19, from /usr/pgsql-13/include/server/access/htup_details.h:19, from /usr/pgsql-13/include/server/access/relscan.h:17, from src/multicorn.h:3, from src/python.c:4: /usr/pgsql-13/include/server/nodes/pg_list.h:321:1: note: declared here 321 | lnext(const List *l, const ListCell *c) | ^~~~~ src/python.c:528:17: warning: passing argument 1 of 'lnext' from incompatible pointer type [-Wincompatible-pointer-types] 528 | cell2 = lnext(cell2); | ^~~~~ | | | ListCell * In file included from /usr/pgsql-13/include/server/access/tupdesc.h:19, from /usr/pgsql-13/include/server/access/htup_details.h:19, from /usr/pgsql-13/include/server/access/relscan.h:17, from src/multicorn.h:3, from src/python.c:4: /usr/pgsql-13/include/server/nodes/pg_list.h:321:19: note: expected 'const List *' but argument is of type 'ListCell *' 321 | lnext(const List *l, const ListCell *c) | ~~~~~~~~~~~~^ src/python.c:528:11: error: too few arguments to function 'lnext' 528 | cell2 = lnext(cell2); | ^~~~~ In file included from /usr/pgsql-13/include/server/access/tupdesc.h:19, from /usr/pgsql-13/include/server/access/htup_details.h:19, from /usr/pgsql-13/include/server/access/relscan.h:17, from src/multicorn.h:3, from src/python.c:4: /usr/pgsql-13/include/server/nodes/pg_list.h:321:1: note: declared here 321 | lnext(const List *l, const ListCell *c) | ^~~~~ src/python.c:534:17: warning: passing argument 1 of 'lnext' from incompatible pointer type [-Wincompatible-pointer-types] 534 | cell1 = lnext(cell1); | ^~~~~ | | | ListCell * In file included from /usr/pgsql-13/include/server/access/tupdesc.h:19, from /usr/pgsql-13/include/server/access/htup_details.h:19, from /usr/pgsql-13/include/server/access/relscan.h:17, from src/multicorn.h:3, from src/python.c:4: /usr/pgsql-13/include/server/nodes/pg_list.h:321:19: note: expected 'const List *' but argument is of type 'ListCell *' 321 | lnext(const List *l, const ListCell *c) | ~~~~~~~~~~~~^ src/python.c:534:11: error: too few arguments to function 'lnext' 534 | cell1 = lnext(cell1); | ^~~~~ In file included from /usr/pgsql-13/include/server/access/tupdesc.h:19, from /usr/pgsql-13/include/server/access/htup_details.h:19, from /usr/pgsql-13/include/server/access/relscan.h:17, from src/multicorn.h:3, from src/python.c:4: /usr/pgsql-13/include/server/nodes/pg_list.h:321:1: note: declared here 321 | lnext(const List *l, const ListCell *c) | ^~~~~ src/python.c:535:17: warning: passing argument 1 of 'lnext' from incompatible pointer type [-Wincompatible-pointer-types] 535 | cell2 = lnext(cell2); | ^~~~~ | | | ListCell * In file included from /usr/pgsql-13/include/server/access/tupdesc.h:19, from /usr/pgsql-13/include/server/access/htup_details.h:19, from /usr/pgsql-13/include/server/access/relscan.h:17, from src/multicorn.h:3, from src/python.c:4: /usr/pgsql-13/include/server/nodes/pg_list.h:321:19: note: expected 'const List *' but argument is of type 'ListCell *' 321 | lnext(const List *l, const ListCell *c) | ~~~~~~~~~~~~^ src/python.c:535:11: error: too few arguments to function 'lnext' 535 | cell2 = lnext(cell2); | ^~~~~ In file included from /usr/pgsql-13/include/server/access/tupdesc.h:19, from /usr/pgsql-13/include/server/access/htup_details.h:19, from /usr/pgsql-13/include/server/access/relscan.h:17, from src/multicorn.h:3, from src/python.c:4: /usr/pgsql-13/include/server/nodes/pg_list.h:321:1: note: declared here 321 | lnext(const List *l, const ListCell *c) | ^~~~~ src/python.c:541:17: warning: passing argument 1 of 'lnext' from incompatible pointer type [-Wincompatible-pointer-types] 541 | cell1 = lnext(cell1); | ^~~~~ | | | ListCell * In file included from /usr/pgsql-13/include/server/access/tupdesc.h:19, from /usr/pgsql-13/include/server/access/htup_details.h:19, from /usr/pgsql-13/include/server/access/relscan.h:17, from src/multicorn.h:3, from src/python.c:4: /usr/pgsql-13/include/server/nodes/pg_list.h:321:19: note: expected 'const List *' but argument is of type 'ListCell *' 321 | lnext(const List *l, const ListCell *c) | ~~~~~~~~~~~~^ src/python.c:541:11: error: too few arguments to function 'lnext' 541 | cell1 = lnext(cell1); | ^~~~~ In file included from /usr/pgsql-13/include/server/access/tupdesc.h:19, from /usr/pgsql-13/include/server/access/htup_details.h:19, from /usr/pgsql-13/include/server/access/relscan.h:17, from src/multicorn.h:3, from src/python.c:4: /usr/pgsql-13/include/server/nodes/pg_list.h:321:1: note: declared here 321 | lnext(const List *l, const ListCell *c) | ^~~~~ src/python.c:542:17: warning: passing argument 1 of 'lnext' from incompatible pointer type [-Wincompatible-pointer-types] 542 | cell2 = lnext(cell2); | ^~~~~ | | | ListCell * In file included from /usr/pgsql-13/include/server/access/tupdesc.h:19, from /usr/pgsql-13/include/server/access/htup_details.h:19, from /usr/pgsql-13/include/server/access/relscan.h:17, from src/multicorn.h:3, from src/python.c:4: /usr/pgsql-13/include/server/nodes/pg_list.h:321:19: note: expected 'const List *' but argument is of type 'ListCell *' 321 | lnext(const List *l, const ListCell *c) | ~~~~~~~~~~~~^ src/python.c:542:11: error: too few arguments to function 'lnext' 542 | cell2 = lnext(cell2); | ^~~~~ In file included from /usr/pgsql-13/include/server/access/tupdesc.h:19, from /usr/pgsql-13/include/server/access/htup_details.h:19, from /usr/pgsql-13/include/server/access/relscan.h:17, from src/multicorn.h:3, from src/python.c:4: /usr/pgsql-13/include/server/nodes/pg_list.h:321:1: note: declared here 321 | lnext(const List *l, const ListCell *c) | ^~~~~ make[1]: *** [<builtin>: src/python.o] Error 1 make[1]: *** Waiting for unfinished jobs.... src/errors.c: In function 'reportException': src/errors.c:71:6: error: too many arguments to function 'errstart' 71 | if (errstart(severity, __FILE__, __LINE__, PG_FUNCNAME_MACRO, TEXTDOMAIN)) | ^~~~~~~~ In file included from /usr/pgsql-13/include/server/postgres.h:47, from src/multicorn.h:2, from src/errors.c:15: /usr/pgsql-13/include/server/utils/elog.h:149:13: note: declared here 149 | extern bool errstart(int elevel, const char *domain); | ^~~~~~~~ src/errors.c:73:7: error: too many arguments to function 'errstart' 73 | if (errstart(severity, __FILE__, __LINE__, PG_FUNCNAME_MACRO, TEXTDOMAIN)) | ^~~~~~~~ In file included from /usr/pgsql-13/include/server/postgres.h:47, from src/multicorn.h:2, from src/errors.c:15: /usr/pgsql-13/include/server/utils/elog.h:149:13: note: declared here 149 | extern bool errstart(int elevel, const char *domain); | ^~~~~~~~ src/errors.c:84:2: error: too few arguments to function 'errfinish' 84 | errfinish(0); | ^~~~~~~~~ In file included from /usr/pgsql-13/include/server/postgres.h:47, from src/multicorn.h:2, from src/errors.c:15: /usr/pgsql-13/include/server/utils/elog.h:150:13: note: declared here 150 | extern void errfinish(const char *filename, int lineno, const char *funcname); | ^~~~~~~~~ make[1]: *** [<builtin>: src/errors.o] Error 1 src/multicorn.c:146:13: error: use of undeclared identifier 'oid_hash'; did you mean 'uuid_hash'? ctl.hash = oid_hash; ^~~~~~~~ uuid_hash /usr/pgsql-13/include/server/utils/fmgrprotos.h:1702:14: note: 'uuid_hash' declared here extern Datum uuid_hash(PG_FUNCTION_ARGS); ^ src/multicorn.c:146:11: warning: incompatible pointer types assigning to 'HashValueFunc' (aka 'unsigned int (*)(const void *, unsigned long)') from 'Datum (FunctionCallInfo)' (aka 'unsigned long (struct FunctionCallInfoBaseData *)') [-Wincompatible-pointer-types] ctl.hash = oid_hash; ^ ~~~~~~~~ 1 warning and 1 error generated. make[1]: *** [/usr/pgsql-13/lib/pgxs/src/makefiles/../../src/Makefile.global:1051: src/multicorn.bc] Error 1 src/errors.c:71:35: error: too many arguments to function call, expected 2, have 5 if (errstart(severity, __FILE__, __LINE__, PG_FUNCNAME_MACRO, TEXTDOMAIN)) ~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <scratch space>:199:1: note: expanded from here 71 ^ /usr/pgsql-13/include/server/utils/elog.h:149:1: note: 'errstart' declared here extern bool errstart(int elevel, const char *domain); ^ src/errors.c:73:36: error: too many arguments to function call, expected 2, have 5 if (errstart(severity, __FILE__, __LINE__, PG_FUNCNAME_MACRO, TEXTDOMAIN)) ~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <scratch space>:201:1: note: expanded from here 73 ^ /usr/pgsql-13/include/server/utils/elog.h:149:1: note: 'errstart' declared here extern bool errstart(int elevel, const char *domain); ^ src/errors.c:84:13: error: too few arguments to function call, expected 3, have 1 errfinish(0); ~~~~~~~~~ ^ /usr/pgsql-13/include/server/utils/elog.h:150:1: note: 'errfinish' declared here extern void errfinish(const char *filename, int lineno, const char *funcname); ^ 3 errors generated. make[1]: *** [/usr/pgsql-13/lib/pgxs/src/makefiles/../../src/Makefile.global:1051: src/errors.bc] Error 1 src/python.c:527:22: error: too few arguments to function call, expected 2, have 1 cell1 = lnext(cell1); ~~~~~ ^ /usr/pgsql-13/include/server/nodes/pg_list.h:320:1: note: 'lnext' declared here static inline ListCell * ^ src/python.c:528:22: error: too few arguments to function call, expected 2, have 1 cell2 = lnext(cell2); ~~~~~ ^ /usr/pgsql-13/include/server/nodes/pg_list.h:320:1: note: 'lnext' declared here static inline ListCell * ^ src/python.c:534:22: error: too few arguments to function call, expected 2, have 1 cell1 = lnext(cell1); ~~~~~ ^ /usr/pgsql-13/include/server/nodes/pg_list.h:320:1: note: 'lnext' declared here static inline ListCell * ^ src/python.c:535:22: error: too few arguments to function call, expected 2, have 1 cell2 = lnext(cell2); ~~~~~ ^ /usr/pgsql-13/include/server/nodes/pg_list.h:320:1: note: 'lnext' declared here static inline ListCell * ^ src/python.c:541:22: error: too few arguments to function call, expected 2, have 1 cell1 = lnext(cell1); ~~~~~ ^ /usr/pgsql-13/include/server/nodes/pg_list.h:320:1: note: 'lnext' declared here static inline ListCell * ^ src/python.c:542:22: error: too few arguments to function call, expected 2, have 1 cell2 = lnext(cell2); ~~~~~ ^ /usr/pgsql-13/include/server/nodes/pg_list.h:320:1: note: 'lnext' declared here static inline ListCell * ^ 6 errors generated. make[1]: *** [/usr/pgsql-13/lib/pgxs/src/makefiles/../../src/Makefile.global:1051: src/python.bc] Error 1 src/query.c:844:16: error: too few arguments to function call, expected 2, have 1 lc = lnext(lc); ~~~~~ ^ /usr/pgsql-13/include/server/nodes/pg_list.h:320:1: note: 'lnext' declared here static inline ListCell * ^ src/query.c:847:16: error: too few arguments to function call, expected 2, have 1 lc = lnext(lc); ~~~~~ ^ /usr/pgsql-13/include/server/nodes/pg_list.h:320:1: note: 'lnext' declared here static inline ListCell * ^ src/query.c:850:16: error: too few arguments to function call, expected 2, have 1 lc = lnext(lc); ~~~~~ ^ /usr/pgsql-13/include/server/nodes/pg_list.h:320:1: note: 'lnext' declared here static inline ListCell * ^ src/query.c:853:16: error: too few arguments to function call, expected 2, have 1 lc = lnext(lc); ~~~~~ ^ /usr/pgsql-13/include/server/nodes/pg_list.h:320:1: note: 'lnext' declared here static inline ListCell * ^ src/query.c:859:16: error: too few arguments to function call, expected 2, have 1 lc = lnext(lc); ~~~~~ ^ /usr/pgsql-13/include/server/nodes/pg_list.h:320:1: note: 'lnext' declared here static inline ListCell * ^ 5 errors generated. make[1]: *** [/usr/pgsql-13/lib/pgxs/src/makefiles/../../src/Makefile.global:1051: src/query.bc] Error 1
The text was updated successfully, but these errors were encountered: