Okay it feels like I'm making progress @gnzlbg
I'm trying to build libcore
and it fails for lack of some language items. The data_layout
for hexagon-unknown-linux-musl
doesn't mention any i128
and I wonder if that's part of the problem. There's no native 128-bit registers so I think either I need to find a better way to disable this feature for rust or punt to a software implementation of 128-bit logic.
There's some mips
targets (among others probably) that don't have i128
in their data_layout
but I suppose since Hexagon has a coprocessor that supports larger-than-128 bit registers, that might be a factor here.
Failure while building libcore
:
./x.py build --stage 1 -vvvv --config ../hexagon-linux-83.toml src/libcore
running: /local/mnt/workspace/rust/rust/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /local/mnt/workspace/rust/rust/src/bootstrap/Cargo.toml --verbose --verbose --verbose
Fresh unicode-xid v0.1.0
...
rustc command: "LD_LIBRARY_PATH"="/local/mnt/workspace/rust/rust/build/x86_64-unknown-linux-gnu/stage1/lib:/local/mnt/workspace/rust/rust/build/x86_64-unknown-linux-gnu/stage1-std/release/deps:/local/mnt/workspace/rust/rust/build/x86_64-unknown-linux-gnu/stage0/lib" "/local/mnt/workspace/rust/rust/build/x86_64-unknown-linux-gnu/stage1/bin/rustc" "--crate-name" "compiler_builtins" "/usr2/bcain/.cargo/registry/src/github.com-1ecc6299db9ec823/compiler_builtins-0.1.17/src/lib.rs" "--color" "never" "--crate-type" "lib" "--emit=dep-info,metadata,link" "-C" "opt-level=2" "--cfg" "feature=\"c\"" "--cfg" "feature=\"cc\"" "--cfg" "feature=\"compiler-builtins\"" "--cfg" "feature=\"core\"" "--cfg" "feature=\"default\"" "--cfg" "feature=\"rustc-dep-of-std\"" "-C" "metadata=bd952819c66fd8ff-rustc" "-C" "extra-filename=-bd952819c66fd8ff" "--out-dir" "/local/mnt/workspace/rust/rust/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps" "--target" "x86_64-unknown-linux-gnu" "-L" "dependency=/local/mnt/workspace/rust/rust/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps" "-L" "dependency=/local/mnt/workspace/rust/rust/build/x86_64-unknown-linux-gnu/stage1-std/release/deps" "--extern" "core=/local/mnt/workspace/rust/rust/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/librustc_std_workspace_core-325a092e1d4cc28f.rlib" "--cap-lints" "warn" "-L" "native=/local/mnt/workspace/rust/rust/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/build/compiler_builtins-4552e39eff386d49/out" "--cfg" "__absvdi2=\"optimized-c\"" "--cfg" "__absvsi2=\"optimized-c\"" "--cfg" "__absvti2=\"optimized-c\"" "--cfg" "__addvdi3=\"optimized-c\"" "--cfg" "__addvsi3=\"optimized-c\"" "--cfg" "__addvti3=\"optimized-c\"" "--cfg" "__clzdi2=\"optimized-c\"" "--cfg" "__clzsi2=\"optimized-c\"" "--cfg" "__clzti2=\"optimized-c\"" "--cfg" "__cmpdi2=\"optimized-c\"" "--cfg" "__cmpti2=\"optimized-c\"" "--cfg" "__ctzdi2=\"optimized-c\"" "--cfg" "__ctzsi2=\"optimized-c\"" "--cfg" "__ctzti2=\"optimized-c\"" "--cfg" "__divdc3=\"optimized-c\"" "--cfg" "__divsc3=\"optimized-c\"" "--cfg" "__divxc3=\"optimized-c\"" "--cfg" "__extendhfsf2=\"optimized-c\"" "--cfg" "__ffsti2=\"optimized-c\"" "--cfg" "__floatdisf=\"optimized-c\"" "--cfg" "__floatdixf=\"optimized-c\"" "--cfg" "__floatundidf=\"optimized-c\"" "--cfg" "__floatundisf=\"optimized-c\"" "--cfg" "__floatundixf=\"optimized-c\"" "--cfg" "__int_util=\"optimized-c\"" "--cfg" "__muldc3=\"optimized-c\"" "--cfg" "__mulsc3=\"optimized-c\"" "--cfg" "__mulvdi3=\"optimized-c\"" "--cfg" "__mulvsi3=\"optimized-c\"" "--cfg" "__mulvti3=\"optimized-c\"" "--cfg" "__mulxc3=\"optimized-c\"" "--cfg" "__negdf2=\"optimized-c\"" "--cfg" "__negdi2=\"optimized-c\"" "--cfg" "__negsf2=\"optimized-c\"" "--cfg" "__negti2=\"optimized-c\"" "--cfg" "__negvdi2=\"optimized-c\"" "--cfg" "__negvsi2=\"optimized-c\"" "--cfg" "__negvti2=\"optimized-c\"" "--cfg" "__paritydi2=\"optimized-c\"" "--cfg" "__paritysi2=\"optimized-c\"" "--cfg" "__parityti2=\"optimized-c\"" "--cfg" "__popcountdi2=\"optimized-c\"" "--cfg" "__popcountsi2=\"optimized-c\"" "--cfg" "__popcountti2=\"optimized-c\"" "--cfg" "__powixf2=\"optimized-c\"" "--cfg" "__subvdi3=\"optimized-c\"" "--cfg" "__subvsi3=\"optimized-c\"" "--cfg" "__subvti3=\"optimized-c\"" "--cfg" "__truncdfhf2=\"optimized-c\"" "--cfg" "__truncdfsf2=\"optimized-c\"" "--cfg" "__truncsfhf2=\"optimized-c\"" "--cfg" "__ucmpdi2=\"optimized-c\"" "--cfg" "__ucmpti2=\"optimized-c\"" "--cfg" "apple_versioning=\"optimized-c\"" "-l" "static=compiler-rt" "-Cdebuginfo=0" "-Dwarnings" "-Drust_2018_idioms" "--sysroot" "/local/mnt/workspace/rust/rust/build/x86_64-unknown-linux-gnu/stage1" "-Zexternal-macro-backtrace" "-Cprefer-dynamic" "-Clinker=clang++" "-C" "panic=abort" "-C" "debug-assertions=no" "-C" "codegen-units=8" "-Zsave-analysis" "-C" "link-args=-Wl,-rpath,$ORIGIN/../lib" "-Z" "force-unstable-if-unmarked"
sysroot: "/local/mnt/workspace/rust/rust/build/x86_64-unknown-linux-gnu/stage1"
libdir: "/local/mnt/workspace/rust/rust/build/x86_64-unknown-linux-gnu/stage1/lib"
error[E0522]: definition of an unknown language item: `i128_add`
--> /usr2/bcain/.cargo/registry/src/github.com-1ecc6299db9ec823/compiler_builtins-0.1.17/src/macros.rs:291:65
|
94 | | (
| |_______________________^ definition of unknown language item `i128_add`
...
291| #[cfg_attr(not(any(stage0, feature = "no-lang-items")), lang = $lang)]
| _________________________________________________________________^
error[E0522]: definition of an unknown language item: `i128_addo`
--> /usr2/bcain/.cargo/registry/src/github.com-1ecc6299db9ec823/compiler_builtins-0.1.17/src/macros.rs:291:65
|
98 | | $($body:tt)*
| |________________________^ definition of unknown language item `i128_addo`
...
291| #[cfg_attr(not(any(stage0, feature = "no-lang-items")), lang = $lang)]
| _________________________________________________________________^
error[E0522]: definition of an unknown language item: `u128_add`
--> /usr2/bcain/.cargo/registry/src/github.com-1ecc6299db9ec823/compiler_builtins-0.1.17/src/macros.rs:291:65
|
104 | | intrinsics! {
| |_______________________^ definition of unknown language item `u128_add`
...
291 | #[cfg_attr(not(any(stage0, feature = "no-lang-items")), lang = $lang)]
| _________________________________________________________________^
error[E0522]: definition of an unknown language item: `u128_addo`
--> /usr2/bcain/.cargo/registry/src/github.com-1ecc6299db9ec823/compiler_builtins-0.1.17/src/macros.rs:291:65
|
108 | | }
| |________________________^ definition of unknown language item `u128_addo`
...
291 | #[cfg_attr(not(any(stage0, feature = "no-lang-items")), lang = $lang)]
| _________________________________________________________________^
error[E0522]: definition of an unknown language item: `i128_sub`
--> /usr2/bcain/.cargo/registry/src/github.com-1ecc6299db9ec823/compiler_builtins-0.1.17/src/macros.rs:291:65
|
115 | | $($body)*
| |_______________________^ definition of unknown language item `i128_sub`
...
291 | #[cfg_attr(not(any(stage0, feature = "no-lang-items")), lang = $lang)]
| _________________________________________________________________^
error[E0522]: definition of an unknown language item: `i128_subo`
--> /usr2/bcain/.cargo/registry/src/github.com-1ecc6299db9ec823/compiler_builtins-0.1.17/src/macros.rs:291:65
|
119 | | intrinsics!($($rest)*);
| |________________________^ definition of unknown language item `i128_subo`
...
291 | #[cfg_attr(not(any(stage0, feature = "no-lang-items")), lang = $lang)]
| _________________________________________________________________^
error[E0522]: definition of an unknown language item: `u128_sub`
--> /usr2/bcain/.cargo/registry/src/github.com-1ecc6299db9ec823/compiler_builtins-0.1.17/src/macros.rs:291:65
|
125 | | #[unadjusted_on_win64]
| |_______________________^ definition of unknown language item `u128_sub`
...
291 | #[cfg_attr(not(any(stage0, feature = "no-lang-items")), lang = $lang)]
| _________________________________________________________________^
error[E0522]: definition of an unknown language item: `u128_subo`
--> /usr2/bcain/.cargo/registry/src/github.com-1ecc6299db9ec823/compiler_builtins-0.1.17/src/macros.rs:291:65
|
129 | | }
| |________________________^ definition of unknown language item `u128_subo`
...
291 | #[cfg_attr(not(any(stage0, feature = "no-lang-items")), lang = $lang)]
| _________________________________________________________________^
error[E0522]: definition of an unknown language item: `i128_mul`
--> /usr2/bcain/.cargo/registry/src/github.com-1ecc6299db9ec823/compiler_builtins-0.1.17/src/macros.rs:291:65
|
113 | | $(#[$($attr)*])*
| |_______________________^ definition of unknown language item `i128_mul`
...
291 | #[cfg_attr(not(any(stage0, feature = "no-lang-items")), lang = $lang)]
| _________________________________________________________________^
error[E0522]: definition of an unknown language item: `i128_mulo`
--> /usr2/bcain/.cargo/registry/src/github.com-1ecc6299db9ec823/compiler_builtins-0.1.17/src/macros.rs:291:65
|
117 | | }
| |________________________^ definition of unknown language item `i128_mulo`
...
291 | #[cfg_attr(not(any(stage0, feature = "no-lang-items")), lang = $lang)]
| _________________________________________________________________^
error[E0522]: definition of an unknown language item: `u128_mul`
--> /usr2/bcain/.cargo/registry/src/github.com-1ecc6299db9ec823/compiler_builtins-0.1.17/src/macros.rs:291:65
|
123 | | // win64 for some methods.
| |_______________________^ definition of unknown language item `u128_mul`
...
291 | #[cfg_attr(not(any(stage0, feature = "no-lang-items")), lang = $lang)]
| _________________________________________________________________^
error[E0522]: definition of an unknown language item: `u128_mulo`
--> /usr2/bcain/.cargo/registry/src/github.com-1ecc6299db9ec823/compiler_builtins-0.1.17/src/macros.rs:291:65
|
127 | | pub extern $abi:tt fn $name:ident( $($argname:ident: $ty:ty),* ) -> $ret:ty {
| |________________________^ definition of unknown language item `u128_mulo`
...
291 | #[cfg_attr(not(any(stage0, feature = "no-lang-items")), lang = $lang)]
| _________________________________________________________________^
error[E0522]: definition of an unknown language item: `i128_div`
--> /usr2/bcain/.cargo/registry/src/github.com-1ecc6299db9ec823/compiler_builtins-0.1.17/src/macros.rs:291:65
|
104 | | intrinsics! {
| |_______________________^ definition of unknown language item `i128_div`
...
291 | #[cfg_attr(not(any(stage0, feature = "no-lang-items")), lang = $lang)]
| _________________________________________________________________^
error[E0522]: definition of an unknown language item: `i128_rem`
--> /usr2/bcain/.cargo/registry/src/github.com-1ecc6299db9ec823/compiler_builtins-0.1.17/src/macros.rs:291:65
|
108 | | }
| |_______________________^ definition of unknown language item `i128_rem`
...
291 | #[cfg_attr(not(any(stage0, feature = "no-lang-items")), lang = $lang)]
| _________________________________________________________________^
error[E0522]: definition of an unknown language item: `i128_shl`
--> /usr2/bcain/.cargo/registry/src/github.com-1ecc6299db9ec823/compiler_builtins-0.1.17/src/macros.rs:291:65
|
109 | | }
| |_______________________^ definition of unknown language item `i128_shl`
...
291 | #[cfg_attr(not(any(stage0, feature = "no-lang-items")), lang = $lang)]
| _________________________________________________________________^
error[E0522]: definition of an unknown language item: `i128_shlo`
--> /usr2/bcain/.cargo/registry/src/github.com-1ecc6299db9ec823/compiler_builtins-0.1.17/src/macros.rs:291:65
|
113 | | $(#[$($attr)*])*
| |________________________^ definition of unknown language item `i128_shlo`
...
291 | #[cfg_attr(not(any(stage0, feature = "no-lang-items")), lang = $lang)]
| _________________________________________________________________^
error[E0522]: definition of an unknown language item: `u128_shl`
--> /usr2/bcain/.cargo/registry/src/github.com-1ecc6299db9ec823/compiler_builtins-0.1.17/src/macros.rs:291:65
|
117 | | }
| |_______________________^ definition of unknown language item `u128_shl`
...
291 | #[cfg_attr(not(any(stage0, feature = "no-lang-items")), lang = $lang)]
| _________________________________________________________________^
error[E0522]: definition of an unknown language item: `u128_shlo`
--> /usr2/bcain/.cargo/registry/src/github.com-1ecc6299db9ec823/compiler_builtins-0.1.17/src/macros.rs:291:65
|
121 | |
| |________________________^ definition of unknown language item `u128_shlo`
...
291 | #[cfg_attr(not(any(stage0, feature = "no-lang-items")), lang = $lang)]
| _________________________________________________________________^
error[E0522]: definition of an unknown language item: `i128_shr`
--> /usr2/bcain/.cargo/registry/src/github.com-1ecc6299db9ec823/compiler_builtins-0.1.17/src/macros.rs:291:65
|
126 | | $(#[$($attr:tt)*])*
| |_______________________^ definition of unknown language item `i128_shr`
...
291 | #[cfg_attr(not(any(stage0, feature = "no-lang-items")), lang = $lang)]
| _________________________________________________________________^
error[E0522]: definition of an unknown language item: `i128_shro`
--> /usr2/bcain/.cargo/registry/src/github.com-1ecc6299db9ec823/compiler_builtins-0.1.17/src/macros.rs:291:65
|
130 | |
| |________________________^ definition of unknown language item `i128_shro`
...
291 | #[cfg_attr(not(any(stage0, feature = "no-lang-items")), lang = $lang)]
| _________________________________________________________________^
error[E0522]: definition of an unknown language item: `u128_shr`
--> /usr2/bcain/.cargo/registry/src/github.com-1ecc6299db9ec823/compiler_builtins-0.1.17/src/macros.rs:291:65
|
134 | | intrinsics! {
| |_______________________^ definition of unknown language item `u128_shr`
...
291 | #[cfg_attr(not(any(stage0, feature = "no-lang-items")), lang = $lang)]
| _________________________________________________________________^
error[E0522]: definition of an unknown language item: `u128_shro`
--> /usr2/bcain/.cargo/registry/src/github.com-1ecc6299db9ec823/compiler_builtins-0.1.17/src/macros.rs:291:65
|
138 | | }
| |________________________^ definition of unknown language item `u128_shro`
...
291 | #[cfg_attr(not(any(stage0, feature = "no-lang-items")), lang = $lang)]
| _________________________________________________________________^
error[E0522]: definition of an unknown language item: `u128_div`
--> /usr2/bcain/.cargo/registry/src/github.com-1ecc6299db9ec823/compiler_builtins-0.1.17/src/macros.rs:291:65
|
273 | | }
| |_______________________^ definition of unknown language item `u128_div`
...
291 | #[cfg_attr(not(any(stage0, feature = "no-lang-items")), lang = $lang)]
| _________________________________________________________________^
error[E0522]: definition of an unknown language item: `u128_rem`
--> /usr2/bcain/.cargo/registry/src/github.com-1ecc6299db9ec823/compiler_builtins-0.1.17/src/macros.rs:291:65
|
277 | | fn from(i: u128) -> U64x2 {
| |_______________________^ definition of unknown language item `u128_rem`
...
291 | #[cfg_attr(not(any(stage0, feature = "no-lang-items")), lang = $lang)]
| _________________________________________________________________^
error: aborting due to 24 previous errors
For more information about this error, try `rustc --explain E0522`.
error: Could not compile `compiler_builtins`.
Caused by:
process didn't exit successfully: `CARGO_PKG_VERSION=0.1.17 CARGO=/local/mnt/workspace/rust/rust/build/x86_64-unknown-linux-gnu/stage0/bin/cargo CARGO_PKG_HOMEPAGE='https://github.com/rust-lang-nursery/compiler-builtins' CARGO_PKG_AUTHORS='Jorge Aparicio <japaricious@gmail.com>' CARGO_MANIFEST_DIR=/usr2/bcain/.cargo/registry/src/github.com-1ecc6299db9ec823/compiler_builtins-0.1.17 CARGO_PKG_VERSION_PATCH=17 CARGO_PKG_VERSION_MAJOR=0 LD_LIBRARY_PATH='/local/mnt/workspace/rust/rust/build/x86_64-unknown-linux-gnu/stage1-std/release/deps:/local/mnt/workspace/rust/rust/build/x86_64-unknown-linux-gnu/stage0/lib' CARGO_PKG_VERSION_MINOR=1 CARGO_PKG_VERSION_PRE= CARGO_PKG_NAME=compiler_builtins CARGO_PKG_DESCRIPTION='Compiler intrinsics used by the Rust compiler. Also available for other targets
if necessary'\!'
' CARGO_PKG_REPOSITORY='https://github.com/rust-lang-nursery/compiler-builtins' OUT_DIR=/local/mnt/workspace/rust/rust/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/build/compiler_builtins-4552e39eff386d49/out /local/mnt/workspace/rust/rust/build/bootstrap/debug/rustc --crate-name compiler_builtins /usr2/bcain/.cargo/registry/src/github.com-1ecc6299db9ec823/compiler_builtins-0.1.17/src/lib.rs --color never --error-format json --crate-type lib --emit=dep-info,metadata,link -C opt-level=2 --cfg 'feature="c"' --cfg 'feature="cc"' --cfg 'feature="compiler-builtins"' --cfg 'feature="core"' --cfg 'feature="default"' --cfg 'feature="rustc-dep-of-std"' -C metadata=bd952819c66fd8ff -C extra-filename=-bd952819c66fd8ff --out-dir /local/mnt/workspace/rust/rust/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -L dependency=/local/mnt/workspace/rust/rust/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps -L dependency=/local/mnt/workspace/rust/rust/build/x86_64-unknown-linux-gnu/stage1-std/release/deps --extern core=/local/mnt/workspace/rust/rust/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/librustc_std_workspace_core-325a092e1d4cc28f.rlib --cap-lints warn -L native=/local/mnt/workspace/rust/rust/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/build/compiler_builtins-4552e39eff386d49/out --cfg '__absvdi2="optimized-c"' --cfg '__absvsi2="optimized-c"' --cfg '__absvti2="optimized-c"' --cfg '__addvdi3="optimized-c"' --cfg '__addvsi3="optimized-c"' --cfg '__addvti3="optimized-c"' --cfg '__clzdi2="optimized-c"' --cfg '__clzsi2="optimized-c"' --cfg '__clzti2="optimized-c"' --cfg '__cmpdi2="optimized-c"' --cfg '__cmpti2="optimized-c"' --cfg '__ctzdi2="optimized-c"' --cfg '__ctzsi2="optimized-c"' --cfg '__ctzti2="optimized-c"' --cfg '__divdc3="optimized-c"' --cfg '__divsc3="optimized-c"' --cfg '__divxc3="optimized-c"' --cfg '__extendhfsf2="optimized-c"' --cfg '__ffsti2="optimized-c"' --cfg '__floatdisf="optimized-c"' --cfg '__floatdixf="optimized-c"' --cfg '__floatundidf="optimized-c"' --cfg '__floatundisf="optimized-c"' --cfg '__floatundixf="optimized-c"' --cfg '__int_util="optimized-c"' --cfg '__muldc3="optimized-c"' --cfg '__mulsc3="optimized-c"' --cfg '__mulvdi3="optimized-c"' --cfg '__mulvsi3="optimized-c"' --cfg '__mulvti3="optimized-c"' --cfg '__mulxc3="optimized-c"' --cfg '__negdf2="optimized-c"' --cfg '__negdi2="optimized-c"' --cfg '__negsf2="optimized-c"' --cfg '__negti2="optimized-c"' --cfg '__negvdi2="optimized-c"' --cfg '__negvsi2="optimized-c"' --cfg '__negvti2="optimized-c"' --cfg '__paritydi2="optimized-c"' --cfg '__paritysi2="optimized-c"' --cfg '__parityti2="optimized-c"' --cfg '__popcountdi2="optimized-c"' --cfg '__popcountsi2="optimized-c"' --cfg '__popcountti2="optimized-c"' --cfg '__powixf2="optimized-c"' --cfg '__subvdi3="optimized-c"' --cfg '__subvsi3="optimized-c"' --cfg '__subvti3="optimized-c"' --cfg '__truncdfhf2="optimized-c"' --cfg '__truncdfsf2="optimized-c"' --cfg '__truncsfhf2="optimized-c"' --cfg '__ucmpdi2="optimized-c"' --cfg '__ucmpti2="optimized-c"' --cfg 'apple_versioning="optimized-c"' -l static=compiler-rt` (exit code: 1)
command did not execute successfully: "/local/mnt/workspace/rust/rust/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "-j" "8" "-v" "-v" "-v" "--release" "--features" "panic-unwind llvm-libunwind backtrace compiler-builtins-c" "--manifest-path" "/local/mnt/workspace/rust/rust/src/libstd/Cargo.toml" "--message-format" "json"
expected success, got: exit code: 101
Traceback (most recent call last):
File "./x.py", line 11, in <module>
bootstrap.main()
File "/local/mnt/workspace/rust/rust/src/bootstrap/bootstrap.py", line 866, in main
bootstrap(help_triggered)
File "/local/mnt/workspace/rust/rust/src/bootstrap/bootstrap.py", line 852, in bootstrap
run(args, env=env, verbose=build.verbose)
File "/local/mnt/workspace/rust/rust/src/bootstrap/bootstrap.py", line 141, in run
raise RuntimeError(err)
RuntimeError: failed to run: /local/mnt/workspace/rust/rust/build/bootstrap/debug/bootstrap build --stage 1 -vvvv --config ../hexagon-linux-83.toml src/libcore