japaric / steed

[INACTIVE] Rust's standard library, free of C dependencies, for Linux systems
519 stars 22 forks source link

Build failed with newest nightly #138

Closed tbu- closed 7 years ago

tbu- commented 7 years ago

(not sure if this is related to #136.)

$ cross --verbose build --verbose --target x86_64-unknown-linux-steed --no-default-features --features naive_ralloc 
+ "rustup" "component" "list"
+ "cargo" "fetch" "--manifest-path" "/path/to/steed/Cargo.toml"
+ "rustc" "--print" "sysroot"
+ "docker" "run" "--rm" "--user" "1000:100" "-e" "CARGO_HOME=/cargo" "-e" "CARGO_TARGET_DIR=/target" "-e" "USER=<user>" "-e" "XARGO_HOME=/xargo" "-v" "/homedir/.xargo:/xargo" "-v" "/homedir/.cargo:/cargo" "-v" "/homedir/git/steed:/project:ro" "-v" "/path/to/multirust/toolchains/nightly-x86_64-unknown-linux-gnu:/rust:ro" "-v" "/path/to/steed/target:/target" "-w" "/project" "-it" "japaric/x86_64-unknown-linux-steed:v0.1.9" "sh" "-c" "PATH=$PATH:/rust/bin \"xargo\" \"--verbose\" \"build\" \"--verbose\" \"--target\" \"x86_64-unknown-linux-steed\" \"--no-default-features\" \"--features\" \"naive_ralloc\""
+ "rustc" "--print" "sysroot"
+ "rustc" "--print" "target-list"
+ "cargo" "build" "--release" "--manifest-path" "/tmp/xargo.9SQC2MWHBD3W/Cargo.toml" "--target" "x86_64-unknown-linux-steed" "-v" "-p" "collections"
error: failed to run `rustc` to learn about target-specific information

Caused by:
  process didn't exit successfully: `rustc - --crate-name ___ --print=file-names --sysroot /xargo --crate-type bin --crate-type rlib --target x86_64-unknown-linux-steed` (exit code: 101)
--- stderr
error: Error loading target specification: Field linker-flavor in target specification is required
  |
  = help: Use `--print target-list` for a list of built-in targets

error: `"cargo" "build" "--release" "--manifest-path" "/tmp/xargo.9SQC2MWHBD3W/Cargo.toml" "--target" "x86_64-unknown-linux-steed" "-v" "-p" "collections"` failed with exit code: Some(101)
note: run with `RUST_BACKTRACE=1` for a backtrace
aleksander commented 7 years ago

Look like x86_64-unknown-linux-steed.json is outdated. It should contain: "linker-flavor": "ld"

tbu- commented 7 years ago

My docker/x86_64-unknown-linux-steed.json file:

$ cat docker/x86_64-unknown-linux-steed.json
{
    "arch": "x86_64",
    "cpu": "x86-64",
    "data-layout": "e-m:e-i64:64-f80:128-n8:16:32:64-S128",
    "env": "steed",
    "executables": true,
    "has-elf-tls": true,
    "linker": "ld.lld",
    "linker-flavor": "ld",
    "llvm-target": "x86_64-unknown-linux",
    "max-atomic-width": 64,
    "os": "linux",
    "panic-strategy": "abort",
    "pre-link-args": {
        "gcc": [
            "-Wl,--as-needed",
            "-Wl,-z,noexecstack",
            "-m64",
            "-nostartfiles"
        ]
    },
    "target-endian": "little",
    "target-family": "unix",
    "target-pointer-width": "64",
    "vendor": "unknown"
}
tbu- commented 7 years ago

Updating cross to 0.10.0 fixed this issue and resulted in #136.

aleksander commented 7 years ago

I still have this error. But I'm using xargo (v0.3.6) not cross. @tbu- did you find what is the root cause of this error?

japaric commented 7 years ago

@aleksander Is your target specification json file (it should contain linker-flavor) and rustc (it should support linker-flavor) up to date? And are you getting the same error as in the issue description?

aleksander commented 7 years ago

@japaric, my bad, sorry. I did not update x86_64-unknown-linux-steed.json.