brew install (or upgrade, reinstall) a single formula? brew update and can still reproduce the problem?brew doctor, fixed all issues and can still reproduce the problem?brew gist-logs <formula> (where <formula> is the name of the formula that failed) and included the output link?brew gist-logs didn't work: ran brew config and brew doctor and included their output with your issue?First of all, Rust works and gets compiled succesfully. My issue is that it takes 1-2 hours with 100% CPU usage on a i5 quad core with 3+ GHz (16 GB DDR3 RAM, SSD). This feels like something going haywire.
The issue only occurs in Ubuntu WSL on my Win 10 with above mentioned hardware specs.
Using original homebrew on my mac installing rust is a blaze (dunno if it uses a bottle). It also fast on my native ubuntu 18 laptop.
/home/linuxbrew/.linuxbrew/Cellar/rust/1.28.0: 43,183 files, 948.4MB, built in 102 minutes 12 seconds
Hi. I built the bottle locally and will upload it soon. So you will not have to recompile rust yourself.
But I must admit that this build takes really long and are up more than 16 GB ram on my computer too. Not sure why this is happening though ...
We recently out that compiling with -Os using gcc is probably not a good idea (at least not with gcc 5). We switched all our builds to -O2. -O2 is now used on our CI, and will be pushed to users with release 1.7.2 of brew.
This allows to build llvm with our CI: #8876
I have some hope that this change will also help for rust.
Great, will report back then.
Brew 1.7.2 has been released. Can you brew update, and try to compile this again?
Consider installing Linuxbrew in /home/linuxbrew/.linuxbrew/ if possible so that you can use precompiled binary packages (known as bottles) for non-relocatable formula like rust.
Another possible workaround for you is brew install --force-bottle rust, but no promises.
If it's an option for you, you could open a ticket with your information systems department to ask that they create a linuxbrew role account with home directory /home/linuxbrew.
The precompiled binary bottles of non-relocatable bottles can only be used if you install in /home/linuxbrew/.linuxbrew, otherwise they have to be built from source. See the documentation below. On macOS the default installation directory is /usr/local. On Linux the default installation directory is /home/linuxbrew/.linuxbrew.
Closing here. Feel free to comment on this issue if you have any news.
Got the update to rust 1.29.0. It came as a bottle and was easily installed.
Thanks!
@iMichka Hey, it seems like the bottle for rust 1.30.0 is missing. The build took approx 3 hours.
Here's an article that says you can speed up WSL ~5x by disabling Windows Defender on WSL.
See https://medium.com/@leandrw/speeding-up-wsl-i-o-up-than-5x-fast-saving-a-lot-of-battery-life-cpu-usage-c3537dd03c74
and https://glennsarti.github.io/blog/wsl-ruby-puppet/
Thanks, giving it another shot now.
Most helpful comment
Hi. I built the bottle locally and will upload it soon. So you will not have to recompile rust yourself.
But I must admit that this build takes really long and are up more than 16 GB ram on my computer too. Not sure why this is happening though ...