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

[libc-0.2] CI broken--pthread_getname_np linking failure in musl #3613

Closed
nathaniel-bennett opened this issue Mar 6, 2024 · 4 comments
Closed
Labels
C-bug Category: bug

Comments

@nathaniel-bennett
Copy link
Contributor

nathaniel-bennett commented Mar 6, 2024

In the libc-0.2 branch, making any change (such as modifying a README) results in CI failure due to a linking error in aarch64-unknown-linux-musl. It appears that one of the tests is attempting to include the Thread::get_name method (which internally uses pthread_getname_np), but the current musl CI does not have the pthread_getname_np function as its libc is too old.

= note: /usr/lib/gcc-cross/aarch64-linux-gnu/13/../../../../aarch64-linux-gnu/bin/ld: /rust/lib/rustlib/aarch64-unknown-linux-musl/lib/libstd-5be27651eb2c54c7.rlib(std-5be27651eb2c54c7.std.10df3d0a1be3812f-cgu.0.rcgu.o): in function `std::sys::pal::unix::thread::Thread::get_name':
          /rustc/b6d2d841bcf4b77343b159f134c7d39c2dd4ceaa/library/std/src/sys/pal/unix/thread.rs:233:(.text._ZN3std3sys3pal4unix6thread6Thread8get_name17hfd35a9649b47184eE+0x28): undefined reference to `pthread_getname_np'
          collect2: error: ld returned 1 exit status
@nathaniel-bennett nathaniel-bennett added the C-bug Category: bug label Mar 6, 2024
@chenx97
Copy link
Contributor

chenx97 commented Mar 7, 2024

can confirm on the main branch as well. See #3610

@ChrisDenton
Copy link
Contributor

Note that recent rust versions only support musl 1.2.3+. See the platform support page https://doc.rust-lang.org/nightly/rustc/platform-support.html#tier-2-with-host-tools

@JohnTitor
Copy link
Member

For libc 0.2, we have to drop the CI config for newer rustc then 😢

@JohnTitor
Copy link
Member

Now it has been fixed, closing.

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

No branches or pull requests

4 participants