I am trying to install Apache-AGE for Windows(Windows-10) using WSL. I am following this tutorial.
I have successfully installed/configured PostgreSQL(14.0). But for apache I am facing the following issue:
Command Executed:
sudo make PG_CONFIG=~/postgresql-14.0/bin/pg_config install
Error Encountered:
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 -ggdb -Og -g3 -fno-omit-frame-pointer -fPIC -I.//src/include -I.//src/include/parser -I. -I./ -I/home/huzaiifaaaa/postgresql-14.0/include/server -I/home/huzaiifaaaa/postgresql-14.0/include/internal -D_GNU_SOURCE -c -o src/backend/catalog/ag_catalog.o src/backend/catalog/ag_catalog.c
src/backend/catalog/ag_catalog.c: In function ‘process_utility_hook_init’:
src/backend/catalog/ag_catalog.c:71:25: warning: assignment to ‘ProcessUtility_hook_type’ {aka ‘void (*)(struct PlannedStmt *, const char *, _Bool, enum <anonymous>, struct ParamListInfoData *, struct QueryEnvironment *, struct _DestReceiver *, struct QueryCompletion *)’} from incompatible pointer type ‘void (*)(PlannedStmt *, const char *, ProcessUtilityContext, struct ParamListInfoData *, QueryEnvironment *, DestReceiver *, char *)’ {aka ‘void (*)(struct PlannedStmt *, const char *, enum <anonymous>, struct ParamListInfoData *, struct QueryEnvironment *, struct _DestReceiver *, char *)’} [-Wincompatible-pointer-types]
71 | ProcessUtility_hook = ag_ProcessUtility_hook;
| ^
src/backend/catalog/ag_catalog.c: In function ‘ag_ProcessUtility_hook’:
src/backend/catalog/ag_catalog.c:97:68: error: incompatible type for argument 4 of ‘prev_process_utility_hook’
97 | (*prev_process_utility_hook) (pstmt, queryString, context, params,
| ^~~~~~
| |
| ParamListInfo {aka struct ParamListInfoData *}
src/backend/catalog/ag_catalog.c:97:68: note: expected ‘ProcessUtilityContext’ {aka ‘enum <anonymous>’} but argument is of type ‘ParamListInfo’ {aka ‘struct ParamListInfoData *’}
src/backend/catalog/ag_catalog.c:98:39: warning: passing argument 5 of ‘prev_process_utility_hook’ from incompatible pointer type [-Wincompatible-pointer-types]
98 | queryEnv, dest, completionTag);
| ^~~~~~~~
| |
| QueryEnvironment * {aka struct QueryEnvironment *}
src/backend/catalog/ag_catalog.c:98:39: note: expected ‘ParamListInfo’ {aka ‘struct ParamListInfoData *’} but argument is of type ‘QueryEnvironment *’ {aka ‘struct QueryEnvironment *’}
src/backend/catalog/ag_catalog.c:98:49: warning: passing argument 6 of ‘prev_process_utility_hook’ from incompatible pointer type [-Wincompatible-pointer-types]
98 | queryEnv, dest, completionTag);
| ^~~~
| |
| DestReceiver * {aka struct _DestReceiver *}
src/backend/catalog/ag_catalog.c:98:49: note: expected ‘QueryEnvironment *’ {aka ‘struct QueryEnvironment *’} but argument is of type ‘DestReceiver *’ {aka ‘struct _DestReceiver *’}
src/backend/catalog/ag_catalog.c:98:55: warning: passing argument 7 of ‘prev_process_utility_hook’ from incompatible pointer type [-Wincompatible-pointer-types]
98 | queryEnv, dest, completionTag);
| ^~~~~~~~~~~~~
| |
| char *
src/backend/catalog/ag_catalog.c:98:55: note: expected ‘DestReceiver *’ {aka ‘struct _DestReceiver *’} but argument is of type ‘char *’
src/backend/catalog/ag_catalog.c:97:10: error: too few arguments to function ‘prev_process_utility_hook’
97 | (*prev_process_utility_hook) (pstmt, queryString, context, params,
| ~^~~~~~~~~~~~~~~~~~~~~~~~~~~
src/backend/catalog/ag_catalog.c:100:62: error: incompatible type for argument 4 of ‘standard_ProcessUtility’
100 | standard_ProcessUtility(pstmt, queryString, context, params, queryEnv,
| ^~~~~~
| |
| ParamListInfo {aka struct ParamListInfoData *}
In file included from src/backend/catalog/ag_catalog.c:27:
/home/huzaiifaaaa/postgresql-14.0/include/server/tcop/utility.h:87:32: note: expected ‘ProcessUtilityContext’ {aka ‘enum <anonymous>’} but argument is of type ‘ParamListInfo’ {aka ‘struct ParamListInfoData *’}
87 | ProcessUtilityContext context, ParamListInfo params,
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
src/backend/catalog/ag_catalog.c:100:70: warning: passing argument 5 of ‘standard_ProcessUtility’ from incompatible pointer type [-Wincompatible-pointer-types]
100 | standard_ProcessUtility(pstmt, queryString, context, params, queryEnv,
| ^~~~~~~~
| |
| QueryEnvironment * {aka struct QueryEnvironment *}
In file included from src/backend/catalog/ag_catalog.c:27:
/home/huzaiifaaaa/postgresql-14.0/include/server/tcop/utility.h:87:55: note: expected ‘ParamListInfo’ {aka ‘struct ParamListInfoData *’} but argument is of type ‘QueryEnvironment *’ {aka ‘struct QueryEnvironment *’}
87 | ProcessUtilityContext context, ParamListInfo params,
| ~~~~~~~~~~~~~~^~~~~~
src/backend/catalog/ag_catalog.c:101:33: warning: passing argument 6 of ‘standard_ProcessUtility’ from incompatible pointer type [-Wincompatible-pointer-types]
101 | dest, completionTag);
| ^~~~
| |
| DestReceiver * {aka struct _DestReceiver *}
In file included from src/backend/catalog/ag_catalog.c:27:
/home/huzaiifaaaa/postgresql-14.0/include/server/tcop/utility.h:88:28: note: expected ‘QueryEnvironment *’ {aka ‘struct QueryEnvironment *’} but argument is of type ‘DestReceiver *’ {aka ‘struct _DestReceiver *’}
88 | QueryEnvironment *queryEnv,
| ~~~~~~~~~~~~~~~~~~^~~~~~~~
src/backend/catalog/ag_catalog.c:101:39: warning: passing argument 7 of ‘standard_ProcessUtility’ from incompatible pointer type [-Wincompatible-pointer-types]
101 | dest, completionTag);
| ^~~~~~~~~~~~~
| |
| char *
In file included from src/backend/catalog/ag_catalog.c:27:
/home/huzaiifaaaa/postgresql-14.0/include/server/tcop/utility.h:89:24: note: expected ‘DestReceiver *’ {aka ‘struct _DestReceiver *’} but argument is of type ‘char *’
89 | DestReceiver *dest, QueryCompletion *qc);
| ~~~~~~~~~~~~~~^~~~
src/backend/catalog/ag_catalog.c:100:9: error: too few arguments to function ‘standard_ProcessUtility’
100 | standard_ProcessUtility(pstmt, queryString, context, params, queryEnv,
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from src/backend/catalog/ag_catalog.c:27:
/home/huzaiifaaaa/postgresql-14.0/include/server/tcop/utility.h:85:13: note: declared here
85 | extern void standard_ProcessUtility(PlannedStmt *pstmt, const char *queryString,
| ^~~~~~~~~~~~~~~~~~~~~~~
make: *** [<builtin>: src/backend/catalog/ag_catalog.o] Error 1
I have cloned age code from its official GitHub here.
If I am missing something, do let me know.
Any help would be appreciated.
Trying to configure Apache AGE extension for PostgreSQL.
2
Answers
In this tutorial he installed PostgreSQL 11.18, I believe that Apache AGE has not yet released a version compatible with PostgreSQL 14.
So, what you can do is uninstall PostgreSQL 14.10 and then install a new version of it (see this tutorial). Apache AGE works in PostgreSQL 11, 12 and 13, you have to change to the branch of the repository to your Postgres’ version using the following command:
And then running the make command
Apache Age for PG-14 has not been released, you could try configuring and installing PG-13 and running your command again