EnterpriseDB / mongo_fdw

PostgreSQL foreign data wrapper for MongoDB
GNU Lesser General Public License v3.0
326 stars 70 forks source link

Error compiling for 9.5 on ubuntu 14.04 #42

Closed joaocc closed 8 years ago

joaocc commented 8 years ago

mongo_fdw.c:322:16: error: too few arguments to function ‘create_foreignscan_path’

root@h-db-pgsql:/tmp/mongo_fdw# 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 -g -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -I/usr/include/mit-krb5 -fPIC -pie -fno-omit-frame-pointer -fpic --std=c99 -I/usr/local/include/libmongoc-1.0 -I/usr/local/include/libbson-1.0   -Ijson-c -DMETA_DRIVER -I. -I./ -I/usr/include/postgresql/9.5/server -I/usr/include/postgresql/internal -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2  -I/usr/include/tcl8.6  -c -o mongo_fdw.o mongo_fdw.c
mongo_fdw.c: In function ‘mongo_fdw_handler’:
mongo_fdw.c:184:29: warning: assignment from incompatible pointer type [enabled by default]
  fdwRoutine->GetForeignPlan = MongoGetForeignPlan;
                             ^
mongo_fdw.c: In function ‘MongoGetForeignPaths’:
mongo_fdw.c:322:16: warning: passing argument 8 of ‘create_foreignscan_path’ from incompatible pointer type [enabled by default]
                NIL); /* no fdw_private data */
                ^
In file included from mongo_fdw.h:47:0,
                 from mongo_wrapper.h:20,
                 from mongo_fdw.c:20:
/usr/include/postgresql/9.5/server/optimizer/pathnode.h:82:21: note: expected ‘struct Path *’ but argument is of type ‘struct List *’
 extern ForeignPath *create_foreignscan_path(PlannerInfo *root, RelOptInfo *rel,
                     ^
mongo_fdw.c:322:16: error: too few arguments to function ‘create_foreignscan_path’
                NIL); /* no fdw_private data */
                ^
In file included from mongo_fdw.h:47:0,
                 from mongo_wrapper.h:20,
                 from mongo_fdw.c:20:
/usr/include/postgresql/9.5/server/optimizer/pathnode.h:82:21: note: declared here
 extern ForeignPath *create_foreignscan_path(PlannerInfo *root, RelOptInfo *rel,
                     ^
mongo_fdw.c: In function ‘MongoGetForeignPlan’:
mongo_fdw.c:381:32: error: too few arguments to function ‘make_foreignscan’
                                );
                                ^
In file included from mongo_fdw.h:49:0,
                 from mongo_wrapper.h:20,
                 from mongo_fdw.c:20:
/usr/include/postgresql/9.5/server/optimizer/planmain.h:46:21: note: declared here
 extern ForeignScan *make_foreignscan(List *qptlist, List *qpqual,
                     ^
make: *** [mongo_fdw.o] Error 1
ibrarahmad commented 8 years ago

This is due to new changes in PostgreSQL9.5. I will push the fix today.

On Thu, Jan 14, 2016 at 8:19 AM, Joao C Costa notifications@github.com wrote:

mongo_fdw.c:322:16: error: too few arguments to function ‘create_foreignscan_path’

root@h-db-pgsql:/tmp/mongo_fdw# 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 -g -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -I/usr/include/mit-krb5 -fPIC -pie -fno-omit-frame-pointer -fpic --std=c99 -I/usr/local/include/libmongoc-1.0 -I/usr/local/include/libbson-1.0 -Ijson-c -DMETA_DRIVER -I. -I./ -I/usr/include/postgresql/9.5/server -I/usr/include/postgresql/internal -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include/tcl8.6 -c -o mongo_fdw.o mongo_fdw.c mongo_fdw.c: In function ‘mongo_fdw_handler’: mongo_fdw.c:184:29: warning: assignment from incompatible pointer type [enabled by default] fdwRoutine->GetForeignPlan = MongoGetForeignPlan; ^ mongo_fdw.c: In function ‘MongoGetForeignPaths’: mongo_fdw.c:322:16: warning: passing argument 8 of ‘create_foreignscan_path’ from incompatible pointer type [enabled by default] NIL); /* no fdwprivate data / ^ In file included from mongo_fdw.h:47:0, from mongo_wrapper.h:20, from mongo_fdw.c:20: /usr/include/postgresql/9.5/server/optimizer/pathnode.h:82:21: note: expected ‘struct Path ’ but argument is of type ‘struct List ’ extern ForeignPath create_foreignscan_path(PlannerInfo root, RelOptInfo rel, ^ mongo_fdw.c:322:16: error: too few arguments to function ‘create_foreignscanpath’ NIL); / no fdwprivate data / ^ In file included from mongo_fdw.h:47:0, from mongo_wrapper.h:20, from mongo_fdw.c:20: /usr/include/postgresql/9.5/server/optimizer/pathnode.h:82:21: note: declared here extern ForeignPath create_foreignscan_path(PlannerInfo root, RelOptInfo rel, ^ mongo_fdw.c: In function ‘MongoGetForeignPlan’: mongo_fdw.c:381:32: error: too few arguments to function ‘make_foreignscan’ ); ^ In file included from mongo_fdw.h:49:0, from mongo_wrapper.h:20, from mongo_fdw.c:20: /usr/include/postgresql/9.5/server/optimizer/planmain.h:46:21: note: declared here extern ForeignScan make_foreignscan(List qptlist, List qpqual, ^ make: _* [mongo_fdw.o] Error 1

— Reply to this email directly or view it on GitHub https://github.com/EnterpriseDB/mongo_fdw/issues/42.

Ibrar Ahmed EnterpriseDB http://www.enterprisedb.com

joaocc commented 8 years ago

Thank you!

ibrarahmad commented 8 years ago

Fixed

On Thu, Jan 14, 2016 at 3:19 PM, Joao C Costa notifications@github.com wrote:

Thank you!

— Reply to this email directly or view it on GitHub https://github.com/EnterpriseDB/mongo_fdw/issues/42#issuecomment-171596186 .

Ibrar Ahmed EnterpriseDB http://www.enterprisedb.com

joaocc commented 8 years ago

Thx!