You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Long-story short, maintainer for SynoCommunity which provides opensource package for using on Synology Linux based NAS.
in order for some of our packages to work out on Synology popwerpc qoriq I require to use powerpc-linux-gnuspe as otherwise resulting binaries do not work.
Using https://github.com/SynoCommunity/spksrc framwork along with associated Synology toolchain for this specifc arch I was able to build a stage1 compiler. The hope is then, using this stage1 build, to enable full support for the gnuspe variant.
It occurs that using the default Synology gcc cross-compiler I'm able to get close to the finish line but ends-up failing at rustc_llvm v0.0.0:
error: failed to run custom build command for `rustc_llvm v0.0.0 (/home/spksrc/qoriq-debug/spksrc/toolchain/syno-qoriq-6.2.4/work/rust/compiler/rustc_llvm)`
Caused by:
process didn't exit successfully: `/home/spksrc/qoriq-debug/spksrc/toolchain/syno-qoriq-6.2.4/work/rust/target/debug/build/rustc_llvm-b45326f0c9a9f4b3/build-script-build` (exit status: 101)
--- stdout
cargo:rustc-check-cfg=values(llvm_component,"ipo")
cargo:rustc-check-cfg=values(llvm_component,"bitreader")
cargo:rustc-check-cfg=values(llvm_component,"bitwriter")
cargo:rustc-check-cfg=values(llvm_component,"linker")
cargo:rustc-check-cfg=values(llvm_component,"asmparser")
cargo:rustc-check-cfg=values(llvm_component,"lto")
cargo:rustc-check-cfg=values(llvm_component,"coverage")
cargo:rustc-check-cfg=values(llvm_component,"instrumentation")
cargo:rustc-check-cfg=values(llvm_component,"x86")
cargo:rustc-check-cfg=values(llvm_component,"arm")
cargo:rustc-check-cfg=values(llvm_component,"aarch64")
cargo:rustc-check-cfg=values(llvm_component,"amdgpu")
cargo:rustc-check-cfg=values(llvm_component,"avr")
cargo:rustc-check-cfg=values(llvm_component,"loongarch")
cargo:rustc-check-cfg=values(llvm_component,"m68k")
cargo:rustc-check-cfg=values(llvm_component,"csky")
cargo:rustc-check-cfg=values(llvm_component,"mips")
cargo:rustc-check-cfg=values(llvm_component,"powerpc")
cargo:rustc-check-cfg=values(llvm_component,"systemz")
cargo:rustc-check-cfg=values(llvm_component,"jsbackend")
cargo:rustc-check-cfg=values(llvm_component,"webassembly")
cargo:rustc-check-cfg=values(llvm_component,"msp430")
cargo:rustc-check-cfg=values(llvm_component,"sparc")
cargo:rustc-check-cfg=values(llvm_component,"nvptx")
cargo:rustc-check-cfg=values(llvm_component,"hexagon")
cargo:rustc-check-cfg=values(llvm_component,"riscv")
cargo:rustc-check-cfg=values(llvm_component,"bpf")
cargo:rerun-if-env-changed=RUST_CHECK
cargo:rerun-if-env-changed=REAL_LIBRARY_PATH_VAR
--- stderr
thread 'main' panicked at compiler/rustc_llvm/build.rs:51:59:
REAL_LIBRARY_PATH_VAR
stack backtrace:
0: 0x55a9e11a886c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h3a50fc05234dc25f
1: 0x55a9e11ea7c0 - core::fmt::write::h41e83b57b87e9771
2: 0x55a9e119c7ef - std::io::Write::write_fmt::hdce39c9ad9841766
3: 0x55a9e11a866c - std::sys_common::backtrace::print::h1bfd62876611aa97
4: 0x55a9e11ccfda - std::panicking::default_hook::{{closure}}::h17c46ac087e88546
5: 0x55a9e11ccdc0 - std::panicking::default_hook::h13666b4b062ac951
6: 0x55a9e11cd49e - std::panicking::rust_panic_with_hook::hb9aabda64d0504fc
7: 0x55a9e11a8e1b - std::panicking::begin_panic_handler::{{closure}}::h18e358aab0160522
8: 0x55a9e11a8ab6 - std::sys_common::backtrace::__rust_end_short_backtrace::hf22579d6416687c0
9: 0x55a9e11cd192 - rust_begin_unwind
10: 0x55a9e112bd15 - core::panicking::panic_fmt::h91a39003a918ef49
11: 0x55a9e112c353 - core::option::expect_failed::hdbc0e8de051845fc
12: 0x55a9e1134edc - core::option::Option<T>::expect::h34ee4a792f3f1965
at /home/spksrc/qoriq-debug/spksrc/toolchain/syno-qoriq-6.2.4/work/rust/library/core/src/option.rs:894:21
13: 0x55a9e112f762 - build_script_build::restore_library_path::hb2e1b7e64585ae13
at /home/spksrc/qoriq-debug/spksrc/toolchain/syno-qoriq-6.2.4/work/rust/compiler/rustc_llvm/build.rs:51:15
14: 0x55a9e11303aa - build_script_build::main::h4fb266cde9fc8990
at /home/spksrc/qoriq-debug/spksrc/toolchain/syno-qoriq-6.2.4/work/rust/compiler/rustc_llvm/build.rs:113:5
15: 0x55a9e112e5db - core::ops::function::FnOnce::call_once::h6b3a5c50542d0a48
at /home/spksrc/qoriq-debug/spksrc/toolchain/syno-qoriq-6.2.4/work/rust/library/core/src/ops/function.rs:250:5
16: 0x55a9e112cc4e - std::sys_common::backtrace::__rust_begin_short_backtrace::h40a50028a2668c98
at /home/spksrc/qoriq-debug/spksrc/toolchain/syno-qoriq-6.2.4/work/rust/library/std/src/sys_common/backtrace.rs:154:18
17: 0x55a9e1138e61 - std::rt::lang_start::{{closure}}::h80c94b634fc1a781
at /home/spksrc/qoriq-debug/spksrc/toolchain/syno-qoriq-6.2.4/work/rust/library/std/src/rt.rs:167:18
18: 0x55a9e11cd036 - std::panicking::try::h8c98e8bc60bce26a
19: 0x55a9e11b59e6 - std::rt::lang_start_internal::h1dd4610c6c6ac6b9
20: 0x55a9e1138e3a - std::rt::lang_start::h8f7adb4b55347857
at /home/spksrc/qoriq-debug/spksrc/toolchain/syno-qoriq-6.2.4/work/rust/library/std/src/rt.rs:166:17
21: 0x55a9e113409e - main
22: 0x7fed4f033d0a - __libc_start_main
23: 0x55a9e112c50a - _start
24: 0x0 - <unknown>
warning: build failed, waiting for other jobs to finish...
make[2]: *** [../../mk/spksrc.tc-rust.mk:62: rustc_target] Error 101
/home/spksrc/qoriq-debug/spksrc/cross/bat/work-qoriq-6.2.4/tc_vars.mk:1: *** An error occured while setting up the toolchain, please check the messages above. Stop.
make[1]: Leaving directory '/home/spksrc/qoriq-debug/spksrc/cross/bat'
So I tried using an alternative option with clang and proper arch parameters -mcpu=e500v2 -mhard-float --sysroot=<mysysrootpath> but it fails a little earlier than with gcc at libffi:
checking for powerpc-unknown-linux-gnuspe-gcc... clang-13
checking whether the C compiler works... no
Steps
presuming having a compatible spksrc container (docker/lxc)
perhaps there are additional flags I could use over the tier 2 powerpc-linux-gnu that could make things to work out on qoriq without having to build gnuspe support? Currently tried -Ctarget-cpu=e500 and still failed.
fixing the build issue so it's possible to use Synology provided gcc version 4.9.x?
there may be a way to support clang on the libffi portion of the build (although it may fail later-on)?
$ RUSTUP_HOME=/home/spksrc/qoriq-debug/spksrc/distrib/rustup CARGO_HOME=/home/spksrc/qoriq-debug/spksrc/distrib/cargo PATH=/home/spksrc/qoriq-debug/spksrc/distrib/cargo/bin:$PATH rustup --versionrustup 1.26.0 (5af9b9484 2023-04-05)info: This is the version for the rustup toolchain manager, not the rustc compiler.info: The currently active `rustc` version is `rustc 1.73.0 (cc66ad468 2023-10-03)`
It's a little unclear to me why you filed this as a rustup issue, it seems more like rust-lang/rust issue?
Yes, as I already replied on Discord:
I don't think you should file that issue in Rustup... Rather, you can try to transfer that issue to Rust.
I think it's appropriate to close this issue now for archiving purposes, and the discussion on this issue should be redirected to rust-lang/rust#117361.
Problem
Long-story short, maintainer for SynoCommunity which provides opensource package for using on Synology Linux based NAS.
in order for some of our packages to work out on Synology popwerpc
qoriq
I require to usepowerpc-linux-gnuspe
as otherwise resulting binaries do not work.Using https://github.com/SynoCommunity/spksrc framwork along with associated Synology toolchain for this specifc arch I was able to build a stage1 compiler. The hope is then, using this stage1 build, to enable full support for the gnuspe variant.
It occurs that using the default Synology gcc cross-compiler I'm able to get close to the finish line but ends-up failing at
rustc_llvm v0.0.0
:So I tried using an alternative option with clang and proper arch parameters
-mcpu=e500v2 -mhard-float --sysroot=<mysysrootpath>
but it fails a little earlier than with gcc at libffi:Steps
$(RUST_TARGET)
ispowerpc-unknown-linux-gnuspe
:Possible Solution(s)
A few ideas:
qoriq
without having to build gnuspe support? Currently tried-Ctarget-cpu=e500
and still failed.Notes
Synocommunity related bugs:
Rustup version
The text was updated successfully, but these errors were encountered: