EnterpriseDB / mongo_fdw

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

Installation Error-- 'bson.h' file not found #91

Open jessicachen888 opened 6 years ago

jessicachen888 commented 6 years ago

I have clone the repo from master using --recursive and config the postgresql path export PATH="/Applications/Postgres.app/Contents/Versions/9.5/bin:$PATH"

when I run the sudo make, the following error appears in the terminal: `gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -mmacosx-version-min=10.7 --std=c99 -Imongo-c-driver/src -Ijson-c -I. -I./ -I/Applications/Postgres.app/Contents/Versions/9.5/include/postgresql/server -I/Applications/Postgres.app/Contents/Versions/9.5/include/postgresql/internal -I/Applications/Postgres.app/Contents/Versions/9.5/include/libxml2 -I/Applications/Postgres.app/Contents/Versions/9.5/include -c -o connection.o connection.c In file included from connection.c:21: In file included from ./mongo_wrapper.h:21: ./mongo_fdw.h:23:10: fatal error: 'bson.h' file not found

include "bson.h"

     ^

1 error generated. make: *** [connection.o] Error 1`

I have also tried with sudo ./autogen.sh --with-legacy, the following error occurs: /Users/Jessica/Desktop/work/mongo_fdw ./autogen.sh: line 52: wget: command not found tar: Error opening archive: Failed to open 'json-c-0.12-20140410.tar.gz' mv: rename json-c-json-c-0.12-20140410 to json-c: No such file or directory ./autogen.sh: line 55: cd: json-c: No such file or directory ./autogen.sh: line 56: ../json_compilation_error.patch: No such file or directory /Users/Jessica/Desktop/work ./autogen.sh: line 40: wget: command not found tar: Error opening archive: Failed to open 'v0.8.tar.gz' mv: rename mongo-c-driver-0.8 to mongo-c-driver: No such file or directory ./autogen.sh: line 68: cd: json-c: No such file or directory sh: ./autogen.sh: No such file or directory ./autogen.sh: line 70: ./configure: No such file or directory make: *** No rule to make target 'install'. Stop. cp: Makefile.legacy: No such file or directory Done

What should I do ?

owbp commented 4 years ago

wget: command not found

I know this issue is over two years but it looks like you're maybe on os x and don't have wget. You can install it with brew if you use it: $ brew install wget That should get you past that issue.

vaibhavdalvi93 commented 2 years ago

Hi @jessicachen888,

Are you still facing this issue? Can you please re-verify? If it's been resolved, could you please close this ticket?