Blizzard / Blizzard/node-rdkafka
Fails to build librdkafka 2.5 in the latest node-rdkafka 3.1.0
- Dominant language
- JavaScript
- Stars
- 2.2k
- Forks
- 403
- PR merge metrics
- No merged PRs in 30d
Description
**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**
* `npm install node-rdkafka@3.1.0`
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
Contributor guide
Research direction
Reproduce the failure with `npm install node-rdkafka@3.1.0` on the reported environment, then compare it with the working 3.0.1 install. Start with the compiler error in `rdkafka.c`, `rdkafka_int.h`, and `rdkafka_op.h` around line 696; done means version 3.1.0 builds successfully while retaining the reported librdkafka compatibility.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, javascript, kafka, nodejs
- Domain
- backend, build-system, distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100