Skip to content

Facing issue with node-rdkafka in node 24 #1142

Description

@Shivam84058

Environment Information

  • OS [e.g. Mac]:
  • Node Version [24.12.0]:
  • NPM Version [11.6.2]:
  • C++ Toolchain [g++]:
  • node-rdkafka version [3.6.1]:

Steps to Reproduce

node-rdkafka Configuration Settings
Additional context

Hi Team,
I am encountering an issue while installing Node.js dependencies,
Could you please help with this issue?

Activity

  1. Shivam84058 commented on Jan 8, 2026

    @Shivam84058
    Author
    16:17:07  npm error path /home/jenkins/agent/workspace/R-Pipelines_BSS_hypersync_PR-541@2/hypersync/node_modules/node-rdkafka
    16:17:07  npm error command failed
    16:17:07  npm error command sh -c node-gyp rebuild
    16:17:07  npm error make[2]: Entering directory '/home/jenkins/agent/workspace/R-Pipelines_BSS_hypersync_PR-541@2/hypersync/node_modules/node-rdkafka/build'
    16:17:07  npm error   ACTION deps_librdkafka_gyp_librdkafka_target_configure deps/librdkafka/config.h
    16:17:07  npm error checking for OS or distribution... �[32mok^[(B�[m (ubuntu)
    16:17:07  npm error checking for C compiler from CC env... �[33mfailed^[(B�[m
    16:17:07  npm error checking for gcc (by command)... �[32mok^[(B�[m
    16:17:07  npm error checking for C++ compiler from CXX env... �[33mfailed^[(B�[m
    16:17:07  npm error checking for C++ compiler (g++)... �[32mok^[(B�[m
    16:17:07  npm error checking executable ld... �[32mok^[(B�[m
    16:17:07  npm error checking executable nm... �[32mok^[(B�[m
    16:17:07  npm error checking executable objdump... �[32mok^[(B�[m
    16:17:07  npm error checking executable strip... �[32mok^[(B�[m
    16:17:07  npm error checking executable libtool... �[33mfailed^[(B�[m (disable)
    16:17:07  npm error checking executable ranlib... �[32mok^[(B�[m
    16:17:07  npm error checking for pkgconfig (by command)... �[32mok^[(B�[m
    16:17:07  npm error checking for install (by command)... �[32mok^[(B�[m
    16:17:07  npm error checking for GNU ar... �[32mok^[(B�[m
    16:17:07  npm error checking for PIC (by compile)... �[32mok^[(B�[m
    16:17:07  npm error checking for GNU-compatible linker options... �[32mok^[(B�[m
    16:17:07  npm error checking for GNU linker-script ld flag... �[32mok^[(B�[m
    16:17:07  npm error checking for __atomic_32 (by compile)... �[32mok^[(B�[m
    16:17:07  npm error checking for __atomic_64 (by compile)... �[32mok^[(B�[m
    16:17:07  npm error checking for socket (by compile)... �[32mok^[(B�[m
    16:17:07  npm error parsing version '0x020c00ff'... �[32mok^[(B�[m (2.12.0)
    16:17:07  npm error checking for librt (by pkg-config)... �[33mfailed^[(B�[m
    16:17:07  npm error checking for librt (by compile)... �[32mok^[(B�[m
    16:17:07  npm error checking for libpthread (by pkg-config)... �[33mfailed^[(B�[m
    16:17:07  npm error checking for libpthread (by compile)... �[32mok^[(B�[m
    16:17:07  npm error checking for c11threads (by pkg-config)... �[33mfailed^[(B�[m
    16:17:07  npm error checking for c11threads (by compile)... �[32mok^[(B�[m
    16:17:07  npm error checking for libdl (by pkg-config)... �[33mfailed^[(B�[m
    16:17:07  npm error checking for libdl (by compile)... �[32mok^[(B�[m
    16:17:07  npm error checking for zlib (by pkg-config)... �[32mok^[(B�[m
    16:17:07  npm error checking for libcrypto (by pkg-config)... �[32mok^[(B�[m
    16:17:07  npm error checking for libssl (by pkg-config)... �[32mok^[(B�[m
    16:17:07  npm error checking for libsasl2 (by pkg-config)... �[33mfailed^[(B�[m
    16:17:07  npm error checking for libsasl2 (by compile)... �[33mfailed^[(B�[m (disable)
    16:17:07  npm error checking for libsasl (by pkg-config)... �[33mfailed^[(B�[m
    16:17:07  npm error checking for libsasl (by compile)... �[33mfailed^[(B�[m (disable)
    16:17:07  npm error checking for libzstd (by pkg-config)... �[33mfailed^[(B�[m
    16:17:07  npm error checking for libzstd (by compile)... �[33mfailed^[(B�[m (disable)
    16:17:07  npm error checking for libcurl (by pkg-config)... �[32mok^[(B�[m
    16:17:07  npm error checking for libm (by pkg-config)... �[33mfailed^[(B�[m
    16:17:07  npm error checking for libm (by compile)... �[32mok^[(B�[m
    16:17:07  npm error checking for liblz4 (by pkg-config)... �[33mfailed^[(B�[m
    16:17:07  npm error checking for liblz4 (by compile)... �[33mfailed^[(B�[m (disable)
    16:17:07  npm error checking for syslog (by compile)... �[32mok^[(B�[m
    16:17:07  npm error checking for rapidjson (by compile)... �[33mfailed^[(B�[m (disable)
    16:17:07  npm error checking for crc32chw (by compile)... �[32mok^[(B�[m
    16:17:07  npm error checking for regex (by compile)... �[32mok^[(B�[m
    16:17:07  npm error checking for rand_r (by compile)... �[32mok^[(B�[m
    16:17:07  npm error checking for strndup (by compile)... �[32mok^[(B�[m
    16:17:07  npm error checking for strlcpy (by compile)... �[33mfailed^[(B�[m (disable)
    16:17:07  npm error checking for strerror_r (by compile)... �[32mok^[(B�[m
    16:17:07  npm error checking for strcasestr (by compile)... �[32mok^[(B�[m
    16:17:07  npm error checking for pthread_setname_gnu (by compile)... �[32mok^[(B�[m
    16:17:07  npm error checking for nm (by env NM)... �[32mok^[(B�[m (cached)
    16:17:07  npm error checking for python3 (by command)... �[32mok^[(B�[m
    16:17:07  npm error checking for getrusage (by compile)... �[32mok^[(B�[m
    16:17:07  npm error Generated Makefile.config
    16:17:07  npm error Generated config.h
    16:17:07  npm error
    16:17:07  npm error Configuration summary:
    16:17:07  npm error   prefix                   /home/jenkins/agent/workspace/R-Pipelines_BSS_hypersync_PR-541@2/hypersync/node_modules/node-rdkafka/build/deps
    16:17:07  npm error   MKL_DISTRO               ubuntu
    16:17:07  npm error   SOLIB_EXT                .so
    16:17:07  npm error   ARCH                     x86_64
    16:17:07  npm error   CPU                      generic
    16:17:07  npm error   GEN_PKG_CONFIG           y
    16:17:07  npm error   libdir                   /home/jenkins/agent/workspace/R-Pipelines_BSS_hypersync_PR-541@2/hypersync/node_modules/node-rdkafka/build/deps
    16:17:07  npm error   MKL_APP_NAME             librdkafka
    16:17:07  npm error   MKL_APP_DESC_ONELINE     The Apache Kafka C/C++ library
    16:17:07  npm error   LDFLAGS                  -L/home/jenkins/agent/workspace/R-Pipelines_BSS_hypersync_PR-541@2/hypersync/node_modules/node-rdkafka/build/deps
    16:17:07  npm error   CC                       gcc
    16:17:07  npm error   CXX                      g++
    16:17:07  npm error   LD                       ld
    16:17:07  npm error   NM                       nm
    16:17:07  npm error   OBJDUMP                  objdump
    16:17:07  npm error   STRIP                    strip
    16:17:07  npm error   RANLIB                   ranlib
    16:17:07  npm error   CPPFLAGS                 -g -O2 -fPIC -Wall -Wsign-compare -Wfloat-equal -Wpointer-arith -Wcast-align
    16:17:07  npm error   PKG_CONFIG               pkg-config
    16:17:07  npm error   INSTALL                  /usr/bin/install
    16:17:07  npm error   HAS_GNU_AR               y
    16:17:07  npm error   LIB_LDFLAGS              -shared -Wl,-soname,$(LIBFILENAME)
    16:17:07  npm error   LDFLAG_LINKERSCRIPT      -Wl,--version-script=
    16:17:07  npm error   RDKAFKA_VERSION_STR      2.12.0
    16:17:07  npm error   MKL_APP_VERSION          2.12.0
    16:17:07  npm error   LIBS                     -lm -lcurl -lssl -lcrypto -lz -ldl -lpthread -lrt -lpthread -lrt
    16:17:07  npm error   MKL_PKGCONFIG_LIBS_PRIVATE -lm -ldl -lpthread -lrt -lpthread -lrt
    16:17:07  npm error   MKL_PKGCONFIG_REQUIRES_PRIVATE zlib libcrypto libssl libcurl
    16:17:07  npm error   CFLAGS                   -I/usr/include/x86_64-linux-gnu
    16:17:07  npm error   MKL_PKGCONFIG_REQUIRES   zlib libcrypto libssl libcurl
    16:17:07  npm error   CXXFLAGS                 -Wno-non-virtual-dtor
    16:17:07  npm error   SYMDUMPER                $(NM) -D
    16:17:07  npm error   MKL_DYNAMIC_LIBS         -lm -lcurl -lssl -lcrypto -lz -ldl -lpthread -lrt -lpthread -lrt
    16:17:07  npm error   exec_prefix              /home/jenkins/agent/workspace/R-Pipelines_BSS_hypersync_PR-541@2/hypersync/node_modules/node-rdkafka/build/deps
    16:17:07  npm error   bindir                   /home/jenkins/agent/workspace/R-Pipelines_BSS_hypersync_PR-541@2/hypersync/node_modules/node-rdkafka/build/deps/bin
    16:17:07  npm error   sbindir                  /home/jenkins/agent/workspace/R-Pipelines_BSS_hypersync_PR-541@2/hypersync/node_modules/node-rdkafka/build/deps/sbin
    16:17:07  npm error   libexecdir               /home/jenkins/agent/workspace/R-Pipelines_BSS_hypersync_PR-541@2/hypersync/node_modules/node-rdkafka/build/deps/libexec
    16:17:07  npm error   datadir                  /home/jenkins/agent/workspace/R-Pipelines_BSS_hypersync_PR-541@2/hypersync/node_modules/node-rdkafka/build/deps/share
    16:17:07  npm error   sysconfdir               /home/jenkins/agent/workspace/R-Pipelines_BSS_hypersync_PR-541@2/hypersync/node_modules/node-rdkafka/build/deps/etc
    16:17:07  npm error   sharedstatedir           /home/jenkins/agent/workspace/R-Pipelines_BSS_hypersync_PR-541@2/hypersync/node_modules/node-rdkafka/build/deps/com
    16:17:07  npm error   localstatedir            /home/jenkins/agent/workspace/R-Pipelines_BSS_hypersync_PR-541@2/hypersync/node_modules/node-rdkafka/build/deps/var
    16:17:07  npm error   runstatedir              /home/jenkins/agent/workspace/R-Pipelines_BSS_hypersync_PR-541@2/hypersync/node_modules/node-rdkafka/build/deps/var/run
    16:17:07  npm error   includedir               /home/jenkins/agent/workspace/R-Pipelines_BSS_hypersync_PR-541@2/hypersync/node_modules/node-rdkafka/build/deps/include
    16:17:07  npm error   infodir                  /home/jenkins/agent/workspace/R-Pipelines_BSS_hypersync_PR-541@2/hypersync/node_modules/node-rdkafka/build/deps/info
    16:17:07  npm error   mandir                   /home/jenkins/agent/workspace/R-Pipelines_BSS_hypersync_PR-541@2/hypersync/node_modules/node-rdkafka/build/deps/man
    16:17:07  npm error   BUILT_WITH               GCC GXX PKGCONFIG INSTALL GNULD LDS C11THREADS LIBDL PLUGINS ZLIB SSL CURL HDRHISTOGRAM SYSLOG SNAPPY SOCKEM SASL_SCRAM SASL_OAUTHBEARER OAUTHBEARER_OIDC CRC32C_HW
    16:17:07  npm erro
    
  2. Shivam84058 commented on Jan 8, 2026

    @Shivam84058
    Author
    11:52:39  npm error gyp info it worked if it ends with ok
    11:52:39  npm error gyp info using node-gyp@11.4.2
    11:52:39  npm error gyp info using node@24.12.0 | linux | x64
    11:52:39  npm error gyp info find Python using Python version 3.8.10 found at "/usr/bin/python3"
    11:52:39  npm error gyp http GET https://nodejs.org/download/release/v24.12.0/node-v24.12.0-headers.tar.gz
    11:52:39  npm error gyp http 200 https://nodejs.org/download/release/v24.12.0/node-v24.12.0-headers.tar.gz
    11:52:39  npm error gyp http GET https://nodejs.org/download/release/v24.12.0/SHASUMS256.txt
    11:52:39  npm error gyp http 200 https://nodejs.org/download/release/v24.12.0/SHASUMS256.txt
    11:52:39  npm error gyp info spawn /usr/bin/python3
    11:52:39  npm error gyp info spawn args [
    11:52:39  npm error gyp info spawn args '/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
    11:52:39  npm error gyp info spawn args 'binding.gyp',
    11:52:39  npm error gyp info spawn args '-f',
    11:52:39  npm error gyp info spawn args 'make',
    11:52:39  npm error gyp info spawn args '-I',
    11:52:39  npm error gyp info spawn args '/home/jenkins/agent/workspace/R-Pipelines_BSS_hypersync_PR-541@2/hypersync/node_modules/node-rdkafka/build/config.gypi',
    11:52:39  npm error gyp info spawn args '-I',
    11:52:39  npm error gyp info spawn args '/usr/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
    11:52:39  npm error gyp info spawn args '-I',
    11:52:39  npm error gyp info spawn args '/home/jenkins/.cache/node-gyp/24.12.0/include/node/common.gypi',
    11:52:39  npm error gyp info spawn args '-Dlibrary=shared_library',
    11:52:39  npm error gyp info spawn args '-Dvisibility=default',
    11:52:39  npm error gyp info spawn args '-Dnode_root_dir=/home/jenkins/.cache/node-gyp/24.12.0',
    11:52:39  npm error gyp info spawn args '-Dnode_gyp_dir=/usr/lib/node_modules/npm/node_modules/node-gyp',
    11:52:39  npm error gyp info spawn args '-Dnode_lib_file=/home/jenkins/.cache/node-gyp/24.12.0/<(target_arch)/node.lib',
    11:52:39  npm error gyp info spawn args '-Dmodule_root_dir=/home/jenkins/agent/workspace/R-Pipelines_BSS_hypersync_PR-541@2/hypersync/node_modules/node-rdkafka',
    11:52:39  npm error gyp info spawn args '-Dnode_engine=v8',
    11:52:39  npm error gyp info spawn args '--depth=.',
    11:52:39  npm error gyp info spawn args '--no-parallel',
    11:52:39  npm error gyp info spawn args '--generator-output',
    11:52:39  npm error gyp info spawn args 'build',
    11:52:39  npm error gyp info spawn args '-Goutput_dir=.'
    11:52:39  npm error gyp info spawn args ]
    11:52:39  npm error gyp info spawn make
    11:52:39  npm error gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
    11:52:39  npm error g++: error: unrecognized command line option ‘-std=gnu++20’; did you mean ‘-std=gnu++2a’?
    11:52:39  npm error g++: error: unrecognized command line option ‘-std=c++20’; did you mean ‘-std=c++2a’?
    11:52:39  npm error make[2]: *** [node-librdkafka.target.mk:129: Release/obj.target/node-librdkafka/src/binding.o] Error 1
    11:52:39  npm error gyp ERR! build error 
    11:52:39  npm error gyp ERR! stack Error: `make` failed with exit code: 2
    11:52:39  npm error gyp ERR! stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:219:23)
    11:52:39  npm error gyp ERR! System Linux 6.12.12
    11:52:39  npm error gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
    11:52:39  npm error gyp ERR! cwd /home/jenkins/agent/workspace/R-Pipelines_BSS_hypersync_PR-541@2/hypersync/node_modules/node-rdkafka
    11:52:39  npm error gyp ERR! node -v v24.12.0
    11:52:39  npm error gyp ERR! node-gyp -v v11.4.2
    11:52:39  npm error gyp ERR! not ok
    11:52:39  npm error A complete log of this run can be found in: /home/jenkins/.npm/_logs/2026-01-08T06_19_32_988Z-debug-0.log
    11:52:39  make[1]: *** [Makefile:49: npm-install-dev] Error 1
    11:52:39  make[1]: Leaving directory '/home/jenkins/agent/workspace/R-Pipelines_BSS_hypersync_PR-541@2/hypersync'
    11:52:39  make: *** [Makefile:252: pipeline-install-dependencies] Error 2
    11:52:40  [Pipeline] }
    
    
  3. jakub-ant commented on Feb 26, 2026

    @jakub-ant

    Try the following steps:

    1. Set up the environment variables listed out in the readme file.
    2. Install node-gyp as a dev dependency w/o installing node-rdkafka.
    3. Having successfully installed node-gyp, try to npm install all your dependencies, this time with node-rdkafka.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions