s3_fdw icon indicating copy to clipboard operation
s3_fdw copied to clipboard

make can not combile

Open taomingke opened this issue 6 years ago • 3 comments

gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -DLINUX_OOM_SCORE_ADJ=0 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -fPIC -I. -I. -I/usr/include/pgsql/server -I/usr/include/pgsql/internal -D_GNU_SOURCE -I/usr/include/libxml2 -c -o s3_fdw.o s3_fdw.c s3_fdw.c:117:1: error: unknown type name ‘FdwPlan’ static FdwPlan *s3PlanForeignScan(Oid foreigntableid, ^ s3_fdw.c: In function ‘s3test’: s3_fdw.c:150:9: warning: variable ‘sc’ set but not used [-Wunused-but-set-variable] int sc; ^ s3_fdw.c: In function ‘s3_fdw_handler’: s3_fdw.c:200:12: error: ‘FdwRoutine’ has no member named ‘PlanForeignScan’ fdwroutine->PlanForeignScan = s3PlanForeignScan; ^ s3_fdw.c: At top level: s3_fdw.c:439:1: error: unknown type name ‘FdwPlan’ static FdwPlan * ^ s3_fdw.c: In function ‘s3PlanForeignScan’: s3_fdw.c:444:2: error: unknown type name ‘FdwPlan’ FdwPlan *fdwplan; ^ In file included from /usr/include/pgsql/server/nodes/pg_list.h:40:0, from /usr/include/pgsql/server/access/tupdesc.h:19, from /usr/include/pgsql/server/access/htup.h:17, from /usr/include/pgsql/server/access/reloptions.h:22, from s3_fdw.c:10: s3_fdw.c:451:21: error: ‘FdwPlan’ undeclared (first use in this function) fdwplan = makeNode(FdwPlan); ^ /usr/include/pgsql/server/nodes/nodes.h:478:29: note: in definition of macro ‘makeNode’ #define makeNode(type) ((type *) newNode(sizeof(type),T_##type)) ^ s3_fdw.c:451:21: note: each undeclared identifier is reported only once for each function it appears in fdwplan = makeNode(FdwPlan); ^ /usr/include/pgsql/server/nodes/nodes.h:478:29: note: in definition of macro ‘makeNode’ #define makeNode(type) ((type *) newNode(sizeof(type),T_##type)) ^ /usr/include/pgsql/server/nodes/nodes.h:478:37: error: expected expression before ‘)’ token #define makeNode(type) ((type ) newNode(sizeof(type),T_##type)) ^ s3_fdw.c:451:12: note: in expansion of macro ‘makeNode’ fdwplan = makeNode(FdwPlan); ^ s3_fdw.c:453:16: error: request for member ‘startup_cost’ in something not a structure or union &fdwplan->startup_cost, &fdwplan->total_cost); ^ s3_fdw.c:453:40: error: request for member ‘total_cost’ in something not a structure or union &fdwplan->startup_cost, &fdwplan->total_cost); ^ s3_fdw.c:454:9: error: request for member ‘fdw_private’ in something not a structure or union fdwplan->fdw_private = NIL; / not used */ ^ s3_fdw.c: In function ‘s3_on_exit’: s3_fdw.c:869:8: warning: variable ‘len’ set but not used [-Wunused-but-set-variable] int len; ^ s3_fdw.c: In function ‘s3BeginForeignScan’: s3_fdw.c:585:7: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result] read(fileno(fp), &status, sizeof(int)); ^ s3_fdw.c: In function ‘header_handler’: s3_fdw.c:778:8: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result] write(fileno(ctx->flagfp), &status, sizeof(int));

taomingke avatar Mar 08 '18 09:03 taomingke

Same issue here is there any pre-requesite :~/s3_fdw-0.2.0> make install gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -fPIC -I. -I./ -I/usr/local/pgsql/include/server -I/usr/local/pgsql/include/internal -D_GNU_SOURCE -c -o s3_fdw.o s3_fdw.c s3_fdw.c:117:1: error: unknown type name ‘FdwPlan’ static FdwPlan *s3PlanForeignScan(Oid foreigntableid, ^ s3_fdw.c: In function ‘s3_test’: s3_fdw.c:149:9: warning: variable ‘sc’ set but not used [-Wunused-but-set-variable] int sc;

I am on a suse linux SLES 12.3

VinACE avatar Aug 06 '18 11:08 VinACE

Any update on this issue...

VinACE avatar Sep 12 '18 13:09 VinACE

Sorry I don’t have time to work on it any tome soon. Appreciate if anyone can contribute the code. You can try multicorn alternatively.

umitanuki avatar Sep 12 '18 18:09 umitanuki