EnterpriseDB / mongo_fdw

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

Dont work make on Ubuntu 16 #98

Open dtilyupo opened 6 years ago

dtilyupo commented 6 years ago

Hi. I try to install mongo_fdw. I have next errors after steps: git clone https://github.com/EnterpriseDB/mongo_fdw.git --recursive cd mongo_fdw/ sudo ./autogen.sh --with-legacy sudo make [...] src/env.c: In function ‘mongo_env_socket_connect’: src/env.c:318:21: error: storage size of ‘ai_hints’ isn’t known struct addrinfo ai_hints; ^ src/env.c:339:14: warning: implicit declaration of function ‘getaddrinfo’ [-Wimplicit-function-declaration] status = getaddrinfo( host, port_str, &ai_hints, &ai_list ); ^ src/env.c:341:51: warning: implicit declaration of function ‘gai_strerror’ [-Wimplicit-function-declaration] bson_errprintf( "getaddrinfo failed: %s", gai_strerror( status ) ); ^ src/env.c:346:60: error: dereferencing pointer to incomplete type ‘struct addrinfo’ for ( ai_ptr = ai_list; ai_ptr != NULL; ai_ptr = ai_ptr->ai_next ) { ^ src/env.c:379:5: warning: implicit declaration of function ‘freeaddrinfo’ [-Wimplicit-function-declaration] freeaddrinfo( ai_list ); ^ src/env.c:318:21: warning: unused variable ‘ai_hints’ [-Wunused-variable] struct addrinfo ai_hints; ^ Makefile:216: recipe for target 'src/env.os' failed make[1]: [src/env.os] Error 1 make[1]: Leaving directory '/home/tilyupo/test/mongo_fdw/mongo-c-driver' Makefile:33: recipe for target 'mongo-c-driver/src/env.os' failed make: [mongo-c-driver/src/env.os] Error 2 Can someone help me?

nonchalant-enthusiast commented 6 years ago

reporting the same issue

martinhv commented 6 years ago

same here with ubuntu 16.04.4

stephaneDunand commented 5 years ago

replace D_POSIX_SOURCE by D_GNU_SOURCE in mongo-c-driver/Makefile

omkz commented 3 years ago

@stephaneDunand Thank you. It also works on ubuntu 20.04

vaibhavdalvi93 commented 2 years ago

Hi @omkz, @martinhv and @dtilyupo,

Can you please confirm that reported issue is been resolved or not on latest HEAD? If it's been resolved then could you please close this ticket?