[CDRIVER-1941] v1.5 fails to build on Alpine (--enable-ssl=libressl) Created: 03/Dec/16  Updated: 12/Jan/17  Resolved: 07/Dec/16

Status: Closed
Project: C Driver
Component/s: bsd, libmongoc, tls
Affects Version/s: 1.5.0
Fix Version/s: 1.5.1

Type: Bug Priority: Major - P3
Reporter: Alex Masterov [X] Assignee: Hannes Magnusson
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Alpine Linux Docker image: alpine:edge

  1. cat /etc/alpine-release (-> 3.4.0)

gcc 6.2.1-r1
https://pkgs.alpinelinux.org/package/edge/main/x86_64/gcc

libressl 2.4.4-r0
https://pkgs.alpinelinux.org/package/edge/main/x86_64/libressl

libressl-dev 2.4.4-r0
https://pkgs.alpinelinux.org/package/edge/main/x86_64/libressl-dev


Attachments: Text File build.log    

 Description   

# 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



 Comments   
Comment by Hannes Magnusson [ 08/Dec/16 ]

Awesome Thanks for confirming

We hope to release 1.5.1 with this fix and maybe couple of other ones very soon

Comment by Alex Masterov [X] [ 08/Dec/16 ]

Works fine. Thanks!

Comment by Githook User [ 07/Dec/16 ]

Author:

{u'username': u'bjori', u'name': u'Hannes Magnusson', u'email': u'bjori@php.net'}

Message: CDRIVER-1941 Fix libressl build
Branch: r1.5
https://github.com/mongodb/mongo-c-driver/commit/6d6f83e3358cbb84b9b7fc2404eea4b925b7b719

Comment by Githook User [ 07/Dec/16 ]

Author:

{u'username': u'bjori', u'name': u'Hannes Magnusson', u'email': u'bjori@php.net'}

Message: CDRIVER-1941 Fix libressl build
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/1f6fd43b13ddd8b9631d547fd362e35a11baa7d5

Comment by Hannes Magnusson [ 05/Dec/16 ]

I've no idea how that line got there. It should be removed.

Comment by A. Jesse Jiryu Davis [ 03/Dec/16 ]

Thanks for the report, apologies. We'll get this fixed promptly.

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