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

[profiling] ubuntu-latest for x86_64-unknown-linux-musl: cannot find function pthread_getname_np in crate libc #830

Closed
BohuTANG opened this issue Jun 14, 2021 · 1 comment · Fixed by #4520
Assignees
Labels
C-bug Category: something isn't working

Comments

@BohuTANG
Copy link
Member

BohuTANG commented Jun 14, 2021

(you don't have to strictly follow this form)

Describe the bug

error[E0425]: cannot find function `pthread_getname_np` in crate `libc`
Error:     --> /cargo/registry/src/github.com-1ecc6299db9ec823/pprof-0.4.3/src/profiler.rs:112:30
     |
112  |     let ret = unsafe { libc::pthread_getname_np(current_thread, name_ptr, MAX_THREAD_NAME) };
     |                              ^^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `pthread_getattr_np`
     | 
    ::: /cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.95/src/unix/linux_like/mod.rs:1490:5
     |
1490 |     pub fn pthread_getattr_np(native: ::pthread_t, attr: *mut ::pthread_attr_t) -> ::c_int;
     |     --------------------------------------------------------------------------------------- similarly named function `pthread_getattr_np` defined here

error: aborting due to previous error
Error: aborting due to previous error
For more information about this error, try `rustc --explain E0425`.
error: could not compile `pprof`
Error: could not compile `pprof`

Reference:
tikv/pprof-rs#41

@BohuTANG BohuTANG added the C-bug Category: something isn't working label Jun 14, 2021
@BohuTANG BohuTANG self-assigned this Jun 18, 2021
@BohuTANG
Copy link
Member Author

Temporary solution: change musl to gnu 21ec77c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant