-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
make jemalloc an optional Cargo feature to make musl builds easier #1542
Comments
Not sure what the problem is, sorry. I can indeed reproduce it on my system. I've had problems compiling with musl and jemalloc in the past: gnzlbg/jemallocator#124 I think you have two immediate paths in front of you:
Using
It does require Docker though. The advantage is that it correctly sets up your cross compilation toolchain, which I guess jemalloc is pretty picky about. You could instead look at what is being installed in Cross's docker image and then re-create that on your box. That would probably be the most "correct" solution in that you wouldn't need Docker and you wouldn't sacrifice performance. (ripgrep is slower when using musl's allocator.) It might be a good idea to make jemalloc a Cargo feature so that it's easier to disable for cases like these. |
Thanks for the detailed response. Will definitely take a look at |
So @jonstites actually put in the work to do this in #1569, but echoing my comment on that PR, I think there's probably not a good way to do this right now with Cargo's existing feature set. I think if folks really want to build ripgrep with musl without jemalloc, then they are advised to just patch ripgrep for now. |
for reference, I succeeded building a musl target on ubuntu 20.04.2 by installing musl-tools first |
What version of ripgrep are you using?
non-musl version built from master
How did you install ripgrep?
Compile from source
What operating system are you using ripgrep on?
Linux moderation-x1 5.3.0-40-generic #32-Ubuntu SMP Fri Jan 31 20:24:34 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Describe your question, feature request, or bug.
Trying to build a musl binary from source following instructions at https://github.com/BurntSushi/ripgrep#building
If this is a bug, what are the steps to reproduce the behavior?
cargo build --release --verbose --target x86_64-unknown-linux-musl
I think have the required Rust targets an OS packages
If this is a bug, what is the actual behavior?
If this is a bug, what is the expected behavior?
Successful build
The text was updated successfully, but these errors were encountered: