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

Compilation error #15

Open
NOUBISSI opened this issue Mar 11, 2022 · 1 comment
Open

Compilation error #15

NOUBISSI opened this issue Mar 11, 2022 · 1 comment

Comments

@NOUBISSI
Copy link

NOUBISSI commented Mar 11, 2022

Hello, I am looking for a Multimaster solution for postgres. I am interested in this project. But when I try to compile I get an error. Can you help me.
here is the error message:
user@user:/tmp/mmts$ sudo make install Makefile:91: warning: overriding recipe for target 'check' /usr/lib/postgresql/13/lib/pgxs/src/makefiles/pgxs.mk:433: warning: ignoring old recipe for target 'check' 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 -g -O2 -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -fno-omit-frame-pointer -fPIC -I/tmp/mmts/src/include -I/usr/include/postgresql -I. -I./ -I/usr/include/postgresql/13/server -I/usr/include/postgresql/internal -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2 -c -o src/multimaster.o src/multimaster.c src/multimaster.c: In function ‘_PG_init’: src/multimaster.c:743:9: error: ‘DetectGlobalDeadLock’ undeclared (first use in this function); did you mean ‘MtmDetectGlobalDeadLock’? 743 | DetectGlobalDeadLock = MtmDetectGlobalDeadLock; | ^~~~~~~~~~~~~~~~~~~~ | MtmDetectGlobalDeadLock src/multimaster.c:743:9: note: each undeclared identifier is reported only once for each function it appears in src/multimaster.c: In function ‘check_config’: src/multimaster.c:854:13: error: ‘max_prepared_xacts’ undeclared (first use in this function); did you mean ‘pg_prepared_xact’? 854 | if (max_prepared_xacts < 1) | ^~~~~~~~~~~~~~~~~~ | pg_prepared_xact src/multimaster.c: In function ‘MtmMesageToString’: src/multimaster.c:2350:62: error: expected ‘)’ before ‘XID_FMT’ 2350 | appendStringInfo(&si, ", \"xid\": \"" XID_FMT "\"", msg->xid); | ~ ^~~~~~~~ | ) src/multimaster.c: In function ‘mtm_hold_backends’: src/multimaster.c:2513:17: error: unknown type name ‘PreparedTransaction’ 2513 | PreparedTransaction pxacts; | ^~~~~~~~~~~~~~~~~~~ src/multimaster.c:2517:30: warning: implicit declaration of function ‘GetPreparedTransactions’ [-Wimplicit-function-declaration] 2517 | n_prepares = GetPreparedTransactions(&pxacts); | ^~~~~~~~~~~~~~~~~~~~~~~ src/multimaster.c:2523:50: error: subscripted value is neither array nor pointer nor vector 2523 | deserialize_xstate(pxacts[i].state_3pc, &xinfo, &gtx_state, PANIC); | ^ src/multimaster.c:2529:31: warning: passing argument 1 of ‘pfree’ makes pointer from integer without a cast [-Wint-conversion] 2529 | pfree(pxacts); | ^~~~~~ | | | int In file included from /usr/include/postgresql/13/server/postgres.h:48, from src/multimaster.c:10: /usr/include/postgresql/13/server/utils/palloc.h:81:25: note: expected ‘void *’ but argument is of type ‘int’ 81 | extern void pfree(void *pointer); | ~~~~~~^~~~~~~ make: *** [<builtin>: src/multimaster.o] Error 1

image

my system is: Linux ku 5.13.0-30-generic #33-Ubuntu SMP Fri Feb 4 17:03:31 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

@minh123viptanvan
Copy link

hi, You should install postgrespro source code.
ảnh
https://github.com/postgrespro/postgres_cluster/tree/rel13_mm_2
i think you installed original postgresql. Original source code can not compile with mmts.
ảnh

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

2 participants