-
Notifications
You must be signed in to change notification settings - Fork 63
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
tikv-jemalloc-sys 0.5.0: Databend cannot be built on musl targets #30
Comments
Perhaps this should be send to jemalloc/jemalloc as well. Without change from upstream or without updating musl versions bundled by rust, we may not be able to make it work. |
Related to tikv/pprof-rs#142 Both
If I understand correctly, do you mean rust has its own bundled |
Yes.
No, it won't work. Though I'm not sure if it's caused by outdated bundle musl yet. |
Works with |
But test still failed: = note: /usr/bin/ld: /home/xuanwo/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/libtest-39fc138fafb03235.rlib(test-39fc138fafb03235.test.08afccba-cgu.0.rcgu.o): in function `std::f64::<impl f64>::floor':
/rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/f64.rs:51: undefined reference to `floor'
/usr/bin/ld: /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/f64.rs:51: undefined reference to `floor'
/usr/bin/ld: /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/f64.rs:51: undefined reference to `floor'
/usr/bin/ld: /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/f64.rs:51: undefined reference to `floor'
collect2: error: ld returned 1 exit status
= help: some `extern` functions couldn't be found; some native libraries may need to be installed or have their path specified
= note: use the `-l` flag to specify native libraries to link
= note: use the `cargo:rustc-link-lib` directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#cargorustc-link-libkindname) |
So what's happening for me in fd is that jemalloc's I am a little surprised that cc-rs just uses the system's This patch is a workaround, is it worth a PR? diff --git a/jemalloc-sys/build.rs b/jemalloc-sys/build.rs
index b4c0266..c1318ac 100644
--- a/jemalloc-sys/build.rs
+++ b/jemalloc-sys/build.rs
@@ -153,6 +153,10 @@ fn main() {
cmd.arg("--with-lg-page=14");
}
+ if target.contains("musl") {
+ cmd.env("je_cv_pthread_getname_np", "no");
+ }
+
// collect `malloc_conf` string:
let mut malloc_conf = String::new();
|
Thanks for the workaround. I think it's the same as setting the environment when invoking build like |
Has this been fixed by the update of Musl in Rust 1.71? |
Yes it is. |
target: x86_64-unknown-linux-musl
Build failure after upgrade to 0.5.0.
The text was updated successfully, but these errors were encountered: