-
Notifications
You must be signed in to change notification settings - Fork 51
Extremely long compile times when compiling examples/sync.rs with nightly compiler #109
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
Do you have insane compile times compiling other rust projects? What's the CPU/mem utilisation during that time? |
I'll guess you have a very low powered device and 90% of your CPU/mem is being used by windows to monitor you and send a real time voice/video feed to the central machine learning center. |
Hello, thanks for the quick reply, i just woke up and it did finish compiling after 6 hours and 40 minutes, but when i try to run it the executable overflows its stack and crashes.
no, this is the only dependency that has caused the issue so far. my CPU is a Intel i7-4770K (8) @ 3.5GHz, 32 GB of DDR3 RAM rustc uses one CPU core and about 750MB of memory during the phase where it is slow
the same behavior occurs on a Linux machine with a Intel i5-2400 (4) @ 3.400GHz, 20 GB of RAM, and don't you think the "haha windows 10 is spying on you all the time" joke is getting a bit old? Best regards, Earthnuker |
on a fresh checkout it builds for me in a bit over a minute.
after that I built the examples
well, I doubt android, ios or macos are much better. why do you think amazon built alexa if not to spy on you? |
on a fresh checkout
i tried switching to the latest |
@earthnuker, you can try cross-compiling from linux or WSL: https://github.com/rust-embedded/cross Also, @dvc94ch, you gotta remember, not everybody is uncomfortable being spied on. Some people don't care how much corporations are being paid to manipulate them as long as they're handing out free stuff. |
We can probably leave the spying stuff, it is admittedly off topic. You
could try using the lld linker. Linking takes a lot of ram, I assume that's
where it's hanging.
…On Sat, Nov 27, 2021, 21:26 Hunter Trujillo ***@***.***> wrote:
@earthnuker <https://github.com/Earthnuker>, you can try cross-compiling
from linux or WSL:
https://github.com/rust-embedded/cross
Also, @dvc94ch <https://github.com/dvc94ch>, you gotta remember, not
everybody is uncomfortable being spied on. Some people don't care how much
corporations are being paid to manipulate them as long as they're handing
out free stuff.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#109 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFVDL7TYP5ZF52MF2SI6GDUOE5GRANCNFSM5I3THPXQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
using a cross compiler does not solve the issue
as i said before, this machine has 32 GB of memory, the server i'm compiling on has 20 GB of memory, and the rust compiler barely uses a gigabyte of memory |
@earthnuker if you can use WSL to cross compile the program, and it can run on Windows, I think that's a reasonable workaround. |
thing i tried so far:
why would using WSL fix the issue? update: compiling in WSL also hangs at |
don't know what to tell you other than maybe try a different linker |
tried with [target.x86_64-pc-windows-msvc]
rustflags = [
"-C","linker-flavor=lld-link"
] no change update: did some more testing, stripped out all dependencies that are not needed, so now my Cargo.toml is [package]
name = "ipfs_test"
version = "0.1.0"
edition = "2021"
[dependencies]
async-std = { version = "1.10.0", features = ["attributes"] }
ipfs-embed = "0.22.4"
libipld = "0.12.0" and my code is use ipfs_embed::{generate_keypair, Config, Ipfs};
use libipld::store::DefaultParams;
#[async_std::main]
async fn main() {
let mut config = Config::new("out".as_ref(), generate_keypair());
config.network.kad = None;
let a = Ipfs::<DefaultParams>::new(config).await.unwrap();
} that seems to be the minimum necesarry to reproduce the issue for me, as soon as i remove the line that calls the |
Running your sample on Linux (target
Maybe you have some global Edit: Added said repo at https://github.com/wngr/test-109, CI job works even w/ |
did some more testing:
i also i pushed a second commit to the test repo that removes the |
the github CI job with |
So I tried your reproducer, which also hangs for me using nightly. However, with stable everything completes in a timely manner. Great, if you could find the issue causing this. But given that this is only reproducible using the nightly compiler, I suggest to wait for the next stable Rust release. |
just tried it with a stable compiler, compiles fine, still crashes with a stack overflow when trying to execute on windows, runs fine on linux |
I have the same compile time issue when running on |
I’m also hitting this on 1.57, compiler phase |
There’s a rustc bug in the vicinity of “deeply nested decorator types” — libp2p definitely loves those. |
fixed in Rust 1.59 |
Hello everyone,
after copying the content of
examples/sync.rs
into an empty rust project and adding the following versions of the dependencies:when trying to compile it with either the latest stable (
rustc 1.56.1 (59eed8a2a 2021-11-01)
) or nightly (rustc 1.58.0-nightly (dd549dcab 2021-11-25)
)nightly-x86_64-pc-windows-msvc
toolchain on Windows 10 i get compile time exceeding 2 hours, i can provide a verbose compiler log if required.Best regards,
Earthnuker
The text was updated successfully, but these errors were encountered: