question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ERR! stack Error: `make` failed with exit code: 2

See original GitHub issue

root@jztser1:/user/MessageService# cnpm install node-rdkafka ✔ Installed 1 packages ✔ Linked 2 latest versions make: Entering directory `/user/MessageService/node_modules/.0.8.0@node-rdkafka/build’ ACTION configuring librdkafka… deps/librdkafka/config.h checking for OS or distribution… ok (CentOS) 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 checking executable ld… ok checking executable nm… ok checking executable objdump… ok checking executable strip… ok checking for pkgconfig (by command)… ok checking for install (by command)… ok checking for PIC (by compile)… ok checking for GNU-compatible linker options… ok checking for GNU linker-script ld flag… ok checking for __atomic_32 (by compile)… failed checking for __atomic_32_lib (by compile)… failed checking for __sync_32 (by compile)… ok checking for __atomic_64 (by compile)… failed checking for __atomic_64_lib (by compile)… failed checking for __sync_64 (by compile)… ok checking for socket (by compile)… ok parsing version ‘0x000904ff’… ok (0.9.4) checking for libpthread (by pkg-config)… failed checking for libpthread (by compile)… ok checking for zlib (by pkg-config)… failed checking for zlib (by compile)… failed (disable) checking for libcrypto (by pkg-config)… failed checking for libcrypto (by compile)… failed (disable) checking for liblz4 (by pkg-config)… failed checking for liblz4 (by compile)… failed (disable) checking for libssl (by pkg-config)… failed checking for libssl (by compile)… failed (disable) checking for libsasl2 (by pkg-config)… failed checking for libsasl2 (by compile)… failed (disable) checking for libsasl (by pkg-config)… failed checking for libsasl (by compile)… failed (disable) checking for regex (by compile)… ok checking for librt (by pkg-config)… failed checking for librt (by compile)… ok checking for strndup (by compile)… ok checking for nm (by env NM)… ok (cached) checking for python (by command)… ok Generated Makefile.config Generated config.h

Configuration summary: prefix /usr/local ARCH x86_64 CPU generic GEN_PKG_CONFIG y ENABLE_DEVEL n ENABLE_VALGRIND n ENABLE_REFCNT_DEBUG n ENABLE_SHAREDPTR_DEBUG n ENABLE_LZ4 y ENABLE_SSL y ENABLE_SASL y MKL_APP_NAME librdkafka MKL_APP_DESC_ONELINE The Apache Kafka C/C++ library MKL_DISTRO CentOS CC gcc CXX g++ LD ld NM nm OBJDUMP objdump STRIP strip CPPFLAGS -g -O2 -fPIC -Wall -Wsign-compare -Wfloat-equal -Wpointer-arith PKG_CONFIG pkg-config INSTALL install LIB_LDFLAGS -shared -Wl,-soname,$(LIBFILENAME) LDFLAG_LINKERSCRIPT -Wl,–version-script= RDKAFKA_VERSION_STR 0.9.4 MKL_APP_VERSION 0.9.4 LIBS -lpthread -lrt CXXFLAGS -Wno-non-virtual-dtor SYMDUMPER $(NM) -D exec_prefix /usr/local bindir /usr/local/bin sbindir /usr/local/sbin libexecdir /usr/local/libexec datadir /usr/local/share sysconfdir /usr/local/etc sharedstatedir /usr/local/com localstatedir /usr/local/var libdir /usr/local/lib includedir /usr/local/include infodir /usr/local/info mandir /usr/local/man Generated config.cache

Now type ‘make’ to build TOUCH Release/obj.target/deps/librdkafka_config.stamp CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdkafka_conf.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdgz.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdkafka_cgrp.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/tinycthread.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/xxhash.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdavl.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdkafka_partition.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdkafka_assignor.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdkafka_msg.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdkafka_range_assignor.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdkafka_offset.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdregex.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdaddr.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdkafka_pattern.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdcrc32.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdkafka_metadata_cache.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdkafka.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdlog.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdstring.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdrand.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdkafka_timer.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdports.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdkafka_queue.o …/deps/librdkafka/src/rdkafka_queue.c: In function ‘rd_kafka_q_io_event_enable’: …/deps/librdkafka/src/rdkafka_queue.c:741: warning: ‘qio’ may be used uninitialized in this function At top level: cc1: warning: unrecognized command line option “-Wno-maybe-uninitialized” CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdkafka_subscription.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdkafka_op.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdkafka_buf.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdkafka_metadata.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdlist.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdkafka_request.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdkafka_roundrobin_assignor.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdkafka_event.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/snappy.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdkafka_broker.o …/deps/librdkafka/src/rdkafka_broker.c: In function ‘rd_kafka_broker_ApiVersion_supported’: …/deps/librdkafka/src/rdkafka_broker.c:245: warning: ‘ret.MinVer’ may be used uninitialized in this function …/deps/librdkafka/src/rdkafka_broker.c:245: warning: ‘ret.MaxVer’ may be used uninitialized in this function At top level: cc1: warning: unrecognized command line option “-Wno-maybe-uninitialized” CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/regexp.o …/deps/librdkafka/src/regexp.c: In function ‘compile’: …/deps/librdkafka/src/regexp.c:647: warning: ‘inst’ may be used uninitialized in this function At top level: cc1: warning: unrecognized command line option “-Wno-maybe-uninitialized” CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdkafka_transport.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdkafka_feature.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdkafka_topic.o CC(target) Release/obj.target/librdkafka/deps/librdkafka/src/rdkafka_sasl.o …/deps/librdkafka/src/rdkafka_sasl.c: In function ‘rd_kafka_sasl_io_event’: …/deps/librdkafka/src/rdkafka_sasl.c:129: error: ‘rd_kafka_transport_t’ has no member named ‘rktrans_sasl’ …/deps/librdkafka/src/rdkafka_sasl.c: In function ‘rd_kafka_sasl_client_new’: …/deps/librdkafka/src/rdkafka_sasl.c:157: error: ‘rd_kafka_conf_t’ has no member named ‘sasl’ …/deps/librdkafka/src/rdkafka_sasl.c:157: error: ‘rd_kafka_conf_t’ has no member named ‘sasl’ …/deps/librdkafka/src/rdkafka_sasl.c:157: warning: left-hand operand of comma expression has no effect …/deps/librdkafka/src/rdkafka_sasl.c:157: error: ‘rd_kafka_conf_t’ has no member named ‘sasl’ …/deps/librdkafka/src/rdkafka_sasl.c:157: error: ‘rd_kafka_conf_t’ has no member named ‘sasl’ …/deps/librdkafka/src/rdkafka_sasl.c:157: warning: value computed is not used …/deps/librdkafka/src/rdkafka_sasl.c:157: error: ‘rd_kafka_conf_t’ has no member named ‘sasl’ …/deps/librdkafka/src/rdkafka_sasl.c:157: error: ‘rd_kafka_conf_t’ has no member named ‘sasl’ …/deps/librdkafka/src/rdkafka_sasl.c:157: error: ‘rd_kafka_conf_t’ has no member named ‘sasl’ …/deps/librdkafka/src/rdkafka_sasl.c:157: error: ‘rd_kafka_conf_t’ has no member named ‘sasl’ …/deps/librdkafka/src/rdkafka_sasl.c:157: error: ‘rd_kafka_conf_t’ has no member named ‘sasl’ …/deps/librdkafka/src/rdkafka_sasl.c:157: warning: left-hand operand of comma expression has no effect …/deps/librdkafka/src/rdkafka_sasl.c:157: error: ‘rd_kafka_conf_t’ has no member named ‘sasl’ …/deps/librdkafka/src/rdkafka_sasl.c:157: error: ‘rd_kafka_conf_t’ has no member named ‘sasl’ …/deps/librdkafka/src/rdkafka_sasl.c:157: error: ‘rd_kafka_conf_t’ has no member named ‘sasl’ …/deps/librdkafka/src/rdkafka_sasl.c:157: error: ‘rd_kafka_conf_t’ has no member named ‘sasl’ …/deps/librdkafka/src/rdkafka_sasl.c:157: error: ‘rd_kafka_conf_t’ has no member named ‘sasl’ …/deps/librdkafka/src/rdkafka_sasl.c:157: error: ‘rd_kafka_conf_t’ has no member named ‘sasl’ …/deps/librdkafka/src/rdkafka_sasl.c:157: error: ‘rd_kafka_conf_t’ has no member named ‘sasl’ …/deps/librdkafka/src/rdkafka_sasl.c:157: error: ‘rd_kafka_conf_t’ has no member named ‘sasl’ …/deps/librdkafka/src/rdkafka_sasl.c:157: error: ‘rd_kafka_conf_t’ has no member named ‘sasl’ …/deps/librdkafka/src/rdkafka_sasl.c:157: error: ‘rd_kafka_conf_t’ has no member named ‘sasl’ …/deps/librdkafka/src/rdkafka_sasl.c:157: error: ‘rd_kafka_conf_t’ has no member named ‘sasl’ …/deps/librdkafka/src/rdkafka_sasl.c:165: error: ‘rd_kafka_conf_t’ has no member named ‘sasl’ …/deps/librdkafka/src/rdkafka_sasl.c:178: error: ‘rd_kafka_conf_t’ has no member named ‘sasl’ …/deps/librdkafka/src/rdkafka_sasl.c:178: error: ‘rd_kafka_conf_t’ has no member named ‘sasl’ …/deps/librdkafka/src/rdkafka_sasl.c: In function ‘rd_kafka_sasl_conf_validate’: …/deps/librdkafka/src/rdkafka_sasl.c:231: error: ‘rd_kafka_conf_t’ has no member named ‘sasl’ …/deps/librdkafka/src/rdkafka_sasl.c:231: error: ‘rd_kafka_conf_t’ has no member named ‘sasl’ …/deps/librdkafka/src/rdkafka_sasl.c:231: warning: left-hand operand of comma expression has no effect …/deps/librdkafka/src/rdkafka_sasl.c:231: error: ‘rd_kafka_conf_t’ has no member named ‘sasl’ …/deps/librdkafka/src/rdkafka_sasl.c:231: error: ‘rd_kafka_conf_t’ has no member named ‘sasl’ …/deps/librdkafka/src/rdkafka_sasl.c:231: warning: value computed is not used …/deps/librdkafka/src/rdkafka_sasl.c:231: error: ‘rd_kafka_conf_t’ has no member named ‘sasl’ …/deps/librdkafka/src/rdkafka_sasl.c:231: error: ‘rd_kafka_conf_t’ has no member named ‘sasl’ …/deps/librdkafka/src/rdkafka_sasl.c:231: error: ‘rd_kafka_conf_t’ has no member named ‘sasl’ …/deps/librdkafka/src/rdkafka_sasl.c:231: error: ‘rd_kafka_conf_t’ has no member named ‘sasl’ …/deps/librdkafka/src/rdkafka_sasl.c:231: error: ‘rd_kafka_conf_t’ has no member named ‘sasl’ …/deps/librdkafka/src/rdkafka_sasl.c:231: warning: left-hand operand of comma expression has no effect …/deps/librdkafka/src/rdkafka_sasl.c:231: error: ‘rd_kafka_conf_t’ has no member named ‘sasl’ …/deps/librdkafka/src/rdkafka_sasl.c:231: error: ‘rd_kafka_conf_t’ has no member named ‘sasl’ …/deps/librdkafka/src/rdkafka_sasl.c:231: error: ‘rd_kafka_conf_t’ has no member named ‘sasl’ …/deps/librdkafka/src/rdkafka_sasl.c:231: error: ‘rd_kafka_conf_t’ has no member named ‘sasl’ …/deps/librdkafka/src/rdkafka_sasl.c:231: error: ‘rd_kafka_conf_t’ has no member named ‘sasl’ …/deps/librdkafka/src/rdkafka_sasl.c:231: error: ‘rd_kafka_conf_t’ has no member named ‘sasl’ …/deps/librdkafka/src/rdkafka_sasl.c:231: error: ‘rd_kafka_conf_t’ has no member named ‘sasl’ …/deps/librdkafka/src/rdkafka_sasl.c:231: error: ‘rd_kafka_conf_t’ has no member named ‘sasl’ …/deps/librdkafka/src/rdkafka_sasl.c:231: error: ‘rd_kafka_conf_t’ has no member named ‘sasl’ …/deps/librdkafka/src/rdkafka_sasl.c:231: error: ‘rd_kafka_conf_t’ has no member named ‘sasl’ …/deps/librdkafka/src/rdkafka_sasl.c:231: error: ‘rd_kafka_conf_t’ has no member named ‘sasl’ At top level: cc1: warning: unrecognized command line option “-Wno-maybe-uninitialized” make: *** [Release/obj.target/librdkafka/deps/librdkafka/src/rdkafka_sasl.o] Error 1 make: Leaving directory /user/MessageService/node_modules/.0.8.0@node-rdkafka/build' gyp ERR! build error gyp ERR! stack Error: make` failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/opt/node/lib/node_modules/cnpm/node_modules/node-gyp/lib/build.js:276:23) gyp ERR! stack at emitTwo (events.js:106:13) gyp ERR! stack at ChildProcess.emit (events.js:191:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12) gyp ERR! System Linux 2.6.32-573.el6.x86_64 gyp ERR! command “/opt/node/bin/node” “/opt/node/lib/node_modules/cnpm/node_modules/npminstall/node-gyp-bin/node-gyp.js” “rebuild” gyp ERR! cwd /user/MessageService/node_modules/.0.8.0@node-rdkafka gyp ERR! node -v v6.9.4 gyp ERR! node-gyp -v v3.5.0 gyp ERR! not ok ✖ Install fail! Error: post install error, please remove node_modules before retry! Run “sh -c node-gyp rebuild” error, exit code 1 Error: post install error, please remove node_modules before retry! Run “sh -c node-gyp rebuild” error, exit code 1 at ChildProcess.proc.on.code (/opt/node/lib/node_modules/cnpm/node_modules/runscript/index.js:65:21) at emitTwo (events.js:106:13) at ChildProcess.emit (events.js:191:7) at maybeClose (internal/child_process.js:877:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5) npminstall version: 2.26.2 npminstall args: /opt/node/bin/node /opt/node/lib/node_modules/cnpm/node_modules/npminstall/bin/install.js --china --userconfig=/root/.cnpmrc --disturl=https: //npm.taobao.org/mirrors/node --registry=https://registry.npm.taobao.org node-rdkafka

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:5

github_iconTop GitHub Comments

5reactions
webmakerstevecommented, May 10, 2017

You won’t be able to use kerberos to authenticate with your broker. That’s the feature that requires sasl. If you aren’t using that, you’ll be fine.

https://packages.debian.org/jessie/libsasl2-dev

That is the libsasl2 library required on Debian Jessie if you want it.

2reactions
webmakerstevecommented, Mar 7, 2017

Please make sure you have sasl installed before trying to install node-rdkafka. You need to get the development headers for your platform. If you don’t want or need SASL, you can export the environment variable WITH_SASL=0 and it will compile without SASL support.

Read more comments on GitHub >

github_iconTop Results From Across the Web

GYP ERR! build error. stack Error: 'make' failed with exit code 2
This is the error I encounter when I try to push the application via cloud foundry. This similar error happens when I npm...
Read more >
Debugging "Make Failed with Exit Code 2" Error - CodeForGeek
Debugging “Make Failed with Exit Code 2” Error ... The “Make Failed with Exit Code 2” error occurs during the node modules installation....
Read more >
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
The error "npm ERR! gyp ERR! stack Error: make failed with exit code: 2" occurs when there's a glitch in your package-lock.json ......
Read more >
gyp ERR! stack Error: make failed with exit code: 2 #1694
Follow these steps to resolve the issue. 1: Make sure you have build-tools installed. ... 3: Delete package-lock.json and node modules folder and ......
Read more >
Gyp ERR! stack Error: `make` failed with exit code: 2
Hi there,. I am running VS on a WSL (Windows Subsystem for Linux) and when I am trying to do 'npm install' I...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found