-
Notifications
You must be signed in to change notification settings - Fork 4k
ARROW-6979: [R] Enable jemalloc in autobrew formula #6073
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
Conversation
|
@ursabot crossbow submit homebrew-cpp-autobrew |
|
AMD64 Conda Crossbow Submit (#84105) builder has been succeeded. Revision: f569cd64ed83fab1c54aa71efaef4e8a62dc4abe Submitted crossbow builds: ursa-labs/crossbow @ ursabot-411
|
|
@ursabot crossbow submit macos-r-autobrew |
|
AMD64 Conda Crossbow Submit (#84106) builder has been succeeded. Revision: f569cd64ed83fab1c54aa71efaef4e8a62dc4abe Submitted crossbow builds: ursa-labs/crossbow @ ursabot-412
|
|
This fails IIUC because while the vendored jemalloc is built, it's not included in the resulting "bottle" package: What's the right way to get jemalloc.a to be included--somehow copy it into the install directory alongside libarrow.a et al.? |
|
This is tricky. It seems we need to |
|
Another possibility is to somehow glue the jemalloc symbols into https://stackoverflow.com/questions/37924383/combining-several-static-libraries-into-one-using-cmake |
I would prefer this approach as the arrow-built |
I agree, it's probably also worth the investment of time to have a general-purpose CMake function(s) to stitch together static libraries. |
|
FYI #6068 (comment) sounds similar to this discussion. In the meantime, I'll see if I can use the Homebrew jemalloc instead of the vendored. |
I don't think it's possible. We have things carefully configured to use our private built-by-us jemalloc |
|
I am going to have a tinker with this and see where I can get with the static library merging |
|
Looks like this problem is solved in https://cristianadam.eu/20190501/bundling-together-static-libraries-with-cmake/. The blog content is CC-BY 4.0 which is not compatible with ASF projects for source inclusion. I e-mailed the author to see if they will relicense |
|
I spent a little time looking at this. If we can reuse the code from that blog post then I don't think this is too bad. We have to have the following happen:
Internal targets linking to It's a little bit hacky (this will have to happen inside |
|
Here's a prototype that bundled jemalloc or mimalloc on Linux (I modified from the blog post linked above, so if we can't get that appropriately licensed we'll have to write a sufficiently fresh replacement for what I have here) master...wesm:glue-jemalloc-into-libarrow Some different commands are likely required on macOS but this is at least a POC |
|
Here's the code under MIT license https://gist.github.com/cristianadam/ef920342939a89fae3e8a85ca9459b49. I'll try to get this working on macOS a bit later |
|
I'll put up a separate PR today with this working on the 3 major platforms. Not sure how it will impact packaging so we will see |
|
Re packaging, it shouldn't affect windows because jemalloc doesn't work on windows (right?). On Linux IIUC you'll need to remove jemalloc from https://github.com/apache/arrow/blob/master/r/configure#L103 |
|
Since we build mimalloc on Windows I think this issue will impact static linking on Windows with |
f569cd6 to
f1df412
Compare
No description provided.