[SOLVED] Static snapshots server down?


#1

Hello, I’m trying to compile Rust for Android and it seems this is blowing up https://github.com/rust-lang/rust/blob/master/src/etc/snapshot.py#L39 … is this url (https://static.rust-lang.org/stage0-snapshots) not functioning anymore?

I just tried downloading https://static.rust-lang.org/stage0-snapshots/rust-stage0-2015-08-11-1af31d4-x86_64-linux-7df8ba9dec63ec77b857066109d4b6250f3d222f.tar.bz2 which seems valid according to NixOS ( https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/compilers/rustc/generic.nix#L79 ), with many of the values obtained from this: https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/compilers/rustc/default.nix file.

I’m overriding the configureFlags to rebuild rust with Android support by passing the new flags here: https://github.com/sjmackenzie/fractalide/blob/fractalide/fvm/fvm-android/default.nix#L14

The below is the error I’m getting… I think it is due to the server being down…

$ nix-build --argstr debug true -A fvm-android
...
llvm[1]: ***** Completed Release Build
make[1]: Leaving directory '/tmp/nix-build-rustc-2015-11-01-g1a2eaff.drv-6/rust-1a2eaff/x86_64-unknown-linux-gnu/llvm'
fetch: x86_64-unknown-linux-gnu/stage0/bin/rustc
determined most recent snapshot: rust-stage0-2015-08-11-1af31d4-linux-x86_64-7df8ba9dec63ec77b857066109d4b6250f3d222f.tar.bz2
Traceback (most recent call last):
  File "/tmp/nix-build-rustc-2015-11-01-g1a2eaff.drv-6/rust-1a2eaff/src/etc/get-snapshot.py", line 78, in <module>
    main(sys.argv)
  File "/tmp/nix-build-rustc-2015-11-01-g1a2eaff.drv-6/rust-1a2eaff/src/etc/get-snapshot.py", line 66, in main
    get_url_to_file(url, dl)
  File "/tmp/nix-build-rustc-2015-11-01-g1a2eaff.drv-6/rust-1a2eaff/src/etc/snapshot.py", line 163, in get_url_to_file
    raise Exception("failed to fetch url")
Exception: failed to fetch url

/sjm


#2
  rust = rustcMaster.overrideDerivation (oldAttrs: {
    configureFlags = ["--target=arm-linux-androideabi --arm-linux-androideabi-ndk=${ndk-standalone-toolchain}"]
    ++ [ "--enable-local-rust" "--local-rust-root=$snapshot" "--enable-rpath" ]
    ++ [ "--release-channel=stable" ]
    # ++ [ "--jemalloc-root=${jemalloc}/lib"
    ++ [ "--default-linker=${stdenv.cc}/bin/cc" "--default-ar=${stdenv.cc.binutils}/bin/ar" ]
    ++ stdenv.lib.optional (stdenv.cc.cc ? isClang) "--enable-clang";
    });

I needed to include the --local-rust-root=...