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

Open
siebenmann opened this Issue Jul 29, 2016 · 5 comments

2 participants

@siebenmann

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
The Rust Programming Language 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

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

@alexcrichton
The Rust Programming Language 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
siebenmann commented Jul 30, 2016 edited

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
The Rust Programming Language member

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

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