Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

node-rdkafka build/run: dyld: Symbol not found: _timespec_get #686

Closed
belabartha opened this issue Sep 26, 2019 · 16 comments
Closed

node-rdkafka build/run: dyld: Symbol not found: _timespec_get #686

belabartha opened this issue Sep 26, 2019 · 16 comments
Labels
stale Stale issues

Comments

@belabartha
Copy link

Environment 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

@belabartha
Copy link
Author

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

@z0091
Copy link

z0091 commented Oct 7, 2019

@belabartha Hi, this is a temporary solution. But to solve the problem thoroughly still need

@belabartha
Copy link
Author

@z0091 Yes, this is a temporary solution until it's fixed in librdkafka.

@klesgidis
Copy link

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?

@nahomDiscover
Copy link

How would we incorporate this fix if we're using the blizzard wrapper? Would a simple download into the node_module's folder suffice?

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?

@belabartha
Copy link
Author

@klesgidis @nahomDiscover eventually make a PR and ask review of @iradul on it. IMHO I'd not integrate librdkafka RC1 in node-rdkafka.

@nahomDiscover
Copy link

@belabartha in that case, do you know of any other fixes to the timespec_get issue? I can't use the workaround as I am not in control of updating/downgrading the mac/sdk version.

@belabartha
Copy link
Author

@nahomDiscover worst case you can use directly from the repo, or make your own package and publish it (private package eventually). If you check npm, it has many node-rdkafka packages.

@klesgidis
Copy link

According to this, librdkafka v1.2.2 is going to be released later this week

@belabartha
Copy link
Author

@nahomDiscover @klesgidis node-rdkafka was updated to 2.7.4 on NPM, including librdkafka 1.2.2.

@klesgidis
Copy link

@belabartha that's awesome! Thanks a lot!

@iradul
Copy link
Collaborator

iradul commented Nov 15, 2019

@belabartha any luck with 2.7.4 ?

@belabartha
Copy link
Author

@iradul At the moment we're pretty close to release, so even if we switch to 2.7.4 won't upgrade MacOS SDK locally, for me it's more important the Node 12 support.

@iradul
Copy link
Collaborator

iradul commented Nov 16, 2019

I was curious if the error you described is still on. Also both 2.7.3 and 2.7.4 support Node 12.

@klesgidis
Copy link

2.7.4 is working like a charm for us! Thank you very much for the help!
🥇 🥇 🥇

@stale
Copy link

stale bot commented Feb 17, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Stale issues
Projects
None yet
Development

No branches or pull requests

5 participants