Blizzard / Blizzard/node-rdkafka

Cannot find ZSTD library on Mac M1 machine

Open
#1,062 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
2.2k
Forks
403
PR merge metrics
No merged PRs in 30d

Description

**Environment Information**
- OS [Mac 13.6.2]:
- Node Version [18.19.0]:
- NPM Version [10.2.3]:
- C++ Toolchain [e.g. Visual Studio, llvm, g++]:
- node-rdkafka version [2.13.0]:

**Steps to Reproduce**
Initialize Kafka producer using zstd codec
```
const producer = new Producer({
'compression.codec': 'zstd',
...
});
```
Running the Node js application, and got the following error
```
[server] ERROR 2023-12-07T05:02:58.908Z [src/index.ts] App has failed to startError: Unsupported value "zstd" for configuration property "compression.codec": libzstd not available at build time
[server] Error: Unsupported value "zstd" for configuration property "compression.codec": libzstd not available at build time
```

**node-rdkafka Configuration Settings**
No customization

**Additional context**
- ZSTD installed on my machine using homebrew, and zstd library and include can be found at `/opt/homebrew/lib` and `/opt/homebrew/include`, respectively
- I tried to rebuild RD kafka using `npm rebuild node-rdkafka`, but it does not help

Contributor guide

Open the contributing guide

Research direction

Start with the node-rdkafka native build path and the npm rebuild command described in the issue, then trace how the librdkafka build detects the Homebrew zstd library and include paths on Mac M1. Reproduce the producer initialization with compression.codec set to zstd and confirm that the rebuilt package reports zstd as available.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, kafka, node.js
Domain
backend, build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.