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

Git tip fails to build for me on Fedora 24 (using Rust 1.10.0) #2929

Closed
siebenmann opened this issue Jul 29, 2016 · 5 comments · Fixed by #7236
Closed

Git tip fails to build for me on Fedora 24 (using Rust 1.10.0) #2929

siebenmann opened this issue Jul 29, 2016 · 5 comments · Fixed by #7236
Labels
A-diagnostics Area: Error and warning messages generated by Cargo itself.

Comments

@siebenmann
Copy link

I'm trying to build Rust and Cargo from source because I want to put them in a non-standard (non-system) location, and building Cargo fails on my 64-bit Fedora 24 system with an error in the 'make' phase. Here is a full transcript of the make (with the prequel steps included because why not, it reproduces easily).

$ cd /tmp
$ git clone https://github.com/rust-lang/cargo
$ cd cargo
$ ./configure
[nattering deleted]
$ make
/usr/bin/python2.7 /tmp/cargo//src/etc/dl-snapshot.py x86_64-unknown-linux-gnu
running: curl -o target/dl/cargo-nightly-x86_64-unknown-linux-gnu.tar.gz https://static.rust-lang.org/cargo-dist/2016-03-21/cargo-nightly-x86_64-unknown-linux-gnu.tar.gz
extracting cargo-nightly-x86_64-unknown-linux-gnu/cargo/manifest.in
extracting cargo-nightly-x86_64-unknown-linux-gnu/cargo/bin/cargo
extracting cargo-nightly-x86_64-unknown-linux-gnu/cargo/share/zsh/site-functions/_cargo
extracting cargo-nightly-x86_64-unknown-linux-gnu/cargo/share/man/man1/cargo.1
extracting cargo-nightly-x86_64-unknown-linux-gnu/cargo/share/doc/cargo/LICENSE-THIRD-PARTY
extracting cargo-nightly-x86_64-unknown-linux-gnu/cargo/share/doc/cargo/LICENSE-APACHE
extracting cargo-nightly-x86_64-unknown-linux-gnu/cargo/share/doc/cargo/LICENSE-MIT
extracting cargo-nightly-x86_64-unknown-linux-gnu/cargo/share/doc/cargo/README.md
extracting cargo-nightly-x86_64-unknown-linux-gnu/cargo/etc/bash_completion.d/cargo
touch target/snapshot/bin/cargo
/u/cks/bin/bin.i386-linux/rustc -V
rustc 1.10.0-dev
target/snapshot/bin/cargo --version
cargo 0.10.0-nightly (132b82d 2016-03-19)
target/snapshot/bin/cargo build --target x86_64-unknown-linux-gnu --manifest-path /tmp/cargo//Cargo.toml --release   
error: unexpected character in cfg `, expected parens, a comma, an identifier, or a string
Makefile:104: recipe for target 'cargo-x86_64-unknown-linux-gnu' failed
make: *** [cargo-x86_64-unknown-linux-gnu] Error 101

On further testing, this appears to be something in my $HOME that Cargo doesn't like. It is not telling me what, and it is not $HOME/.cargo (because I just deleted that entire directory hierarchy). strace is not particularly revealing about what what file or configuration cargo dislikes.

@alexcrichton
Copy link
Member

Could you gist the logs of strace? Also enabling RUST_LOG=debug may help, but I'm not sure.

This works locally for me :(

@siebenmann
Copy link
Author

I've put up a gist of both 'strace -f' and the 'RUST_LOG=debug' output here: https://gist.github.com/siebenmann/656b1a1ff1a89adc0df47e65a40f5cba

@alexcrichton
Copy link
Member

It looks like there may be something intercepting calls to the rustc binary and something is inserting the byte 0x1b (esc) in the output stream maybe? (something seems to be calling tput at least)

Does that sound familiar?

@siebenmann
Copy link
Author

siebenmann commented Jul 30, 2016

Oh. That would be the wrapper script that I had to put around rustc because Rust 1.10.0 doesn't turn off bold quite correctly (or at least it doesn't turn it off in a way that xterm likes). I've fixed my wrapper script to only do that when standard output is a terminal and now the 'make' works.

(I guess I should file a bug against rust about that behavior. Rust's de-bolding issues turned out to not be due to any Rust problem but instead an ancient $HOME/.terminfo file I had.)

I think that the error message that's produced here is at best unhelpful, but that's probably another bug.

@alexcrichton
Copy link
Member

Yeah we could definitely have a better error message here! Tagging as such.

@alexcrichton alexcrichton added the A-diagnostics Area: Error and warning messages generated by Cargo itself. label Jul 31, 2016
bors added a commit that referenced this issue Aug 12, 2019
Better error messages when `rustc` discovery parsing fails.

This adds a little extra info to help debug when cargo fails to parse the output from `rustc` when querying it for information.

Closes #2929
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Error and warning messages generated by Cargo itself.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants