-
Notifications
You must be signed in to change notification settings - Fork 107
warning: failed to connect to jobserver from environment variable #1437
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
Comments
Further note, it seems it is always associated with the same crates. Not sure what the pattern is. Here are some examples. Two are proc-macros, but some of the other ones aren't:
|
I have no clue what causes this. The only place where this error is triggered should be when rustc itself is creating the compiler session, which is before cg_clif runs. |
I think this may be related to
rustc_codegen_cranelift/src/global_asm.rs Line 156 in 39f0dac
|
That seems like a massive hack. Am I reading this correctly that it simply calls out to rustc llvm backend for global assembly? Won't these extra processes cause a significant slowdown in build times (which I thought was the main point of this backend compared to llvm)? Probably will be even worse on Windows (iirc spawning processes there is much slower than on Linux, but it has been a while since I used Windows). EDIT: Also that raw string hack is brittle. It should ideally search for the longest occurance of consecutive |
Yes
Yes, but only if you actually use inline asm. And also I'm using
Windows compatibility is the whole reason I'm doing this. On Linux and macOS I could call into the gnu assembler as it is installed by default on most systems together with the rest of the C compiler toolchain, but Windows doesn't ship with it and neither does rustc. MSVC does have an assembler, but it's assembly syntax is not compatible with the gnu assembler and thus not usable for implementing rust inline asm. |
Ah that makes sense. Sigh.
To be fair, I don't use inline or global assembly. But apparently several of my dependencies do? I don't think I'm using anything really unusual, so it is probably some foundational crate that is doing this in the name of performance, though I thought most of them used intrinsics instead for SIMD. So that means many full builds will be affected by this probably? |
Removing the |
A couple of intrinsics are implemented in cg_clif using inline asm because they are way to complex to emulate using handrolled clif ir and cranelift doesn't have instructions that directly lower to the respective cpu instructions. |
Hi @bjorn3,
Thank you for finding a solution! I'm running into the same warnings. I tried calling How did you remove this env var? |
Cargo sets this env var for every rustc it runs. I changed cg_clif itself to remove it before spawning another rustc instance. It hasn't yet been synced back to the rust repo yet, so rustc nightlies don't have the fix yet. |
…orn3 Subtree sync for rustc_codegen_cranelift The main highlight this time is a fix for rust-lang/rustc_codegen_cranelift#1437. r? `@ghost` `@rustbot` label +A-codegen +A-cranelift +T-compiler
The fix should be on nightly now. |
🙏 thank you 🙇 |
Using
RUSTFLAGS="-Zcodegen-backend=cranelift" cargo +nightly build
I get a lot of the following warnings building my project:This doesn't appear when building with the standard native LLVM toolchain on either nightly or stable.
Version info:
Project for reproduction (haven't tried it on other things, don't know how widespread it is): https://github.com/VorpalBlade/chezmoi_modify_manager (tested on commit ec6cc2477dd5dca4fff5d2b972aa18ced86df9b8).
The text was updated successfully, but these errors were encountered: