rust-lang / rustc_codegen_cranelift

Cranelift based backend for rustc
Apache License 2.0
1.59k stars 100 forks source link

[Bug] Failed to compile under linux powerpc64le #1471

Open runlevel5 opened 6 months ago

runlevel5 commented 6 months ago

I ran into following error when trying to compile under Linux powerpc64le:

~/Work/rustc_codegen_cranelift$ ./y.sh build
[BUILD] build system
[BUILD] rustc_codegen_cranelift
    Finished `release` profile [optimized] target(s) in 0.05s
[BUILD] sysroot Clif
[COPY] stdlib source
[PATCH] "stdlib" <- "0027-stdlib-128bit-atomic-operations.patch"
[PATCH] "stdlib" <- "0029-stdlib-rawdylib-processprng.patch"
   Compiling core v0.0.0 (/home/tle/Work/rustc_codegen_cranelift/build/stdlib/library/core)
   Compiling std v0.0.0 (/home/tle/Work/rustc_codegen_cranelift/build/stdlib/library/std)
   Compiling rustc-std-workspace-core v1.99.0 (/home/tle/Work/rustc_codegen_cranelift/build/stdlib/library/rustc-std-workspace-core)
error: can't compile for powerpc64le-unknown-linux-gnu: Support for this target has not been implemented yet

   Compiling compiler_builtins v0.1.106
   Compiling libc v0.2.153
error: could not compile `rustc-std-workspace-core` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
error: could not compile `core` (lib) due to 1 previous error
error: could not compile `compiler_builtins` (lib) due to 1 previous error
error: could not compile `libc` (lib) due to 1 previous error
CARGO_BUILD_INCREMENTAL="true" CARGO_ENCODED_RUSTDOCFLAGS="" CARGO_ENCODED_RUSTFLAGS="-Zforce-unstable-if-unmarked\u{1f}-Cpanic=abort\u{1f}-Zcodegen-backend=/home/tle/Work/rustc_codegen_cranelift/./dist/lib/librustc_codegen_cranelift.so\u{1f}--sysroot\u{1f}/home/tle/Work/rustc_codegen_cranelift/./build/rtstartup\u{1f}-Zinline-mir" CARGO_PROFILE_RELEASE_DEBUG="true" RUSTC="/home/tle/.rustup/toolchains/nightly-2024-03-26-powerpc64le-unknown-linux-gnu/bin/rustc" RUSTDOC="/home/tle/.rustup/toolchains/nightly-2024-03-26-powerpc64le-unknown-linux-gnu/bin/rustdoc" __CARGO_DEFAULT_LIB_METADATA="cg_clif" "/home/tle/.rustup/toolchains/nightly-2024-03-26-powerpc64le-unknown-linux-gnu/bin/cargo" "build" "--manifest-path" "/home/tle/Work/rustc_codegen_cranelift/./build/stdlib/library/sysroot/Cargo.toml" "--target-dir" "/home/tle/Work/rustc_codegen_cranelift/./build/stdlib_target" "--locked" "--target" "powerpc64le-unknown-linux-gnu" "--release" "--features" "compiler-builtins-no-asm backtrace panic-unwind" exited with status ExitStatus(unix_wait_status(25856))

It would be awesome if this architecture is supported

bjorn3 commented 6 months ago

This will need Cranelift support first: https://github.com/bytecodealliance/wasmtime/issues/1183