Rustup: Requires >500Mb of memory to install rustc

Created on 5 Dec 2019  Â·  9Comments  Â·  Source: rust-lang/rustup

Describe the problem you are trying to solve
I was trying to install rustc on a nano micro VM with only 500Mb of RAM, the installer runs out of memory, if I install on a machine with more RAM and rsync the files using rustc works well .

Describe the solution you'd like
Either working in low mem environments or publish the minimum system requirements. Currently it just crashes without reporting the cause.

I still have this VM so let me know if I can do anything to help testing the issue.

enhancement

Most helpful comment

This is related to a conversation we had here: https://github.com/rust-lang/rustup/issues/2128#issuecomment-554730037

We would need a way to detect the available RAM limits in a clean way to automate this; otherwise users of deliberately limited VMs need to set RUSTUP_UNPACK_RAM to something suitable in their profile.

All 9 comments

This is related to a conversation we had here: https://github.com/rust-lang/rustup/issues/2128#issuecomment-554730037

We would need a way to detect the available RAM limits in a clean way to automate this; otherwise users of deliberately limited VMs need to set RUSTUP_UNPACK_RAM to something suitable in their profile.

Also, its worth looking at things like this -
https://internals.rust-lang.org/t/rustc-build-memory-requirement/7457 -
there's little point having the installer be radically better than the
compiler.

I recall a longer conversation back on the PR that merged the parallel
unpacking install code around this as well.

One thing we could do in principle is handle out of RAM situations better,
but sadly rust largely treats malloc failures as fatal rather than a
handlable error, without some serious voodoo I'm not familiar enough with
to work on yet.

-Rob

On Fri, 6 Dec 2019 at 10:51, Daniel Silverstone notifications@github.com
wrote:

This is related to a conversation we had here: #2128 (comment)
https://github.com/rust-lang/rustup/issues/2128#issuecomment-554730037

We would need a way to detect the available RAM limits in a clean way to
automate this; otherwise users of deliberately limited VMs need to set
RUSTUP_UNPACK_RAM to something suitable in their profile.

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/rust-lang/rustup/issues/2145?email_source=notifications&email_token=AADZ7XT7RUT7FT4QK64PYVTQXFZWVA5CNFSM4JWARXD2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGCIZGQ#issuecomment-562334874,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AADZ7XQGHWL23PYTR4TLSQTQXFZWVANCNFSM4JWARXDQ
.

I have the same problem - a embedded device with 256 MB RAM. How to solve it?

Start by setting RUSTUP_UNPACK_RAM=128000000 or something like that.

-Rob

On Tue, 28 Jan 2020 at 03:48, Michał Hanusek notifications@github.com
wrote:

I have the same problem - a embedded device with 256 MB RAM. How to solve
it?

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/rust-lang/rustup/issues/2145?email_source=notifications&email_token=AADZ7XRFCLGOXNENUH7OOZTQ73X3ZA5CNFSM4JWARXD2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJ7YTIY#issuecomment-578783651,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AADZ7XW45VBIL734G6T3VATQ73X3ZANCNFSM4JWARXDQ
.

I managed to install on a machine with more ram and copy the files across.

I successfully installed rustc after adjusting the unpick size
export RUSTUP_UNPACK_RAM=200000000

I successfully installed rustc after adjusting the unpick size
export RUSTUP_UNPACK_RAM=200000000

Haven't managed to get this working. Fails with thread 'main' panicked at 'RUSTUP_UNPACK_RAM must be larger than 220000000', src/dist/component/package.rs:200:13

And still 220mb is too large for my environment... so it seems there is no way to install rustc...?

We are working toward making it more possible, but frankly if you're not able to give up 220M to install rust, you're not going to be able to build very complex programs.

Fixed by #2707

Was this page helpful?
0 / 5 - 0 ratings