-
Notifications
You must be signed in to change notification settings - Fork 66
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 on riscv64gc-unknown-linux-gnu #40
Conversation
This works around the mismatch between the GNU target and rustc target. Fixes tikv#36 Signed-off-by: Amanieu d'Antras <amanieu@gmail.com>
106882b
to
210c4eb
Compare
It seems there still be issues jemalloc/jemalloc#2323. /cc @bnoctis can you verify whether this works for you? |
@BusyJay AFAICT this masks itself as riscv64, which is what vanilla jemalloc currently does. I don't know if there's any difference between it and riscv64gc. Upstream has a separate riscv64be, I think it's better to have a separate gc too. |
54645c9
to
971bc9f
Compare
The GNU toolchain prefix for RV64GC is riscv64-linux-gnu-. This is what the configure script is looking for. If you pass in riscv64gc- then it will fail to find the GCC binary. |
At the very least this PR fixes the build for me when cross compiling from x86_64 to RV64. |
971bc9f
to
d44ba2c
Compare
jemalloc-sys/build.rs
Outdated
@@ -188,11 +188,11 @@ fn main() { | |||
} | |||
|
|||
if let Ok(malloc_conf_opts) = read_and_watch_env("JEMALLOC_SYS_WITH_MALLOC_CONF") { | |||
malloc_conf += &format!( | |||
malloc_conf.push_str(&format!( |
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.
Oh, what I mean is actually:
if !malloc_conf.is_empty() {
malloc_conf.push(',');
}
malloc_conf.push_str(&malloc_conf_opts);
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.
Done
Signed-off-by: Amanieu d'Antras <amanieu@gmail.com>
d44ba2c
to
677b4a2
Compare
I'm not sure why CI is failing, it works fine on my machine. Can we try a re-run? |
Thank you @Amanieu @bnoctis |
Could you publish a new version with this fix? Thanks! |
Published as 0.5.2 |
`jemalloc-sys` patch based on: tikv/jemallocator#40. Regenerate checksums with sed after patching.
`jemalloc-sys-pick.patch` is based on: tikv/jemallocator#40. Regenerated checksums using `sed` after patching vendors.
`jemalloc-sys-pick.patch` is based on: tikv/jemallocator#40. Regenerated checksums using `sed` after patching vendors.
`jemalloc-sys-pick.patch` is based on: tikv/jemallocator#40. Regenerated checksums using `sed` after patching vendors.
This works around the mismatch between the GNU target and rustc target.
Fixes #36