BUILD_LIBRDKAFKA flag doesn't work
See original GitHub issueEnvironment Information
- OS [e.g. Mac, Arch, Windows 10]: Debian
- Node Version [e.g. 8.2.1]: 8/11/12
- NPM Version [e.g. 5.4.2]: *
- C++ Toolchain [e.g. Visual Studio, llvm, g++]: see below
- node-rdkafka version [e.g. 2.3.3]: v2.7.0
Steps to Reproduce
- Build docker:
docker build -t test-native-librdkafka .
FROM node:11.5
ENV LIBRDKAFKA_VERSION=0.11.6
ENV LIBRDKAFKA_HOME=/usr/local
ENV BUILD_LIBRDKAFKA=0
ARG BUILD_LIBRDKAFKA=0
WORKDIR /usr/src/app
COPY . /usr/src/app/
RUN set -ex; \
apt-get -y update; \
apt-get purge -y libssl-dev; \
apt-get install -y --no-install-recommends \
ca-certificates \
git \
build-essential \
python \
libsasl2-dev \
libssl-dev \
openssl \
libc-bin \
libc6 \
libstdc++6; \
apt-get clean; \
rm -rf /var/lib/apt/lists/*; \
\
mkdir -p ${LIBRDKAFKA_HOME}; \
curl -s -Lk -o ${LIBRDKAFKA_HOME}/librdkafka-${LIBRDKAFKA_VERSION}.tar.gz https://github.com/edenhill/librdkafka/archive/v${LIBRDKAFKA_VERSION}.tar.gz; \
tar -xzf ${LIBRDKAFKA_HOME}/librdkafka-${LIBRDKAFKA_VERSION}.tar.gz -C ${LIBRDKAFKA_HOME}; \
mv ${LIBRDKAFKA_HOME}/librdkafka-${LIBRDKAFKA_VERSION} ${LIBRDKAFKA_HOME}/librdkafka; \
ls -la ${LIBRDKAFKA_HOME}/librdkafka/; \
cd ${LIBRDKAFKA_HOME}/librdkafka; \
./configure --prefix=${LIBRDKAFKA_HOME}/librdkafka; \
make; \
make install; \
ldconfig; \
make clean; \
./configure --clean; \
ls -la
RUN set -ex; \
yarn install; \
yarn run compile; \
rm -rf ./node_modules; \
yarn install --prod; \
yarn cache clean
ENV NODE_ENV=production
CMD [ "yarn", "start" ]
node-rdkafka Configuration Settings [none]
Actual behavior The node-rdkafka installation rebuilds librdkafka deps every time.
Expected behavior The node-rdkafka uses native installation.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:5
Top Results From Across the Web
edenhill/librdkafka - Gitter
Hi! We use Kafka with PHP via the php-rdkafka, which is a librdkafka wrapper for PHP. Everything works fine, except for we intermittently...
Read more >librdkafka: src/rdkafka.h File Reference
When this flag is set the application may retry the operation immediately or preferably after a shorter grace ... Run librdkafka's built-in unit-tests....
Read more >hw-kafka-client: Kafka bindings for Haskell - Hackage
Apache Kafka bindings backed by the librdkafka C library. Features include: ... To run an example please compile with the examples flag.
Read more >T137379 Replace kafka-node with more mature bindings ...
I spent an hour hacking with node-kafka-native once, and it successfully builds against later librdkafka versions. It will need modifications to make it...
Read more >vmagent - VictoriaMetrics
vmagent doesn't support the following sections in Prometheus config file passed to -promscrape.config command-line flag: remote_write. This section is ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have the same issue.
My configuration is:
librdkafka-dev@1.1.0-r0 https://pkgs.alpinelinux.org/packages?name=librdkafka-dev&branch=edge
node-rdkafka@2.7.1-2
And error log is:
Are there any ideas how to fix it?
@MidnightP I’ve found a solution to cache node-rdkafka library as a standalone docker image.