Skip to content

Instantly share code, notes, and snippets.

@jonahbron
Created April 6, 2020 16:47
Show Gist options
  • Save jonahbron/ffa66dae3b2861e444b2b8c1b5af966d to your computer and use it in GitHub Desktop.
Save jonahbron/ffa66dae3b2861e444b2b8c1b5af966d to your computer and use it in GitHub Desktop.
could not compile core
$ cargo +avr xbuild --target avr-unknown-unknown --verbose
WARNING: There is no root package to read the cargo-xbuild config from.
+ "rustc" "--print" "sysroot"
+ "rustc" "--print" "target-list"
+ "/home/jonah/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo" "rustc" "-p" "alloc" "--release" "--manifest-path" "/tmp/xargo.enQPopALFvIP/Cargo.toml" "--target" "avr-unknown-unknown" "-v" "--" "-Z" "force-unstable-if-unmarked"
Updating crates.io index
Downloaded compiler_builtins v0.1.26
Downloaded 1 crate (134.9 KB) in 0.78s
Compiling core v0.0.0 (/run/media/jonah/data/Projects/avr-rust/src/libcore)
Compiling compiler_builtins v0.1.26
Running `rustc --crate-name core --edition=2018 /run/media/jonah/data/Projects/avr-rust/src/libcore/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C opt-level=s -C panic=abort -C codegen-units=1 -C metadata=0425a61751752881 -C extra-filename=-0425a61751752881 --out-dir /tmp/xargo.enQPopALFvIP/target/avr-unknown-unknown/release/deps --target avr-unknown-unknown -L dependency=/tmp/xargo.enQPopALFvIP/target/avr-unknown-unknown/release/deps -L dependency=/tmp/xargo.enQPopALFvIP/target/release/deps`
Running `rustc --crate-name build_script_build /home/jonah/.cargo/registry/src/github.com-1ecc6299db9ec823/compiler_builtins-0.1.26/build.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C opt-level=s -C codegen-units=1 --cfg 'feature="compiler-builtins"' --cfg 'feature="core"' --cfg 'feature="default"' --cfg 'feature="mem"' -C metadata=8f88709af7275f23 -C extra-filename=-8f88709af7275f23 --out-dir /tmp/xargo.enQPopALFvIP/target/release/build/compiler_builtins-8f88709af7275f23 -L dependency=/tmp/xargo.enQPopALFvIP/target/release/deps --cap-lints allow`
Running `/tmp/xargo.enQPopALFvIP/target/release/build/compiler_builtins-8f88709af7275f23/build-script-build`
Compiling rustc-std-workspace-core v1.99.0 (/run/media/jonah/data/Projects/avr-rust/src/tools/rustc-std-workspace-core)
Running `rustc --crate-name rustc_std_workspace_core --edition=2018 /run/media/jonah/data/Projects/avr-rust/src/tools/rustc-std-workspace-core/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C opt-level=s -C panic=abort -C codegen-units=1 -C metadata=1d5b7545d773d921 -C extra-filename=-1d5b7545d773d921 --out-dir /tmp/xargo.enQPopALFvIP/target/avr-unknown-unknown/release/deps --target avr-unknown-unknown -L dependency=/tmp/xargo.enQPopALFvIP/target/avr-unknown-unknown/release/deps -L dependency=/tmp/xargo.enQPopALFvIP/target/release/deps --extern core=/tmp/xargo.enQPopALFvIP/target/avr-unknown-unknown/release/deps/libcore-0425a61751752881.rmeta`
Running `rustc --crate-name compiler_builtins /home/jonah/.cargo/registry/src/github.com-1ecc6299db9ec823/compiler_builtins-0.1.26/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C opt-level=s -C panic=abort -C codegen-units=1 --cfg 'feature="compiler-builtins"' --cfg 'feature="core"' --cfg 'feature="default"' --cfg 'feature="mem"' -C metadata=a0e694beb56f771f -C extra-filename=-a0e694beb56f771f --out-dir /tmp/xargo.enQPopALFvIP/target/avr-unknown-unknown/release/deps --target avr-unknown-unknown -L dependency=/tmp/xargo.enQPopALFvIP/target/avr-unknown-unknown/release/deps -L dependency=/tmp/xargo.enQPopALFvIP/target/release/deps --extern core=/tmp/xargo.enQPopALFvIP/target/avr-unknown-unknown/release/deps/librustc_std_workspace_core-1d5b7545d773d921.rmeta --cap-lints allow --cfg 'feature="unstable"'`
Compiling alloc v0.0.0 (/tmp/xargo.enQPopALFvIP)
Running `rustc --crate-name alloc --edition=2018 /run/media/jonah/data/Projects/avr-rust/src/liballoc/lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type lib --emit=dep-info,metadata,link -C opt-level=s -C panic=abort -C codegen-units=1 -Z force-unstable-if-unmarked -C metadata=80d3f061118f5dfb -C extra-filename=-80d3f061118f5dfb --out-dir /tmp/xargo.enQPopALFvIP/target/avr-unknown-unknown/release/deps --target avr-unknown-unknown -L dependency=/tmp/xargo.enQPopALFvIP/target/avr-unknown-unknown/release/deps -L dependency=/tmp/xargo.enQPopALFvIP/target/release/deps --extern compiler_builtins=/tmp/xargo.enQPopALFvIP/target/avr-unknown-unknown/release/deps/libcompiler_builtins-a0e694beb56f771f.rmeta --extern core=/tmp/xargo.enQPopALFvIP/target/avr-unknown-unknown/release/deps/libcore-0425a61751752881.rmeta`
LLVM ERROR: Cannot select: 0x7f2ff40d6060: i16 = bitcast 0x7f2ff40a3400
0x7f2ff40a3400: i8,ch,glue = CopyFromReg 0x7f2ff48e7e60:1, Register:i8 $r24, 0x7f2ff48e7e60:2
0x7f2ff46c9fb0: i8 = Register $r24
0x7f2ff48e7e60: i16,ch,glue = CopyFromReg 0x7f2ff40b6408:1, Register:i16 $r23r22, 0x7f2ff40b6408:2
0x7f2ff478dff8: i16 = Register $r23r22
0x7f2ff40b6408: i16,ch,glue = CopyFromReg 0x7f2ff46ca5c8, Register:i16 $r21r20, 0x7f2ff46ca5c8:1
0x7f2ff40b6748: i16 = Register $r21r20
0x7f2ff46ca5c8: ch,glue = callseq_end 0x7f2ff4117050, TargetConstant:i16<0>, TargetConstant:i16<0>, 0x7f2ff4117050:1
0x7f2ff40b60c8: i16 = TargetConstant<0>
0x7f2ff40b60c8: i16 = TargetConstant<0>
0x7f2ff4117050: ch,glue = CALL 0x7f2ff40b6198, TargetGlobalAddress:i16<{ i8, i32 } (i32) addrspace(1)* @_ZN4core3num7flt2dec8strategy5grisu22max_pow10_no_more_than17h24eda0bf549557d4E> 0, Register:i16 $r23r22, Register:i16 $r25r24, RegisterMask:Untyped, 0x7f2ff40b6198:1
0x7f2ff445f5e0: i16 = TargetGlobalAddress<{ i8, i32 } (i32) addrspace(1)* @_ZN4core3num7flt2dec8strategy5grisu22max_pow10_no_more_than17h24eda0bf549557d4E> 0
0x7f2ff478dff8: i16 = Register $r23r22
0x7f2ff40a2eb8: i16 = Register $r25r24
0x7f2ff40640f0: Untyped = RegisterMask
0x7f2ff40b6198: ch,glue = CopyToReg 0x7f2ff4064360, Register:i16 $r25r24, 0x7f2ff40aad88, 0x7f2ff4064360:1
0x7f2ff40a2eb8: i16 = Register $r25r24
0x7f2ff40aad88: i16,ch,glue = CopyFromReg 0x7f2ff40aad20:1, Register:i16 $r21r20, 0x7f2ff40aad20:2
0x7f2ff40b6748: i16 = Register $r21r20
0x7f2ff40aad20: i16,ch,glue = CopyFromReg 0x7f2ff40aacb8, Register:i16 $r19r18, 0x7f2ff40aacb8:1
0x7f2ff40aa978: i16 = Register $r19r18
0x7f2ff40aacb8: ch,glue = callseq_end 0x7f2ff40aac50, TargetConstant:i16<0>, TargetConstant:i16<0>, 0x7f2ff40aac50:1
0x7f2ff4064360: ch,glue = CopyToReg 0x7f2ff4061bd0, Register:i16 $r23r22, 0x7f2ff40aad20
0x7f2ff478dff8: i16 = Register $r23r22
0x7f2ff40aad20: i16,ch,glue = CopyFromReg 0x7f2ff40aacb8, Register:i16 $r19r18, 0x7f2ff40aacb8:1
0x7f2ff40aa978: i16 = Register $r19r18
0x7f2ff40aacb8: ch,glue = callseq_end 0x7f2ff40aac50, TargetConstant:i16<0>, TargetConstant:i16<0>, 0x7f2ff40aac50:1
In function: _ZN4core3num7flt2dec8strategy5grisu19format_shortest_opt17hfcc742cc4fb3bf66E
error: could not compile `core`.
Caused by:
process didn't exit successfully: `rustc --crate-name core --edition=2018 /run/media/jonah/data/Projects/avr-rust/src/libcore/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C opt-level=s -C panic=abort -C codegen-units=1 -C metadata=0425a61751752881 -C extra-filename=-0425a61751752881 --out-dir /tmp/xargo.enQPopALFvIP/target/avr-unknown-unknown/release/deps --target avr-unknown-unknown -L dependency=/tmp/xargo.enQPopALFvIP/target/avr-unknown-unknown/release/deps -L dependency=/tmp/xargo.enQPopALFvIP/target/release/deps` (exit code: 101)
warning: build failed, waiting for other jobs to finish...
error: build failed
error: `"/home/jonah/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo" "rustc" "-p" "alloc" "--release" "--manifest-path" "/tmp/xargo.enQPopALFvIP/Cargo.toml" "--target" "avr-unknown-unknown" "-v" "--" "-Z" "force-unstable-if-unmarked"` failed with exit code: Some(101)
note: run with `RUST_BACKTRACE=1` for a backtrace
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment