Closed JoshdotNew closed 8 years ago
Please follow the documentation.
You need to run these command
$ ./autogen.sh --with-legacy $ make install
On Sat, Oct 10, 2015 at 1:09 AM, JoshdotNew notifications@github.com wrote:
mke@that:~/mongo_fdw$ sudo make 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-strong -Wformat -Werror=format-security -I/usr/include/mit-krb5 -fPIC -pie -DLINUX_OOM_SCORE_ADJ=0 -fno-omit-frame-pointer -fpic --std=c99 -Imongo-c-driver/src -Ijson-c -I. -I./ -I/usr/include/postgresql/9.4/server -I/usr/include/postgresql/internal -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include/tcl8.6 -c -o connection.o connection.c In file included from mongo_wrapper.h:20:0, from connection.c:21: mongo_fdw.h:21:20: fatal error: config.h: No such file or directory
include "config.h"
^ compilation terminated. : recipe for target 'connection.o' failed make: *\ [connection.o] Error 1
— Reply to this email directly or view it on GitHub.
Ibrar Ahmed EnterpriseDB http://www.enterprisedb.com
Thank you for your response and fix:
With make install I was getting an error:
pv -fexcess-precision=standard -g -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -I/usr/include/mit-krb5 -fPIC -pie -DLINUX_OOM_SCORE_ADJ=0 -fno-omit-frame-pointer -fpic -shared -o mongo_fdw.so connection.o option.o mongo_wrapper.o mongo_fdw.o mongo_query.o mongo-c-driver/src/bson.os mongo-c-driver/src/encoding.os mongo-c-driver/src/md5.os mongo-c-driver/src/mongo.os mongo-c-driver/src/numbers.os mongo-c-driver/src/env.os json-c/json_util.o json-c/json_object.o json-c/json_tokener.o json-c/json_object_iterator.o json-c/printbuf.o json-c/linkhash.o json-c/arraylist.o json-c/random_seed.o json-c/debug.o -L/usr/lib/x86_64-linux-gnu -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -L/usr/lib/mit-krb5 -L/usr/lib/x86_64-linux-gnu/mit-krb5 -Wl,--as-needed
/usr/bin/ld: json-c/json_util.o: relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC
json-c/json_util.o: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
/usr/lib/postgresql/9.4/lib/pgxs/src/makefiles/../../src/Makefile.shlib:314: recipe for target 'mongo_fdw.so' failed
I RAN: make clean and then it worked!
"PostgreSQL 9.4.4 on x86_64-unknown-linux-gnu, compiled by gcc (Ubuntu 4.9.1-16ubuntu6) 4.9.1, 64-bit" Trying to run 'make' under mongo_fdw and I am getting this error:
me@that:~/mongo_fdw$ make 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-strong -Wformat -Werror=format-security -I/usr/include/mit-krb5 -fPIC -pie -DLINUX_OOM_SCORE_ADJ=0 -fno-omit-frame-pointer -fpic --std=c99 -Imongo-c-driver/src -Ijson-c -I. -I./ -I/usr/include/postgresql/9.4/server -I/usr/include/postgresql/internal -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include/tcl8.6 -c -o connection.o connection.c In file included from mongo_wrapper.h:20:0, from connection.c:21: mongo_fdw.h:21:20: fatal error: config.h: No such file or directory
include "config.h"
compilation terminated.