Subject: Re: [bug#28433] [WIP] Rust update

From: Danny Milosavljevic <[email-masked]>
Date: Tue, 28 Nov 2017 11:12:08 +0100

Hi ng0,

I've attached the current version of gnu/packages/rust.scm .

For some reason, Rust bootstrap ignores the environment variable AR_x86_64_unknown_linux_gnu even though it doesn't ignore other similar variables (CC_x86_64_unknown_linux_gnu etc).  It also ignored config.toml's [target.x86_64-unknown-linux-gnu].  Therefore, the bootstrapping fails when trying to compile the x86_64 version (the i686 version works).

To try it, copy the attached file to gnu/packages/rust.scm , overwriting the latter file.

Then just invoke

$ ./pre-inst-env guix build rustc

It will fail like explained above, with the log message:

------------------------------------------------------------------------------------------------------
running: /tmp/guix-build-rustc-1.22.0.drv-0/rustc-1.22.0-src/build/bootstrap/debug/bootstrap build -v
finding compilers
CC_x86_64-unknown-linux-gnu = "/gnu/store/5sv5zy2kgg6iaqyv8zw49w4243j0xkd0-gcc-5.4.0/bin/gcc"
AR_x86_64-unknown-linux-gnu = "/gnu/store/5sv5zy2kgg6iaqyv8zw49w4243j0xkd0-gcc-5.4.0/bin/ar"
CC_x86_64-unknown-linux-gnu = "/gnu/store/5sv5zy2kgg6iaqyv8zw49w4243j0xkd0-gcc-5.4.0/bin/gcc"
AR_x86_64-unknown-linux-gnu = "/gnu/store/5sv5zy2kgg6iaqyv8zw49w4243j0xkd0-gcc-5.4.0/bin/ar"
CC_x86_64-unknown-linux-gnu = "/gnu/store/5sv5zy2kgg6iaqyv8zw49w4243j0xkd0-gcc-5.4.0/bin/gcc"
AR_x86_64-unknown-linux-gnu = "/gnu/store/5sv5zy2kgg6iaqyv8zw49w4243j0xkd0-gcc-5.4.0/bin/ar"
CXX_x86_64-unknown-linux-gnu = "/gnu/store/5sv5zy2kgg6iaqyv8zw49w4243j0xkd0-gcc-5.4.0/bin/g++"
CXX_x86_64-unknown-linux-gnu = "/gnu/store/5sv5zy2kgg6iaqyv8zw49w4243j0xkd0-gcc-5.4.0/bin/g++"
running sanity check
thread 'main' panicked at '

couldn't find required command: "/gnu/store/5sv5zy2kgg6iaqyv8zw49w4243j0xkd0-gcc-5.4.0/bin/ar"
------------------------------------------------------------------------------------------------------

I've had something similar before - see CFG_LOCAL_RUST_ROOT substitution in rust.scm - but I thought I fixed it.

So the next step would have someone find out why it doesn't pick up the value from the environment variable "AR_x86_64_unknown_linux_gnu".