Skip to content

[Bug]: librdkafka is not buildable with openssl on #4410

Open
@auzhva

Description

@auzhva

What happened?

When openssl is on, which is default, it doesn't build with errors:

external/librdkafka+/src/rdkafka_ssl.c:1533:21: error: call to undeclared function 'SSL_CTX_use_cert_and_key'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
                r = SSL_CTX_use_cert_and_key(ctx, cert, pkey, ca, 1);
                    ^
external/librdkafka+/src/rdkafka_ssl.c:1533:21: note: did you mean 'SSL_CTX_set_chain_and_key'?
external/boringssl+/include/openssl/ssl.h:1288:20: note: 'SSL_CTX_set_chain_and_key' declared here
OPENSSL_EXPORT int SSL_CTX_set_chain_and_key(
                   ^
external/librdkafka+/src/rdkafka_ssl.c:1816:45: warning: format specifies type 'unsigned long' but the argument has type 'int' [-Wformat]
                     OpenSSL_version_num(), OPENSSL_VERSION_NUMBER);
                                            ^~~~~~~~~~~~~~~~~~~~~~
external/boringssl+/include/openssl/base.h:101:32: note: expanded from macro 'OPENSSL_VERSION_NUMBER'
#define OPENSSL_VERSION_NUMBER 0x1010107f
                               ^~~~~~~~~~
external/librdkafka+/src/rdkafka_int.h:1006:66: note: expanded from macro 'rd_kafka_dbg'
                                      (RD_KAFKA_DBG_##ctx), fac, __VA_ARGS__); \
                                                                 ^~~~~~~~~~~
external/librdkafka+/src/rdkafka_ssl.c:2063:14: error: call to undeclared function 'HMAC'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
        if (!HMAC(evp, (const unsigned char *)in->ptr, (int)in->size, saltplus,

Version

Development (host) and target OS/architectures:

Output of bazel --version:
bazel 8.0.1

Version of relevant rules from the WORKSPACE or MODULE.bazel file:
bazel_dep(name = "librdkafka", version = "2.8.0.bcr.2")

Language(s) and/or frameworks involved:

How to reproduce

Any other information?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions