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

v1.5 fails to build on Alpine (--enable-ssl=libressl)

      # MONGO_C_VERSION="1.5.0"
      # MONGO_C_FILENAME="mongo-c-driver-${MONGO_C_VERSION}"
      # MONGO_C_SOURCE="https://github.com/mongodb/mongo-c-driver/releases/download/${MONGO_C_VERSION}/${MONGO_C_FILENAME}.tar.gz"
      # curl -fSL --connect-timeout 30 ${MONGO_C_SOURCE} | tar xz -C /tmp
      # cd /tmp/mongo-c-driver-${MONGO_C_VERSION}
      
      # ./configure --disable-automatic-init-and-cleanup --enable-ssl=libressl
      # make
      
        CC       src/mongoc/libmongoc_1_0_la-mongoc-libressl.lo
      src/mongoc/mongoc-libressl.c: In function 'mongoc_libressl_setup_certificate':
      src/mongoc/mongoc-libressl.c:48:52: warning: passing argument 3 of 'tls_load_file' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
          file = tls_load_file (opt->pem_file, &file_len, opt->pem_pwd);
                                                          ^~~
      In file included from src/mongoc/mongoc-stream-tls-libressl-private.h:27:0,
                       from src/mongoc/mongoc-libressl-private.h:27,
                       from src/mongoc/mongoc-libressl.c:28:
      /usr/include/tls.h:122:10: note: expected 'char *' but argument is of type 'const char *'
       uint8_t *tls_load_file(const char *_file, size_t *_len, char *_password);
                ^~~~~~~~~~~~~
        CC       src/mongoc/libmongoc_1_0_la-mongoc-stream-tls-libressl.lo
      src/mongoc/mongoc-stream-tls-libressl.c: In function 'mongoc_stream_tls_libressl_new':
      src/mongoc/mongoc-stream-tls-libressl.c:504:12: error: 'mongoc_stream_tls_libressl_t {aka struct <anonymous>}' has no member named 'n'
          libressl->n = streams++;
                  ^~
      src/mongoc/mongoc-stream-tls-libressl.c:504:18: error: 'streams' undeclared (first use in this function)
          libressl->n = streams++;
                        ^~~~~~~
      src/mongoc/mongoc-stream-tls-libressl.c:504:18: note: each undeclared identifier is reported only once for each function it appears in
      make[1]: *** [Makefile:3595: src/mongoc/libmongoc_1_0_la-mongoc-stream-tls-libressl.lo] Error 1
      make[1]: Leaving directory '/tmp/mongo-c-driver'
      make: *** [Makefile:5677: all-recursive] Error 1
      
          CC       src/mongoc/libmongoc_1_0_la-mongoc-stream-tls-libressl.lo
      src/mongoc/mongoc-stream-tls-libressl.c: In function 'mongoc_stream_tls_libressl_new':
      src/mongoc/mongoc-stream-tls-libressl.c:504:12: error: 'mongoc_stream_tls_libressl_t {aka struct <anonymous>}' has no member named 'n'
          libressl->n = streams++;
                  ^~
      src/mongoc/mongoc-stream-tls-libressl.c:504:18: error: 'streams' undeclared (first use in this function)
          libressl->n = streams++;
                        ^~~~~~~
      src/mongoc/mongoc-stream-tls-libressl.c:504:18: note: each undeclared identifier is reported only once for each function it appears in
      make[1]: *** [Makefile:3595: src/mongoc/libmongoc_1_0_la-mongoc-stream-tls-libressl.lo] Error 1
      make[1]: Leaving directory '/tmp/mongo-c-driver'
      make: *** [Makefile:5677: all-recursive] Error 1
      

            Assignee:
            bjori Hannes Magnusson
            Reporter:
            AlexMasterov Alex Masterov [X]
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: