[CDRIVER-2674] Errors on mongo-c-driver-0.8 on make Created: 30/May/18  Updated: 30/May/18  Resolved: 30/May/18

Status: Closed
Project: C Driver
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Blocker - P1
Reporter: Ankit Assignee: A. Jesse Jiryu Davis
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Ubuntu 16.04 Debian



 Description   

We require to have driver version 0.8 in our projects but while installing it there are errors coming in env.c file as below. Please let me know how can we fix this?

cc -o src/env.os -c -std=c99 -pedantic -O3 -Wall -ggdb -D_POSIX_SOURCE -DMONGO_HAVE_STDINT -fPIC -DMONGO_DLL_BUILD src/env.c
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: *** [src/env.os] Error 1



 Comments   
Comment by A. Jesse Jiryu Davis [ 30/May/18 ]

Hi, version 0.8 hasn't been supported for several years. Please upgrade to the latest MongoDB C Driver which is version 1.10.0. The latest driver requires CMake to build, please see the installation instructions here:

http://mongoc.org/

Generated at Wed Feb 07 21:15:59 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.