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

failed to install rustc from source code,error unknown token. #25699

Closed
ggaaooppeenngg opened this issue May 22, 2015 · 8 comments
Closed

failed to install rustc from source code,error unknown token. #25699

ggaaooppeenngg opened this issue May 22, 2015 · 8 comments

Comments

@ggaaooppeenngg
Copy link

<stdin>:1:24: 1:25 error: unknown start of token: `
<stdin>:1 (A.) the Drop impl for `D` instantiates `D` at 'a directly,
                                 ^
thread '<unnamed>' panicked at 'Box<Any>', /home/tuoye.gp/workspace/rust/src/libsyntax/parse/lexer/mod.rs:167
thread '<main>' panicked at 'called `Result::unwrap()` on an `Err` value: Any', /home/tuoye.gp/workspace/rust/src/libcore/result.rs:729
/home/tuoye.gp/workspace/rust/mk/docs.mk:264: recipe for target 'doc/rustc_typeck/index.html' failed
make[1]: *** [doc/rustc_typeck/index.html] Error 101
make[1]: Leaving directory '/home/tuoye.gp/workspace/rust'
/home/tuoye.gp/workspace/rust/mk/install.mk:16: recipe for target 'install' failed
make: *** [install] Error 2

I got the message above,how to fix it?

@brson
Copy link
Contributor

brson commented May 22, 2015

Urgh. This should never have gotten through the CI bots. Some rules must be being built by the install target that aren't under the normal build.

@brson
Copy link
Contributor

brson commented May 22, 2015

I will try to look into this today while I'm investigating other nightly breakage.

@pnkfelix
Copy link
Member

I assume this is being introduced by the doc comment I wrote here:

/// (A.) the Drop impl for `D` instantiates `D` at 'a directly,

So the two bugs here are:

  1. Fix the above doc comment in dropck. (Presumably just replace the indents with nested bullets.)
  2. What rules do we need to change to synchronize make install with the CI bots (to catch this kind of case in the future) -- presumably its happening because make install attempts to build documentation for rust itself ... which sounds a lot like good old: make targets: consider making doc generation part of default target #14424 ; see also Buildbot should not only test "make check" but also "make install" #19698

brson added a commit to brson/rust that referenced this issue May 22, 2015
The install target depends on compiler-docs but 'all' does not.
This means that running 'make && make install' will run additional
doc builds and tests during installation, which hides bugs in
the build.

For now this just unconditionally stops building compiler docs.
@brson
Copy link
Contributor

brson commented May 22, 2015

I posted a PR to stop building compiler docs. It does not fix the bug in the docs though. #25717

@brson
Copy link
Contributor

brson commented May 27, 2015

Fixed.

@brson brson closed this as completed May 27, 2015
@brson
Copy link
Contributor

brson commented May 27, 2015

Er, oh yeah, the underlying problem is not fixed, that the docs have broken examples.

@brson brson reopened this May 27, 2015
@brson
Copy link
Contributor

brson commented May 27, 2015

Sigh, actually, I'll call this fixed since the title of the bug is about install failure and that works now. Broken examples in the rustc crate are nbd to me atm.

@brson brson closed this as completed May 27, 2015
pnkfelix added a commit to pnkfelix/rust that referenced this issue Jun 3, 2015
This was causing `rustdoc` to interpret the part starting with
`(A.) ...` as a code block based on its four-space indentation,
which then was treated by `rustdoc` as a *Rust* code snippet,
and thus was attempting (and failing) to parse my english as
Rust code. Thus causing the compiler-docs build to fail.

Independently, we should probably change `rustdoc` to not interpret
four-space indents as code that needs to be tested; it seems too
perilous to me at least.

(But the formatting here needed to be changed either way.)

cc Issue rust-lang#25699.
Manishearth added a commit to Manishearth/rust that referenced this issue Jun 4, 2015
…=Manishearth

Fix the dropck doc formatting to avoid hitting four-space indent.

This was causing `rustdoc` to interpret the part starting with `(A.) ...` as a code block based on its four-space indentation, which then was treated by `rustdoc` as a *Rust* code snippet, and thus was attempting (and failing) to parse my english as Rust code. Thus causing the compiler-docs build to fail.

Independently, we should probably change `rustdoc` to not interpret four-space indents as code that needs to be tested; it seems too perilous to me at least.

(But the formatting here needed to be changed either way.)

cc Issue rust-lang#25699.
@sononix
Copy link

sononix commented Oct 9, 2015

Just downloaded a fresh install from git and ran on a virgin arch linux box running on AWS and getting this error again

cfg: using CC=gcc (CFG_CC)
cfg: disabling valgrind run-pass tests
cfg: including prepare rules
cfg: including dist rules
cfg: including install rules
cleaning destination tmp/dist/rustc-1.5.0-dev-x86_64-unknown-linux-gnu-image
prepare: tmp/dist/rustc-1.5.0-dev-x86_64-unknown-linux-gnu-image/bin
prepare: tmp/dist/rustc-1.5.0-dev-x86_64-unknown-linux-gnu-image/lib
prepare: tmp/dist/rustc-1.5.0-dev-x86_64-unknown-linux-gnu-image/lib/rustlib/etc
prepare: tmp/dist/rustc-1.5.0-dev-x86_64-unknown-linux-gnu-image/share/man/man1
rustc: x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc
/root/Downloads/rust/mk/target.mk:164: recipe for target 'x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib/stamp.rustc' failed
make[1]: *** [x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib/stamp.rustc] Killed
make[1]: Leaving directory '/root/Downloads/rust'
/root/Downloads/rust/mk/install.mk:16: recipe for target 'install' failed
make: *** [install] Error 2

any ideas

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

No branches or pull requests

5 participants