rust-lang / rust

Empowering everyone to build reliable and efficient software.
https://www.rust-lang.org
Other
94.88k stars 12.23k forks source link

Clean up Solaris CI #126025

Open workingjubilee opened 1 month ago

workingjubilee commented 1 month ago

We should clean up our Solaris CI. The poorly-maintained build script recently caused a significant downtime, and even my fix was just a rude hack.

Alternately, we can decommission our Solaris CI!

If someone objects it would be great to have them formally write down their contact info in a platform support page for the targets.

workingjubilee commented 1 month ago

cc @psumbera

Not to put you on the spot, but I was the only one at the time who knew to try to reach out to you when the build issue was in Solaris. Obviously, I don't think it was actually intrinsic to Solaris per se, mostly our naughty build script doing needless work, but you're probably more able to identify which parts of what we do are needless work.

psumbera commented 1 month ago

I would love to help here. But have no idea how it's supposed to work. Is there any documentation for it?

workingjubilee commented 1 month ago

nope lol

workingjubilee commented 1 month ago

There is documentation for the platform support and the target tier policy which Solaris has been effectively "grandfathered" in, allowing it to exist as tier 2 despite not having maintainers.

There is documentation on how our Docker CI works in general.

There is nothing documenting the Solaris toolchain script.

psumbera commented 5 days ago

I think I'm getting into it. I have Oracle Linux and I did:

git clone --recurse-submodules https://github.com/rust-lang/rust.git rust
cd rust
./src/ci/docker/run.sh dist-various-2

And it seems to work as expected. I'm little bit confused with caching...

But I have different question. I'm playing with it and I would like to build full Rust compiler for Solaris (not just std). But it fails. I tired NetBSD build and it fails the same way. So maybe I do something wrong.

./src/ci/docker/run.sh dist-x86_64-netbsd
..
  cargo:rerun-if-env-changed=CXXFLAGS_x86_64_unknown_netbsd
  CXXFLAGS_x86_64_unknown_netbsd = Some("-ffunction-sections -fdata-sections -fPIC -m64")
  cargo:warning=In file included from llvm-wrapper/PassWrapper.cpp:8:0:
  cargo:warning=llvm-wrapper/LLVMWrapper.h:3:10: fatal error: llvm-c/BitReader.h: No such file or directory
  cargo:warning= #include "llvm-c/BitReader.h"
  cargo:warning=          ^~~~~~~~~~~~~~~~~~~~
  cargo:warning=compilation terminated.

  --- stderr

  error occurred: Command "sccache" "x86_64--netbsd-g++-sysroot" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I/checkout/obj/build/x86_64-unknown-netbsd/ci-llvm/include" "-std=c++17" "-fno-exceptions" "-funwind-tables" "-fno-rtti" "-D_GNU_SOURCE" "-D_DEBUG" "-D_GLIBCXX_ASSERTIONS" "-D__STDC_CONSTANT_MACROS" "-D__STDC_FORMAT_MACROS" "-D__STDC_LIMIT_MACROS" "-DLLVM_COMPONENT_AARCH64" "-DLLVM_COMPONENT_ARM" "-DLLVM_COMPONENT_ASMPARSER" "-DLLVM_COMPONENT_AVR" "-DLLVM_COMPONENT_BITREADER" "-DLLVM_COMPONENT_BITWRITER" "-DLLVM_COMPONENT_BPF" "-DLLVM_COMPONENT_COVERAGE" "-DLLVM_COMPONENT_CSKY" "-DLLVM_COMPONENT_HEXAGON" "-DLLVM_COMPONENT_INSTRUMENTATION" "-DLLVM_COMPONENT_IPO" "-DLLVM_COMPONENT_LINKER" "-DLLVM_COMPONENT_LOONGARCH" "-DLLVM_COMPONENT_LTO" "-DLLVM_COMPONENT_M68K" "-DLLVM_COMPONENT_MIPS" "-DLLVM_COMPONENT_MSP430" "-DLLVM_COMPONENT_NVPTX" "-DLLVM_COMPONENT_POWERPC" "-DLLVM_COMPONENT_RISCV" "-DLLVM_COMPONENT_SPARC" "-DLLVM_COMPONENT_SYSTEMZ" "-DLLVM_COMPONENT_WEBASSEMBLY" "-DLLVM_COMPONENT_X86" "-DLLVM_COMPONENT_XTENSA" "-DLLVM_RUSTLLVM" "-DNDEBUG" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-netbsd/release/build/rustc_llvm-4e0f23126eb0183e/out/7372e21ddc8be4fd-PassWrapper.o" "-c" "llvm-wrapper/PassWrapper.cpp" with args x86_64--netbsd-g++-sysroot did not execute successfully (status code exit status: 1).

Any idea about this?