Node-rdkafka: Support Node 8

Created on 26 Oct 2017  ·  9Comments  ·  Source: Blizzard/node-rdkafka

Per the comment here: https://github.com/Blizzard/node-rdkafka/issues/267#issuecomment-338326225 - Node 8 is not currently supported by node-rdkafka.

Node 8 will officially become the "LTS" release in four days: https://github.com/nodejs/Release

It would be great if it was officially supported by the maintainers of this library.

Most helpful comment

@kevinburke Without having to modify any Makefiles, I found a possible solution while debugging my co-workers machines.

We updated xcode then ran xcode-select --install to install the xcode developer tools.

All 9 comments

@kevinburke I've been running this library's latest version on 8.x.x without a problem. Is the problem within a Docker container?

No, it’s on a Mac. My coworker kept getting “ld: could not find -lcrypto” when trying to install node-rdkafka. We took every step we could think of to make our environment similar - same env vars, same OpenSSL, same Mac version, same npm, same Node, same rdkafka version, yet I could install and he’d get that error message. Also, the vars printed out in the configure step - LDFLAGS etc - were the same for each of us.

We ended up hardcoding the CPPFLAGS and LDFLAGS env vars in the Makefile to point at the Homebrew installed OpenSSL and this resolved the problem.

@kevinburke Interesting. My co-worker just saw the same error but he is on node 7.

If your library is installed in a non-ldconfig search path ld may not be able to find it. I would like to make an adjustment to use the -L flags librdkafka discovers to remedy that issue.

The -lcrypto is not specifically a node 8 issue.

can you describe how to determine whether the library is installed in a ldconfig search path?

ldconfig creates the necessary links and cache to the most recent shared libraries found in the directories specified on the command line, in the file /etc/ld.so.conf, and in the trusted directories (/lib and /usr/lib). The cache is used by the run-time linker, ld.so or ld-linux.so. ldconfig checks the header and filenames of the libraries it encounters when determining which versions should have their links updated.

You can update the paths in /etc/ld.so.conf and then run ldconfig to update the cache. If the library it is looking for is not in one of the configured paths, or /lib or /usr/lib, ld will not find it by default.

In some linux distributions /usr/local/lib is not included in ld's search paths by default and sometimes has to be added.

In any event, there are things I can do on my end to make these libraries more easily discovered.

@kevinburke Without having to modify any Makefiles, I found a possible solution while debugging my co-workers machines.

We updated xcode then ran xcode-select --install to install the xcode developer tools.

@FuzzOli87 that did the trick for me too.
Thank you very much!

@FuzzOli87 This worked for me too

I kept getting the following error but updating xcode fixed it;

ld: library not found for -lcrypto
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Release/node-librdkafka.node] Error 1

I guess this was because I had just updated to High Sierra so I guess XCode needed to be rebuilt or something.

Was this page helpful?
0 / 5 - 0 ratings