Starting with #Rust 1.62.0, tests for gettext-rs crate segfault on x86_64-unknown-linux-musl because pthread_mutex_lock
is missing from the binary. I failed to figure out why: https://github.com/Koka/gettext-rs/issues/99 If you're into this sort of thing, please lend me a hand!
@minoru I thought Rust has no segfaults!
@L29Ah Technically the segfault is in GNU gettext, which is a C library :P But it happens because (I think) Rust doesn't link the entirety of pthreads into the binary. Overall it looks like the Rust crate relied on symbols that compiler used for its own stuff, and now that the compiler no longer uses those symbols and doesn't include them in the binary, the crate is broken.
But I can't figure out how to ask Rust to pull that symbols for me :(
@minoru but pthread_mutex_lock is POSIX!
@L29Ah Um, yes? GNU software can call POSIX interfaces just fine. (Sorry I don't have a funny response for you here.)
@minoru @nm0i In the meantime one could use a pure Haskell implementation for gettext: https://hackage.haskell.org/package/haskell-gettext
@L29Ah Rust has one too: https://crates.io/crates/gettext But if you're building an application in multiple languages (e.g. C and Rust), then it's slightly easier to use a single gettext implementation in both languages; that's where gettext-sys and gettext-rs come in.
@nm0i