postgrespro/rum

build postgresql 12 error

znajax opened this issue · 3 comments

[root@docker rum-1.3.1]# make USE_PGXS=1
gcc -std=gnu99 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -fPIC -I. -I./ -I/opt/pgsql12/include/server -I/opt/pgsql12/include/internal -D_GNU_SOURCE -I/usr/local/include -c -o src/rumsort.o src/rumsort.c
src/rumsort.c: In function ‘rum_tuplesort_begin_common’:
src/rumsort.c:893:2: warning: implicit declaration of function ‘AllocSetContextCreateExtended’ [-Wimplicit-function-declaration]
sortcontext = RumContextCreate(CurrentMemoryContext, "TupleSort");
^
src/rumsort.c:893:14: warning: assignment makes pointer from integer without a cast [enabled by default]
sortcontext = RumContextCreate(CurrentMemoryContext, "TupleSort");
^
src/rumsort.c: In function ‘rum_tuplesort_begin_cluster’:
src/rumsort.c:1054:2: warning: implicit declaration of function ‘_bt_mkscankey_nodata’ [-Wimplicit-function-declaration]
state->indexScanKey = _bt_mkscankey_nodata(indexRel);
^
src/rumsort.c:1054:22: warning: assignment makes pointer from integer without a cast [enabled by default]
state->indexScanKey = _bt_mkscankey_nodata(indexRel);
^
src/rumsort.c:1070:3: error: too few arguments to function ‘MakeSingleTupleTableSlot’
slot = MakeSingleTupleTableSlot(tupDesc);
^
In file included from src/rumsort.h:26:0,
from src/rumsort.c:123:
/opt/pgsql12/include/server/executor/tuptable.h:302:24: note: declared here
extern TupleTableSlot MakeSingleTupleTableSlot(TupleDesc tupdesc,
^
src/rumsort.c: In function ‘rum_tuplesort_begin_index_btree’:
src/rumsort.c:1115:22: warning: assignment makes pointer from integer without a cast [enabled by default]
state->indexScanKey = _bt_mkscankey_nodata(indexRel);
^
src/rumsort.c: In function ‘myFunctionCall2Coll’:
src/rumsort.c:3229:2: error: unknown type name ‘FunctionCallInfoData’
FunctionCallInfoData fcinfo;
^
In file included from src/rumsort.h:23:0,
from src/rumsort.c:123:
/opt/pgsql12/include/server/fmgr.h:152:11: error: request for member ‘flinfo’ in something not a structure or union
(Fcinfo).flinfo = (Flinfo);
^
src/rumsort.c:3232:2: note: in expansion of macro ‘InitFunctionCallInfoData’
InitFunctionCallInfoData(fcinfo, flinfo, 2, collation, NULL, NULL);
^
/opt/pgsql12/include/server/fmgr.h:153:11: error: request for member ‘context’ in something not a structure or union
(Fcinfo).context = (Context);
^
src/rumsort.c:3232:2: note: in expansion of macro ‘InitFunctionCallInfoData’
InitFunctionCallInfoData(fcinfo, flinfo, 2, collation, NULL, NULL);
^
/opt/pgsql12/include/server/fmgr.h:154:11: error: request for member ‘resultinfo’ in something not a structure or union
(Fcinfo).resultinfo = (Resultinfo);
^
src/rumsort.c:3232:2: note: in expansion of macro ‘InitFunctionCallInfoData’
InitFunctionCallInfoData(fcinfo, flinfo, 2, collation, NULL, NULL);
^
/opt/pgsql12/include/server/fmgr.h:155:11: error: request for member ‘fncollation’ in something not a structure or union
(Fcinfo).fncollation = (Collation);
^
src/rumsort.c:3232:2: note: in expansion of macro ‘InitFunctionCallInfoData’
InitFunctionCallInfoData(fcinfo, flinfo, 2, collation, NULL, NULL);
^
/opt/pgsql12/include/server/fmgr.h:156:11: error: request for member ‘isnull’ in something not a structure or union
(Fcinfo).isnull = false;
^
src/rumsort.c:3232:2: note: in expansion of macro ‘InitFunctionCallInfoData’
InitFunctionCallInfoData(fcinfo, flinfo, 2, collation, NULL, NULL);
^
/opt/pgsql12/include/server/fmgr.h:157:11: error: request for member ‘nargs’ in something not a structure or union
(Fcinfo).nargs = (Nargs);
^
src/rumsort.c:3232:2: note: in expansion of macro ‘InitFunctionCallInfoData’
InitFunctionCallInfoData(fcinfo, flinfo, 2, collation, NULL, NULL);
^
src/rumsort.c:3234:8: error: request for member ‘arg’ in something not a structure or union
fcinfo.arg[0] = arg1;
^
src/rumsort.c:3235:8: error: request for member ‘arg’ in something not a structure or union
fcinfo.arg[1] = arg2;
^
src/rumsort.c:3236:8: error: request for member ‘argnull’ in something not a structure or union
fcinfo.argnull[0] = false;
^
src/rumsort.c:3237:8: error: request for member ‘argnull’ in something not a structure or union
fcinfo.argnull[1] = false;
^
In file included from src/rumsort.h:23:0,
from src/rumsort.c:123:
/opt/pgsql12/include/server/fmgr.h:167:48: error: request for member ‘flinfo’ in something not a structure or union
#define FunctionCallInvoke(fcinfo) ((
(fcinfo)->flinfo->fn_addr) (fcinfo))
^
src/rumsort.c:3239:11: note: in expansion of macro ‘FunctionCallInvoke’
result = FunctionCallInvoke(&fcinfo);
^
src/rumsort.c:3242:12: error: request for member ‘isnull’ in something not a structure or union
if (fcinfo.isnull)
^
In file included from /opt/pgsql12/include/server/postgres.h:47:0,
from src/rumsort.c:121:
src/rumsort.c:3243:50: error: request for member ‘flinfo’ in something not a structure or union
elog(ERROR, "function %u returned NULL", fcinfo.flinfo->fn_oid);
^
/opt/pgsql12/include/server/utils/elog.h:221:23: note: in definition of macro ‘elog’
elog_finish(elevel, VA_ARGS);
^
make: *** [src/rumsort.o] Error 1

What checkout are you using? It looks like it not the newest.

I have the same problem with version 1.3.1 downloaded from tarball (https://github.com/postgrespro/rum/archive/1.3.1.tar.gz). With master instead it builds fine.

It's been fixed in the master long ago. I close the ticket. Big thanks for reporting.