-
Notifications
You must be signed in to change notification settings - Fork 38
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
fix(build): Update src/Makevars.in for Ubuntu 20.04 #528
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution!
Could you change the CI setting?
src/Makevars.in
Outdated
@@ -7,7 +7,7 @@ LIBNAME = libr_polars.a | |||
TARGET_DIR = $(CURDIR)/rust/target | |||
LIBDIR = $(TARGET_DIR)/$(TARGET)/$(RPOLARS_PROFILE) | |||
STATLIB = $(LIBDIR)/$(LIBNAME) | |||
PKG_LIBS = -L$(LIBDIR) -lr_polars | |||
PKG_LIBS = -L$(LIBDIR) -lr_polars -lrt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that we should pass -lrt
to Linux only.
https://github.com/cran/arrow/blob/61e0a7ade8ec52e2d1463c982632c3038c1a51bb/tools/cpp/CMakeLists.txt#L976-L979
Could you update the configure script and change it to not pass anything to macOS? (If it's too difficult, I can do it myself)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I gave it a shot in fd67334
Looks like linking to librt fails on macOS. I suppose the additional lib could be added conditionally for non-macOS platforms? |
I think it can be configured within the configure script (note: must be sh, not bash) to determine if that machine is darwin and pass something like Line 70 in a4d3772
Line 89 in a4d3772
Line 104 in a4d3772
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems working fine, thanks!
Background:
I got successful installation in Ubuntu 20.04 docker container by adding
"-lrt"
toPKG_LIBS
in src/Makevars.in. As in this diff:This is my first PR in r-polars, so please let me know if you need anything else.