node-rdkafka build/run: dyld: Symbol not found: _timespec_get
See original GitHub issueEnvironment Information
- OS [e.g. Mac, Arch, Windows 10]: MacOS 10.14.6
- Node Version [e.g. 8.2.1]: 11.9.0
- NPM Version [e.g. 5.4.2]: 6.9.0
- C++ Toolchain [e.g. Visual Studio, llvm, g++]: XCode Version 11.0 (11A420a)
- node-rdkafka version [e.g. 2.3.3]: 2.7.1
Steps to Reproduce
Did an npm i
as usual; we have some warnings on build:
gcc -MD -MP -I/usr/local/opt/openssl/include -I/usr/local/opt/openssl/include -gstrict-dwarf -O2 -fPIC -Wall -Wsign-compare -Wfloat-equal -Wpointer-arith -Wcast-align -I/usr/local/opt/openssl/include -gstrict-dwarf -O2 -fPIC -Wall -Wsign-compare -Wfloat-equal -Wpointer-arith -Wcast-align -DLIBRDKAFKA_GIT_VERSION=“""” -c rdkafka_queue.c -o rdkafka_queue.o In file included from rdkafka_queue.c:29: In file included from ./rdkafka_int.h:46: ./rdtime.h:172:17: warning: ‘timespec_get’ is only available on macOS 10.15 or newer [-Wunguarded-availability-new] timespec_get(tspec, TIME_UTC); ^~~~~~~~~~~~ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/time.h:199:5: note: ‘timespec_get’ has been marked as being introduced in macOS 10.15 here, but the deployment target is macOS 10.14.0 int timespec_get(struct timespec *ts, int base); ^ ./rdtime.h:172:17: note: enclose ‘timespec_get’ in a __builtin_available check to silence this warning timespec_get(tspec, TIME_UTC); ^~~~~~~~~~~~
1 warning generated.
Upon running the code, after node-rdkafka has been initialized I get:
dyld: lazy symbol binding failed: Symbol not found: _timespec_get Referenced from: /Users/bela/projects/aix-next/services/stream-router/node_modules/node-rdkafka/build/deps/librdkafka.1.dylib Expected in: /usr/lib/libSystem.B.dylib
dyld: Symbol not found: _timespec_get Referenced from: /Users/bela/projects/aix-next/services/stream-router/node_modules/node-rdkafka/build/deps/librdkafka.1.dylib Expected in: /usr/lib/libSystem.B.dylib
This has not been happening in the past (about 1 month ago). CC @edenhill
Issue Analytics
- State:
- Created 4 years ago
- Reactions:12
- Comments:16
Top GitHub Comments
Hi guys, this is merged in https://github.com/edenhill/librdkafka/releases/tag/v1.2.2-RC1.
Could you please bump librdkafka in your package?
I found the issue and a workaround: XCode was automatically updated to v11, with it MacOS SDK was updated to 11.15. Reverted to XCode 10.3 and MacOS SDK 10.14, and everything just works fine