Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to build librdkafka 2.5 in the latest node-rdkafka 3.1.0 #1087

Open
pveller opened this issue Jul 17, 2024 · 9 comments
Open

Fails to build librdkafka 2.5 in the latest node-rdkafka 3.1.0 #1087

pveller opened this issue Jul 17, 2024 · 9 comments

Comments

@pveller
Copy link

pveller commented Jul 17, 2024

Environment Information

  • OS [e.g. Mac, Arch, Windows 10]: Mac OS Sonoma 14.5
  • Node Version [e.g. 8.2.1]: 18.19.0
  • NPM Version [e.g. 5.4.2]: 10.2.3
  • C++ Toolchain [e.g. Visual Studio, llvm, g++]: x-code

More specifically:

checking for C compiler from CC env... failed
checking for gcc (by command)... ok
checking for C++ compiler from CXX env... failed
checking for C++ compiler (g++)... ok

  • node-rdkafka version [e.g. 2.3.3]: 3.1.0

Steps to Reproduce

I get the following:

npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! In file included from rdkafka.c:43:
npm ERR! In file included from ./rdkafka_int.h:110:
npm ERR! ./rdkafka_op.h:696:25: error: unknown type name 'rd_kafka_broker_t'
npm ERR!                         rd_kafka_broker_t *rkb;
npm ERR!                         ^
npm ERR! 1 error generated.

3.0.1 installs just fine so I believe it has to do with the latest librdkafka update

@GaryWilber
Copy link
Collaborator

Is that only happening on Mac? I tried updating the test runner to macos 14 in #1088 but the build & test passed.
I don't have a local mac to test with so someone else may need to investigate this.

@juanreynolds
Copy link

Same error here on Ubuntu 22.04, node 20.14.0, node-gyp 10.2.0

rdkafka_op.h:696:25: error: unknown type name ‘rd_kafka_broker_t’

@MarcAurel
Copy link

MarcAurel commented Jul 23, 2024

Looks like the error comes directly from librdkafka (I opened an issue).

@MarcAurel
Copy link

MarcAurel commented Jul 23, 2024

librdkafka maintainer confirmed v2.5.0 isn't working without OpenSSL configured, and apparently they can't release a fix now (confluentinc/librdkafka#4793 (comment))

@GaryWilber you could maybe revert librdkafka to v2.4.0 as a temporary fix, WDYT? Otherwise, what would be the other options?

@enzo-cappa
Copy link

Hello!

Looks like the fix on librdkafka was merged (confluentinc/librdkafka@d72576a). Probably using the version 2.5.0-2 would fix the compilation problems.

@volodymyrwalkme
Copy link

Hello! Any updates on this issue? I encounter this as well.

@ricochenft
Copy link

ricochenft commented Sep 26, 2024

I use this method to install without a problem:

brew install openssl
CPPFLAGS="-I/usr/local/opt/openssl/include" LDFLAGS="-L/usr/local/opt/openssl/lib" npm i node-rdkafka

Mac OSX 14.6.1
node: 20.11.0
node-rdkafka: 3.1.1

@volodymyrwalkme
Copy link

this is not working on my Mac :(

I use this method to install without a problem:

brew install openssl
CPPFLAGS="-I/usr/local/opt/openssl/include" LDFLAGS="-L/usr/local/opt/openssl/lib" npm i node-rdkafka

Mac OSX 14.6.1 node: 20.11.0 node-rdkafka: 3.1.1

this is not working on my Mac, the same error :(

@kevcodez
Copy link

kevcodez commented Oct 5, 2024

@ricochenft what's your openssl version?

Also cannot seem to install dependencies, node-rdkafka 3.1.1 / Node 20.18 / OSX 15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants