Skip to content
This repository has been archived by the owner on Dec 9, 2018. It is now read-only.

Build failed with newest nightly #138

Closed
tbu- opened this issue Apr 19, 2017 · 6 comments
Closed

Build failed with newest nightly #138

tbu- opened this issue Apr 19, 2017 · 6 comments

Comments

@tbu-
Copy link
Collaborator

tbu- commented Apr 19, 2017

(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
Copy link
Contributor

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

@tbu-
Copy link
Collaborator Author

tbu- commented Apr 19, 2017

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-
Copy link
Collaborator Author

tbu- commented Apr 19, 2017

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

@tbu- tbu- closed this as completed Apr 19, 2017
@aleksander
Copy link
Contributor

aleksander commented Apr 21, 2017

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
Copy link
Owner

japaric commented Apr 21, 2017

@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
Copy link
Contributor

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants