Skip to content
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

pprof 0.9.1: Databend cannot be built on musl targets #138

Closed
PsiACE opened this issue Jun 22, 2022 · 6 comments
Closed

pprof 0.9.1: Databend cannot be built on musl targets #138

PsiACE opened this issue Jun 22, 2022 · 6 comments

Comments

@PsiACE
Copy link
Contributor

PsiACE commented Jun 22, 2022

= note: /usr/local/bin/../lib/gcc/x86_64-linux-musl/9.2.0/../../../../x86_64-linux-musl/bin/ld: /workspace/target/x86_64-unknown-linux-musl/release/deps/databend_meta-3240ad175f7a77fc.pprof-d7659ef0c4e51494.pprof.f6a0a7fc-cgu.0.rcgu.o.rcgu.o: in function `pprof::profiler::write_thread_name':
          /opt/rust/cargo/registry/src/[github.com](http://github.com/)-1ecc6299db9ec823/pprof-0.9.1/src/[profiler.rs:193](http://profiler.rs:193/): undefined reference to `pthread_getname_np'
          collect2: error: ld returned 1 exit status

https://github.com/datafuselabs/databend/runs/7005883205?check_suite_focus=true#step:7:1134

Related:

@PsiACE PsiACE changed the title Unable to build on musl targets pprof 0.9.1: Databend cannot be built on musl targets Jun 22, 2022
@Xuanwo
Copy link
Member

Xuanwo commented Jun 23, 2022

It works on my env:

:) cargo build --target x86_64-unknown-linux-musl
   Compiling libc v0.2.126
   Compiling cfg-if v1.0.0
   Compiling cc v1.0.73
   Compiling proc-macro2 v1.0.40
   Compiling unicode-ident v1.0.1
   Compiling quote v1.0.20
   Compiling autocfg v1.1.0
   Compiling memchr v2.5.0
   Compiling syn v1.0.98
   Compiling uuid v0.8.2
   Compiling cpp_demangle v0.3.5
   Compiling parking_lot_core v0.9.3
   Compiling scopeguard v1.1.0
   Compiling stable_deref_trait v1.2.0
   Compiling log v0.4.17
   Compiling rustc-demangle v0.1.21
   Compiling smallvec v1.8.0
   Compiling gimli v0.26.1
   Compiling symbolic-demangle v8.8.0
   Compiling adler v1.0.2
   Compiling fastrand v1.7.0
   Compiling remove_dir_all v0.5.3
   Compiling bitflags v1.3.2
   Compiling pprof v0.9.1 (/home/xuanwo/Code/tikv/pprof-rs)
   Compiling once_cell v1.12.0
   Compiling miniz_oxide v0.5.3
   Compiling debugid v0.7.3
   Compiling lock_api v0.4.7
   Compiling object v0.28.4
   Compiling findshlibs v0.10.2
   Compiling backtrace v0.3.65
   Compiling memmap2 v0.5.4
   Compiling nix v0.24.1
   Compiling tempfile v3.3.0
   Compiling symbolic-common v8.8.0
   Compiling parking_lot v0.12.1
   Compiling addr2line v0.17.0
   Compiling thiserror-impl v1.0.31
   Compiling thiserror v1.0.31
    Finished dev [unoptimized + debuginfo] target(s) in 4.11s
cargo build --target x86_64-unknown-linux-musl  30.47s user 4.75s system 846% cpu 4.160 total

@Xuanwo
Copy link
Member

Xuanwo commented Jun 23, 2022

Seems not related to pprof-rs itself.

@Xuanwo
Copy link
Member

Xuanwo commented Jun 23, 2022

tikv-jemalloc-sys works too.

:) cargo build --target x86_64-unknown-linux-musl
   Compiling cc v1.0.73
   Compiling libc v0.2.126
   Compiling fs_extra v1.2.0
   Compiling cfg-if v0.1.10
   Compiling paste v1.0.7
   Compiling tikv-jemalloc-sys v0.5.0+5.3.0 (/home/xuanwo/Code/tikv/jemallocator/jemalloc-sys)
warning: "`background_threads_runtime_support` not supported for `x86_64-unknown-linux-musl`"
   Compiling tikv-jemallocator v0.5.0 (/home/xuanwo/Code/tikv/jemallocator/jemallocator)
   Compiling tikv-jemalloc-ctl v0.5.0 (/home/xuanwo/Code/tikv/jemallocator/jemalloc-ctl)
   Compiling tikv-jemallocator-global v0.5.0 (/home/xuanwo/Code/tikv/jemallocator/jemallocator-global)
    Finished dev [unoptimized + debuginfo] target(s) in 16.83s
cargo build --target x86_64-unknown-linux-musl  86.88s user 10.19s system 575% cpu 16.879 total

@Xuanwo
Copy link
Member

Xuanwo commented Jun 23, 2022

Maybe related: #41 (comment)

@Xuanwo
Copy link
Member

Xuanwo commented Jun 23, 2022

Can you take a look at the musl version databend use?

@Xuanwo
Copy link
Member

Xuanwo commented Jun 23, 2022

Not related to pprof-rs, addressed by datafuselabs/databend#6165

@Xuanwo Xuanwo closed this as not planned Won't fix, can't repro, duplicate, stale Jun 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants