You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FreeBSD doesn't have libatomic. LLVM is used in the base system, libatomic is GCC's component.
If FreeBSD doesn't have libatomic, what library provides atomic libcalls instead? I found https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230888 which makes it sound like these are supposed to be provided by compiler-rt (which is super suspicious, because __atomic builtins must be provided by a shared object with a globally shared mutex, not a static library).
In any case, this sounds like an issue in FreeBSD, not something that can/should be addressed on the Rust/LLVM side.
I succeeded to build after installing gcc, adding appriopriate -L flag to RUSTFLAGS and modifying compiler/rustc_llvm/build.rs to always add -latomic and -lz (that was also necessary) on powerpc (not just for crosscompiling).
@pkubaj do you consider this issue as resolved? If yes, can you close it? I understand you had to manually patch rustc to compile the target. Do you think that your patch would be useful for a PR upstream in rustc?
Activity
apiraino commentedon Nov 11, 2022
probably related to #103949 (different compile target but seemingly same symptoms).
Assigning same priority for the time being (Zulip discussion).
@rustbot label -I-prioritize +P-low
nikic commentedon Nov 11, 2022
What does
llvm-config --system-libsreport? For cross-compiled builds we link libatomic here:rust/compiler/rustc_llvm/build.rs
Line 248 in b7b7f27
pkubaj commentedon Nov 12, 2022
FreeBSD doesn't have libatomic. LLVM is used in the base system, libatomic is GCC's component.
pkubaj commentedon Nov 12, 2022
And yes, I build natively.
nikic commentedon Nov 12, 2022
If FreeBSD doesn't have libatomic, what library provides atomic libcalls instead? I found https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230888 which makes it sound like these are supposed to be provided by compiler-rt (which is super suspicious, because
__atomicbuiltins must be provided by a shared object with a globally shared mutex, not a static library).In any case, this sounds like an issue in FreeBSD, not something that can/should be addressed on the Rust/LLVM side.
pkubaj commentedon Nov 12, 2022
Yes, compiler_rt is used. Is it possible to disable generating those atomic calls?
pkubaj commentedon Nov 15, 2022
I succeeded to build after installing gcc, adding appriopriate -L flag to RUSTFLAGS and modifying compiler/rustc_llvm/build.rs to always add -latomic and -lz (that was also necessary) on powerpc (not just for crosscompiling).
apiraino commentedon Nov 15, 2022
@pkubaj do you consider this issue as resolved? If yes, can you close it? I understand you had to manually patch
rustcto compile the target. Do you think that your patch would be useful for a PR upstream in rustc?thanks @nikic for the support
pkubaj commentedon Nov 17, 2022
Not really fixed, since I needed to patch build.rs. I'll send a PR.
Rollup merge of rust-lang#104572 - pkubaj:patch-1, r=cuviper
rust: Upgrade to version 1.65.0.
Auto merge of rust-lang#104572 - pkubaj:patch-1, r=cuviper
Auto merge of #104572 - pkubaj:patch-1, r=cuviper
rust: Upgrade to version 1.66.1.
Auto merge of #104572 - pkubaj:patch-1, r=cuviper
Auto merge of #104572 - pkubaj:patch-1, r=cuviper
rust: Upgrade to version 1.66.1.
rust: Upgrade to version 1.66.1.
rust: Upgrade to version 1.66.1.