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

Documentation neither installed nor installable on tier 2+ platforms #69525

Closed
SolraBizna opened this issue Feb 27, 2020 · 9 comments · Fixed by #92800
Closed

Documentation neither installed nor installable on tier 2+ platforms #69525

SolraBizna opened this issue Feb 27, 2020 · 9 comments · Fixed by #92800
Assignees
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. O-Arm Target: 32-bit Arm processors (armv6, armv7, thumb...), including 64-bit Arm in AArch32 state T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.

Comments

@SolraBizna
Copy link

Problem

I'm working in Rust on a Pinebook Pro running ARM64 Debian GNU/Linux. I've been Rusty for a few years now, and one of my favorite features is the extensive offline documentation. However, on this computer: rustup doc gives an error message instead of documentation; the documentation doesn't appear to be present; and attempts to explicitly install the documentation have all failed.

Steps

  1. Install Rust the usual way on ARM64 Linux (pipe https://sh.rustup.rs into a shell)
  2. Try rustup doc (it fails)
  3. Try rustup component add rust-docs (it fails)
  4. Try rustup component add --toolchain stable-aarch64-unknown-linux-gnu rust-docs (it fails)

I installed Rust about a month ago and noticed the lack of documentation then, it's only now that it's become a major problem for me. I attempted steps 2-4 just now after rustup update, rather than after a completely fresh install.

Notes

Output of rustup --version: rustup 1.21.1 (7832b2ebe 2019-12-20)

Output of rustup show:

Default host: aarch64-unknown-linux-gnu
rustup home:  /home/sbizna/.rustup

installed toolchains
--------------------

stable-aarch64-unknown-linux-gnu
nightly-aarch64-unknown-linux-gnu

active toolchain
----------------

stable-aarch64-unknown-linux-gnu (default)
rustc 1.41.1 (f3e1a954d 2020-02-24)

Output of rustup doc (even though rust-lang/rustup#2116 should be in effect?):

error: couldn't open browser
error: caused by: command 'xdg-open (internal)' did not execute successfully; ex
it code: 4
command stderr:
gio: file:///home/sbizna/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/sha
re/doc/rust/html/index.html: Error when getting information for file “/home/sbiz
na/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/share/doc/rust/html/index
.html”: No such file or directory

Output of rustup component add --toolchain stable-aarch64-unknown-linux-gnu rust-docs:

error: toolchain 'stable-aarch64-unknown-linux-gnu' does not contain component '
rust-docs' for target 'aarch64-unknown-linux-gnu'
@kinnison
Copy link
Contributor

I can confirm the behaviour you're stating - that aarch64-unknown-linux-gnu lacks the rust-docs component. The stable channel is only offering rust-docs for the tier one platforms right now. I'm not sure if that's intentional, but it's not rustup's fault.

@kinnison kinnison transferred this issue from rust-lang/rustup Feb 27, 2020
@kinnison
Copy link
Contributor

I'm not sure whose responsibility it is to decide which platforms get the rust-docs component offered to them, but @SolraBizna clearly would like them available on aarch64 linux.

@jonas-schievink jonas-schievink added C-enhancement Category: An issue proposing an enhancement or a PR with one. O-Arm Target: 32-bit Arm processors (armv6, armv7, thumb...), including 64-bit Arm in AArch32 state T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Feb 27, 2020
@12101111
Copy link
Contributor

12101111 commented Mar 20, 2020

This issue is not ARM only, rust-docs of all non tier1 platforms is disable on dist CI builders in bd28641
If the the documentations have no difference on each linux target, we can let rustup download rust-docs from x86_64-unknown-linux-gnu
EDIT: A workaround is install a x86_64-unknown-linux-gnu toolchain in rustup and create a soft link in ~/.rustup/toolchains/<your toolchains>/share/doc/rust/html

@SolraBizna
Copy link
Author

Given the relatively low demand for non-tier-1 doc packages, I would be happy if rustup were just a little smarter about this. Ideally, rustup doc ought to say something like "documentation is not built for non-tier-1 targets". Perhaps it could also be extended to automatically download and use the documentation for an "equivalent" tier 1 platform, or maybe to steer the user toward instructions for building their own documentation package.

@kinnison
Copy link
Contributor

@SolraBizna In theory, if the channel manifest were extended to contain enough information for rustup to know that then sure it'd be possible. However platforms move between tiers of support without rustup necessarily needing to be involved so it wouldn't be part of rustup itself.

@12101111 If you make that link, there's the possibility rustup will get confused in the future, just to warn you.

@Logarithmus
Copy link
Contributor

I don't understand, why not just build all the documentation (rustdoc & the books) once and then share it between all triples?
I guess documentation is same for all architectures.

@SolraBizna
Copy link
Author

There are differences. The big one I know about is CPU-specific inlines for SIMD and such. usize's size also differs between 32- and 64-bit architectures. Both of these are reflected in the documentation.

@nlfiedler
Copy link

A year later, with Apple M1 bringing ARM to more developer's desktops, this is a more pressing issue.

@SolraBizna
Copy link
Author

At some point in the last year, aarch64-unknown-linux-gnu became a tier 1 platform, which would have solved this problem for me personally, but not for people on other platforms that are still tier 2 or more. But now, against everyone's predictions, I find myself using an aarch64-apple-darwin machine. Which is tier 2. Which means I'm in the same boat again. Heh.

I assume it's not an easy process to just build the docs myself on my own machine?

@SolraBizna SolraBizna changed the title Documentation neither installed nor installable on ARM64 Linux Documentation neither installed nor installable on tier 2+ platforms Apr 19, 2021
@ehuss ehuss self-assigned this Jan 12, 2022
@bors bors closed this as completed in bcb093e Jan 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. O-Arm Target: 32-bit Arm processors (armv6, armv7, thumb...), including 64-bit Arm in AArch32 state T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants