postgresql 在Windows上安装Apache-age时遇到的问题

qcbq4gxm  于 2023-05-06  发布在  PostgreSQL
关注(0)|答案(5)|浏览(161)

我正在尝试使用WSL安装Apache-AGE for Windows(Windows-10)。我正在跟踪这个tutorial
我已成功安装/配置PostgreSQL(14.0)。但是对于Apache来说,我面临着以下问题:

执行命令:sudo make PG_CONFIG=~/postgresql-14.0/bin/pg_config install
遇到错误:

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

我从它的官方GitHub here克隆了年龄代码。
如果我错过了什么,让我知道。任何帮助将不胜感激。
正在为PostgreSQL配置Apache AGE扩展。

b0zn9rqh

b0zn9rqh1#

在本教程中,他安装了PostgreSQL 11.18,我相信Apache AGE尚未发布与PostgreSQL 14兼容的版本。
所以,你可以做的是卸载PostgreSQL 14.10,然后安装一个新版本(参见this tutorial)。Apache AGE在PostgreSQL 11、12和13中工作,您必须使用以下命令将存储库的分支更改为您的Postgres版本:

git checkout PG13

然后运行make命令

sudo make PG_CONFIG=~/path_to_postgres/bin/pg_config install
ntjbwcob

ntjbwcob2#

Apache Age for PG-14尚未发布,您可以尝试配置和安装PG-13并再次运行命令

rm5edbpk

rm5edbpk3#

Apache age与pg14不兼容,请尝试pg13或12,11版本。它将工作。

qkf9rpyu

qkf9rpyu4#

目前还没有兼容PostgreSQL 14的Apache AGE版本,但是你可以尝试将你的Postgres降级到兼容的旧版本:
Release v1.3.0 for PG13
Release v1.3.0 for PG12
通过Compatible versions查看所有版本

6yt4nkrj

6yt4nkrj5#

Apache Age与postgres版本14不兼容,只有11,12,13,请阅读文档here,了解如何安装兼容的版本和所需的依赖项。

相关问题