Skip to content

CI llvm related issue when trying to cross compile for Solaris #137997

Open
@psumbera

Description

@psumbera

This is rather question than the real issue. I try to cross compile Rust for Solaris with following modification:

psumbera@9519cac (this is based on illumos build scripts)

using:

cargo run --manifest-path src/ci/citool/Cargo.toml run-local dist-x86_64-solaris

But I'm getting following weired issue:

   Compiling rustc_driver v0.0.0 (/checkout/compiler/rustc_driver)
[RUSTC-TIMING] rustc_driver test:false 7.010
error: linking with `x86_64-solaris-gcc` failed: exit status: 1
  |
  = note:  "x86_64-solaris-gcc" "-m64" "/tmp/rustcRtl9jf/symbols.o" "<1 object files omitted>" "-Wl,-z,ignore" "-Wl,-Bdynamic" "<sysroot>-rustc/x86_64-pc-solaris/release/deps/librustc_driver-54c872bdc3792f02.so" "-Wl,-Bstatic" "<sysroot>/lib/rustlib/x86_64-pc-solaris/lib/{libcompiler_builtins-*}.rlib" "-Wl,-Bdynamic" "-lz" "-lstdc++" "-lsendfile" "-llgrp" "-lsocket" "-lposix4" "-lpthread" "-lresolv" "-lgcc_s" "-lc" "-lm" "-lrt" "-lpthread" "-lsendfile" "-llgrp" "-L" "<sysroot>-rustc/x86_64-pc-solaris/release/build/psm-8317c88d2b230546/out" "-L" "<sysroot>-rustc/x86_64-pc-solaris/release/build/blake3-e747bce60b8d0a51/out" "-L" "<sysroot>-rustc/x86_64-pc-solaris/release/build/blake3-e747bce60b8d0a51/out" "-L" "<sysroot>-rustc/x86_64-pc-solaris/release/build/rustc_llvm-66a04046ce5e9ef9/out" "-L" "/checkout/obj/build/x86_64-pc-solaris/llvm/lib" "-o" "<sysroot>-rustc/x86_64-pc-solaris/release/deps/rustc_main-c68d47c0d0e4f5be" "-nodefaultlibs" "-Wl,-z,origin" "-Wl,-rpath,$ORIGIN/../lib"
  = note: some arguments are omitted. use `--verbose` to show all linker arguments
  = note: /opt/solaris/x86_64/lib/gcc/x86_64-pc-solaris2.11/8.4.0/../../../../x86_64-pc-solaris2.11/bin/ld: warning: -z ignore ignored
          /opt/solaris/x86_64/lib/gcc/x86_64-pc-solaris2.11/8.4.0/../../../../x86_64-pc-solaris2.11/bin/ld: /checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-pc-solaris/release/deps/librustc_driver-54c872bdc3792f02.so: logb: invalid version 2 (max 0)
          /opt/solaris/x86_64/lib/gcc/x86_64-pc-solaris2.11/8.4.0/../../../../x86_64-pc-solaris2.11/bin/ld: /checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-pc-solaris/release/deps/librustc_driver-54c872bdc3792f02.so: error adding symbols: bad value
          collect2: error: ld returned 1 exit status


[RUSTC-TIMING] rustc_main test:false 0.103
error: could not compile `rustc-main` (bin "rustc-main") due to 1 previous error
Building bootstrap
Build completed unsuccessfully in 2:57:26
  local time: Tue Mar  4 12:09:24 UTC 2025
  network time: Tue, 04 Mar 2025 12:09:25 GMT
Error: Job failed

This is probably something Solaris libc specific. I have already seen logb: invalid version 3 (max 0) with newer libc version.

But it's kind of regression since I was able to crosscompile it before llvm was recently updated from version 19 to 20.

I'm still able to overcome the error by copying into src/llvm-tools LLVM version 19 (from my previous chceckout).

Unfortuanetelly I'm not really able to git bisect it since there are some other issues on the way...

So I'm filing this to get eventually some help here. Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-crossArea: Cross compilationA-linkageArea: linking into static, shared libraries and binariesA-linkersArea: linkers... you gotta love linkersC-bugCategory: This is a bug.E-needs-investigationCall for partcipation: This issues needs some investigation to determine current statusO-solarisOperating system: SolarisT-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions