Reputation: 11
I am trying to install the Apache AGE graph database plugin on the open-source version of PolarDB 15. According to the documentation, the AGE plugin supports PG versions 11, 12, 13, 14, 15, and 16, so it should theoretically work with PolarDB 15. I followed the steps below for installation, but encountered compilation errors that seem to suggest incompatible function parameters.
Detailed error messages are as follows:
src/backend/commands/label_commands.c: In function ‘range_var_callback_for_remove_relation’:
src/backend/commands/label_commands.c:905:10: warning: implicit declaration of function ‘object_ownercheck’ [-Wimplicit-function-declaration]
905 | if (!object_ownercheck(rel_oid, get_rel_namespace(rel_oid), GetUserId()))
| ^~~~~~~~~~~~~~~~~
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -g -g -pipe -Wall -fno-omit-frame-pointer -fsigned-char -O0 -fstack-protector-strong --param=ssp-buffer-size=4 -fPIC -I.//src/include -I.//src/include/parser -I. -I./ -I/home/postgres/tmp_polardb_pg_15_base/include/postgresql/server -I/home/postgres/tmp_polardb_pg_15_base/include/postgresql/internal -D_GNU_SOURCE -I/usr/include/libxml2 -c -o src/backend/executor/cypher_create.o src/backend/executor/cypher_create.c -MMD -MP -MF .deps/cypher_create.Po
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -g -g -pipe -Wall -fno-omit-frame-pointer -fsigned-char -O0 -fstack-protector-strong --param=ssp-buffer-size=4 -fPIC -I.//src/include -I.//src/include/parser -I. -I./ -I/home/postgres/tmp_polardb_pg_15_base/include/postgresql/server -I/home/postgres/tmp_polardb_pg_15_base/include/postgresql/internal -D_GNU_SOURCE -I/usr/include/libxml2 -c -o src/backend/executor/cypher_merge.o src/backend/executor/cypher_merge.c -MMD -MP -MF .deps/cypher_merge.Po
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -g -g -pipe -Wall -fno-omit-frame-pointer -fsigned-char -O0 -fstack-protector-strong --param=ssp-buffer-size=4 -fPIC -I.//src/include -I.//src/include/parser -I. -I./ -I/home/postgres/tmp_polardb_pg_15_base/include/postgresql/server -I/home/postgres/tmp_polardb_pg_15_base/include/postgresql/internal -D_GNU_SOURCE -I/usr/include/libxml2 -c -o src/backend/executor/cypher_set.o src/backend/executor/cypher_set.c -MMD -MP -MF .deps/cypher_set.Po
src/backend/executor/cypher_set.c: In function ‘update_entity_tuple’:
src/backend/executor/cypher_set.c:101:5: error: unknown type name ‘TU_UpdateIndexes’
101 | TU_UpdateIndexes update_indexes;
| ^~~~~~~~~~~~~~~~
src/backend/executor/cypher_set.c:133:55: warning: passing argument 10 of ‘table_tuple_update’ from incompatible pointer type [-Wincompatible-pointer-types]
133 | &hufd, &lockmode, &update_indexes);
| ^~~~~~~~~~~~~~~
| |
| int *
In file included from /home/postgres/tmp_polardb_pg_15_base/include/postgresql/server/access/heapam.h:22,
from .//src/include/executor/cypher_utils.h:23,
from src/backend/executor/cypher_set.c:25:
/home/postgres/tmp_polardb_pg_15_base/include/postgresql/server/access/tableam.h:1509:42: note: expected ‘_Bool *’ but argument is of type ‘int *’
1509 | bool *update_indexes)
| ^
src/backend/executor/cypher_set.c:157:67: error: ‘TU_None’ undeclared (first use in this function)
157 | if (resultRelInfo->ri_NumIndices > 0 && update_indexes != TU_None)
| ^~~~~~~
src/backend/executor/cypher_set.c:157:67: note: each undeclared identifier is reported only once for each function it appears in
src/backend/executor/cypher_set.c:160:52: error: ‘TU_Summarizing’ undeclared (first use in this function)
160 | (update_indexes == TU_Summarizing));
| ^~~~~~~~~~~~~~
src/backend/executor/cypher_set.c:159:11: error: too many arguments to function ‘ExecInsertIndexTuples’
159 | ExecInsertIndexTuples(resultRelInfo, elemTupleSlot, estate, false, false, NULL, NIL,
| ^~~~~~~~~~~~~~~~~~~~~
In file included from /home/postgres/tmp_polardb_pg_15_base/include/postgresql/server/commands/explain.h:16,
from /home/postgres/tmp_polardb_pg_15_base/include/postgresql/server/nodes/extensible.h:18,
from .//src/include/executor/cypher_executor.h:23,
from src/backend/executor/cypher_set.c:24:
/home/postgres/tmp_polardb_pg_15_base/include/postgresql/server/executor/executor.h:617:14: note: declared here
617 | extern List *ExecInsertIndexTuples(ResultRelInfo *resultRelInfo,
| ^~~~~~~~~~~~~~~~~~~~~
make: *** [/home/postgres/tmp_polardb_pg_15_base/lib/postgresql/pgxs/src/makefiles/../../src/Makefile.global:1010: src/backend/executor/cypher_set.o] Error 1
Steps to Reproduce:
cd /data/
git clone --depth 1 https://github.com/apache/age
cd /data/age
USE_PGXS=1 make install
Upvotes: 0
Views: 11