Skip to content
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

rust won't install on ExFAT filesystem #2680

Open
ghost opened this issue Feb 23, 2021 · 7 comments
Open

rust won't install on ExFAT filesystem #2680

ghost opened this issue Feb 23, 2021 · 7 comments

Comments

@ghost
Copy link

ghost commented Feb 23, 2021

Problem
Attempting to install rust via rustup-init on Windows 64bit on a ExFAT filesystem produces the error:

error: could not create link from 'X:\cargo\bin\rustup.exe' to 'X:\cargo\bin\rustfmt.exe'

Steps
Where E is formated as ExFAT and rustup-init.exe is running from C: and has a filesystem of NTFS. Attempt to start the installer:

Welcome to Rust!

This will download and install the official compiler for the Rust
programming language, and its package manager, Cargo.

Rustup metadata and toolchains will be installed into the Rustup home directory, located at:

E:\rust

This can be modified with the RUSTUP_HOME
environment variable.

The Cargo home directory located at:

E:\cargo

This can be modified with the CARGO_HOME
environment variable.

The cargo, rustc, rustup and other commands will
be added to Cargo's bin directory, located at:

E:\cargo\bin

This path will then be added to your PATH
environment variable by modifying the
HKEY_CURRENT_USER/Environment/PATH
registry key.

You can uninstall at any time with rustup self
uninstall and these changes will be reverted.

Current installation options:

default host triple: x86_64-pc-windows-msvc
default toolchain: stable (default)
profile: default
modify PATH variable: yes

  1. Proceed with installation (default)
  2. Customize installation
  3. Cancel installation

1

error: could not create link from
'E:\cargo\bin\rustup.exe' to
'E:\cargo\bin\rustfmt.exe'

Press the Enter key to continue.

Possible Solution(s)
Many other programming languages don't have this issue because they don't rely on links(golang, ruby, php, python etc.). Maybe make it so rust works without links.

Notes

Output of rustup --version: n/a
Output of rustup show: n/a

@ghost ghost added the bug label Feb 23, 2021
@kinnison
Copy link
Collaborator

ExFAT does not support filesystem-level links which are required for rustup's proxy functionality as you surmised in your 'possible solutions'. In theory we could do without the links by creating copies of rustup for each proxy but that would be a significantly wasteful use of disk space.

At this time, this is a side-effect of implementation decisions, not a bug, and also not something we see as urgent to ameliorate, though if you have an idea of how to do this efficiently on ExFAT then I'd be interested to hear.

@rbtcollins
Copy link
Collaborator

There aren't that many proxies; OTOH we'd have more updates and possible things going wrong, skew etc. I think we could design for this eventually, but given team bandwidth is sharply limited, I completely concur with the help wanted aspect.

@ghost
Copy link
Author

ghost commented Feb 23, 2021

ExFAT does not support filesystem-level links which are required for rustup's proxy functionality as you surmised in your 'possible solutions'. In theory we could do without the links by creating copies of rustup for each proxy but that would be a significantly wasteful use of disk space.

At this time, this is a side-effect of implementation decisions, not a bug, and also not something we see as urgent to ameliorate, though if you have an idea of how to do this efficiently on ExFAT then I'd be interested to hear.

So how do other programming languages get over this issue? Am i correct that for example golang makes copies of itself every time? Also what do you mean by proxy functionality?

@rbtcollins
Copy link
Collaborator

I think most of your questions about rustup itself are covered in our documentation about how rustup works and what it does.

rust, as opposed to rustup, can be unpacked on exfat, and if you want to manually install for some reason, you can probably do that just fine - I presume thats your use case? Having a portable installation on some slow MMC device you can cart around?

As for other languages, you need to compare with things like pyenv, goenv, rubyenv, not the languages themselves: rustup is not rust, it is one possible installer for rust, just one that the community maintains and supports which meets the majority of use cases.

So: if your goal is to have rust work in your environment, I don't know if anything will prevent that today - rustup won't work, but rustup is not required for rust, it is merely very convenient.

If your goal is to have rustup work, you'll need to work on a patch - sorry - and I suggest the first step would be to install on a regular NTFS volume to get a working dev environment, and use that to start building up the necessary changes to rustup.

But, going back to your presumed use case of a portable install that can be carted around: I doubt that that will work well; rust requires system linkers - the MS visual C build tools - to link executables, and you'll need to solve making their install portable as well; you'll have to make the PATH changes on windows on every machine you port the install to, and finally rust itself is a tiny fraction of the size of most of the build volume of rust projects once the dependency graph from crates.io is considered. Making CARGO_HOME and your source code directories portable is doable, much more easily, and would solve most of the problems I suspect - unless the problems are things like locked down machines without internet access ... in which case Cargos desire for online access is going to make life difficult.

Perhaps I've missed something - in which case, let me know. But as I said to start with, we're open to supporting someone that wants to work on the ExFAT slice of the problem. The larger 'make rustup installs portable' use case is considerably more complicated, and I think will require whoever wants to work on it to spend considerable time thinking up good ways to solve the challenges mentioned above, and perhaps more not considered.

@workingjubilee
Copy link
Contributor

workingjubilee commented Apr 29, 2021

@rustbot label: +O-windows

@rustbot rustbot added the O-windows Windows related label Apr 29, 2021
@meteor-lsw
Copy link

I encountered the same error on the REFS file system of the Windows 10 operating system.

@zephms
Copy link

zephms commented Feb 2, 2023

I encountered the same error on the REFS file system of the Windows 10 operating system.

me too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants