Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-2674

Errors on mongo-c-driver-0.8 on make

    • Type: Icon: Bug Bug
    • Resolution: Won't Fix
    • Priority: Icon: Blocker - P1 Blocker - P1
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      Ubuntu 16.04 Debian

      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

            Assignee:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Reporter:
            devang1 Ankit
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: