it's not possible to link to it with OPENSSL_STATIC=1 (or otherwise, really), as it requires symbols from libz:
= note: /src/colorbot/target/x86_64-unknown-linux-musl/release/deps/libopenssl_sys-88869ce7700cbe4c.rlib(c_zlib.o): In function `zlib_stateful_expand_block':
c_zlib.c:(.text+0x59): undefined reference to `inflate'
/src/colorbot/target/x86_64-unknown-linux-musl/release/deps/libopenssl_sys-88869ce7700cbe4c.rlib(c_zlib.o): In function `zlib_stateful_compress_block':
c_zlib.c:(.text+0xea): undefined reference to `deflate'
/src/colorbot/target/x86_64-unknown-linux-musl/release/deps/libopenssl_sys-88869ce7700cbe4c.rlib(c_zlib.o): In function `bio_zlib_free':
c_zlib.c:(.text+0x13e): undefined reference to `inflateEnd'
c_zlib.c:(.text+0x15d): undefined reference to `deflateEnd'
/src/colorbot/target/x86_64-unknown-linux-musl/release/deps/libopenssl_sys-88869ce7700cbe4c.rlib(c_zlib.o): In function `zlib_stateful_finish':
c_zlib.c:(.text+0x1d0): undefined reference to `inflateEnd'
c_zlib.c:(.text+0x1d9): undefined reference to `deflateEnd'
/src/colorbot/target/x86_64-unknown-linux-musl/release/deps/libopenssl_sys-88869ce7700cbe4c.rlib(c_zlib.o): In function `zlib_stateful_init':
c_zlib.c:(.text+0x268): undefined reference to `inflateInit_'
c_zlib.c:(.text+0x2d9): undefined reference to `deflateInit_'
/src/colorbot/target/x86_64-unknown-linux-musl/release/deps/libopenssl_sys-88869ce7700cbe4c.rlib(c_zlib.o): In function `bio_zlib_ctrl':
c_zlib.c:(.text+0x54c): undefined reference to `deflate'
c_zlib.c:(.text+0x5f8): undefined reference to `zError'
/src/colorbot/target/x86_64-unknown-linux-musl/release/deps/libopenssl_sys-88869ce7700cbe4c.rlib(c_zlib.o): In function `bio_zlib_write':
c_zlib.c:(.text+0x819): undefined reference to `deflate'
c_zlib.c:(.text+0x8da): undefined reference to `zError'
c_zlib.c:(.text+0x93d): undefined reference to `deflateInit_'
/src/colorbot/target/x86_64-unknown-linux-musl/release/deps/libopenssl_sys-88869ce7700cbe4c.rlib(c_zlib.o): In function `bio_zlib_read':
c_zlib.c:(.text+0xa0f): undefined reference to `inflate'
c_zlib.c:(.text+0xa7a): undefined reference to `zError'
c_zlib.c:(.text+0xaed): undefined reference to `inflateInit_'
collect2: error: ld returned 1 exit status
I guess another env flag is needed to link to libz.
Given openssl that is configured as:
it's not possible to link to it with
OPENSSL_STATIC=1
(or otherwise, really), as it requires symbols from libz:I guess another env flag is needed to link to libz.