Description
Summary
I'm going through the round of updating our (NetBSD's pkgsrc) rust package, and have this time come around to making a rust 1.85.0 package in pkgsrc-wip. The cross-build succeeds for most of the targets we try to support, but the 32-bit mips target now fails to build in a novel way.
Command used
Nothing special, x.py ...
, cross-building from NetBSD/amd64 10.99.12.
Expected behaviour
I was expecting the build to succeed.
Actual behaviour
The build stopped after emitting these error messages:
clippy_utils.c33fa2c5294c0ca2-cgu.08:(.text._RNvMs7_NtCsgLiP1snAFCU_12clippy_utils6constsNtB5_13ConstEvalCtxt4expr+0xa7c): undefined reference to `__gnu_h2f_ieee'
/u/mipsel/tools/bin/../lib/gcc/mipsel--netbsd/10.5.0/../../../../mipsel--netbsd/bin/ld: clippy_utils.c33fa2c5294c0ca2-cgu.08:(.text._RNvMs7_NtCsgLiP1snAFCU_12clippy_utils6constsNtB5_13ConstEvalCtxt4expr+0xa88): undefined reference to `__gnu_h2f_ieee'
/u/mipsel/tools/bin/../lib/gcc/mipsel--netbsd/10.5.0/../../../../mipsel--netbsd/bin/ld: clippy_utils.c33fa2c5294c0ca2-cgu.08:(.text._RNvMs7_NtCsgLiP1snAFCU_12clippy_utils6constsNtB5_13ConstEvalCtxt4expr+0xa90): undefined reference to `__gnu_f2h_ieee'
/u/mipsel/tools/bin/../lib/gcc/mipsel--netbsd/10.5.0/../../../../mipsel--netbsd/bin/ld: clippy_utils.c33fa2c5294c0ca2-cgu.08:(.text._RNvMs7_NtCsgLiP1snAFCU_12clippy_utils6constsNtB5_13ConstEvalCtxt4expr+0xa98): undefined reference to `__gnu_f2h_ieee'
/u/mipsel/tools/bin/../lib/gcc/mipsel--netbsd/10.5.0/../../../../mipsel--netbsd/bin/ld: clippy_utils.c33fa2c5294c0ca2-cgu.08:(.text._RNvMs7_NtCsgLiP1snAFCU_12clippy_utils6constsNtB5_13ConstEvalCtxt4expr+0xc00): undefined reference to `__gnu_h2f_ieee'
/u/mipsel/tools/bin/../lib/gcc/mipsel--netbsd/10.5.0/../../../../mipsel--netbsd/bin/ld: clippy_utils.c33fa2c5294c0ca2-cgu.08:(.text._RNvMs7_NtCsgLiP1snAFCU_12clippy_utils6constsNtB5_13ConstEvalCtxt4expr+0xc0c): undefined reference to `__gnu_h2f_ieee'
/u/mipsel/tools/bin/../lib/gcc/mipsel--netbsd/10.5.0/../../../../mipsel--netbsd/bin/ld: clippy_utils.c33fa2c5294c0ca2-cgu.08:(.text._RNvMs7_NtCsgLiP1snAFCU_12clippy_utils6constsNtB5_13ConstEvalCtxt4expr+0xc14): undefined reference to `__gnu_f2h_ieee'
/u/mipsel/tools/bin/../lib/gcc/mipsel--netbsd/10.5.0/../../../../mipsel--netbsd/bin/ld: clippy_utils.c33fa2c5294c0ca2-cgu.08:(.text._RNvMs7_NtCsgLiP1snAFCU_12clippy_utils6constsNtB5_13ConstEvalCtxt4expr+0xc1c): undefined reference to `__gnu_f2h_ieee'
/u/mipsel/tools/bin/../lib/gcc/mipsel--netbsd/10.5.0/../../../../mipsel--netbsd/bin/ld: link errors found, deleting executable `/usr/pkgsrc/wip/rust185/work/rustc-1.85.0-src/build/x86_64-unknown-netbsd/stage1-tools/mipsel-unknown-netbsd/release/deps/clippy_driver-3e44b5b01533b167'
collect2: error: ld returned 1 exit status
Bootstrap configuration (config.toml)
For what it's worth:
profile = 'dist'
[llvm]
release-debuginfo = false
static-libstdcpp = false
ninja = false
targets = 'Mips;X86'
[build]
host = ['mipsel-unknown-netbsd']
target = ['mipsel-unknown-netbsd']
cargo = '/usr/pkgsrc/wip/rust185/work/rust-bootstrap/bin/cargo'
rustc = '/usr/pkgsrc/wip/rust185/work/rust-bootstrap/bin/rustc'
docs = false
compiler-docs = false
python = '/usr/pkg/bin/python3.12'
vendor = true
extended = true
cargo-native-static = true
configure-args = ['--prefix=/usr/pkg', '--mandir=/usr/pkg/man', '--sysconfdir=/usr/pkg/etc', '--python=/usr/pkg/bin/python3.12', '--release-channel=stable', '--local-rust-root=/usr/pkgsrc/wip/rust185/work/rust-bootstrap', '--enable-extended', '--enable-rpath', '--disable-codegen-tests', '--disable-compiler-docs', '--disable-llvm-static-stdcpp', '--disable-ninja', '--dist-compression-formats=xz', '--set', 'dist.vendor=false', '--host=mipsel-unknown-netbsd', '--target=mipsel-unknown-netbsd', '--set=target.mipsel-unknown-netbsd.cc=/usr/pkgsrc/wip/rust185/work/scripts/gcc-wrap', '--set=target.mipsel-unknown-netbsd.cxx=/usr/pkgsrc/wip/rust185/work/scripts/c++-wrap', '--set=target.mipsel-unknown-netbsd.linker=/usr/pkgsrc/wip/rust185/work/scripts/gcc-wrap', '--set=target.mipsel-unknown-netbsd.ar=/u/mipsel/tools/bin/mipsel--netbsd-ar', '--enable-vendor', '--disable-debug', '--disable-debug-assertions', '--disable-llvm-release-debuginfo', '--debuginfo-level=0', '--debuginfo-level-rustc=0', '--debuginfo-level-std=0', '--debuginfo-level-tools=0', '--debuginfo-level-tests=0', '--set', 'llvm.targets=Mips;X86', '--enable-cargo-native-static', '--disable-docs']
[install]
prefix = '/usr/pkg'
sysconfdir = '/usr/pkg/etc'
mandir = '/usr/pkg/man'
[rust]
debug = false
debug-assertions = false
debuginfo-level = 0
debuginfo-level-rustc = 0
debuginfo-level-std = 0
debuginfo-level-tools = 0
debuginfo-level-tests = 0
channel = 'stable'
rpath = true
codegen-tests = false
[target.x86_64-unknown-netbsd]
[target.mipsel-unknown-netbsd]
cc = '/usr/pkgsrc/wip/rust185/work/scripts/gcc-wrap'
cxx = '/usr/pkgsrc/wip/rust185/work/scripts/c++-wrap'
ar = '/u/mipsel/tools/bin/mipsel--netbsd-ar'
linker = '/usr/pkgsrc/wip/rust185/work/scripts/gcc-wrap'
[dist]
compression-formats = ['xz']
vendor = false
Operating system
The host OS is NetBSD/amd64 10.99.12
. It has successfully cross-built rust 1.85.0 for riscv64, i586, powerpc, sparc64, armv7, armv6, aarch64 and aarch64_eb, so the host system is not under suspicion of misbehaving.
HEAD
This is the 1.85.0 release bits from your tarball distribution, i.e. not checkout out from git.
Additional context
I'm curious what's needed to get rid of this error.
I can't seem to find a pattern to follow from the other mips target descriptions.
Build Log
The build log ends with
= note: some `extern` functions couldn't be found; some native libraries may need to be installed or have their path specified
= note: use the `-l` flag to specify native libraries to link
= note: use the `cargo:rustc-link-lib` directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#rustc-link-lib)
error: could not compile `clippy` (bin "clippy-driver") due to 1 previous error
Build completed unsuccessfully in 1:24:08
*** Error code 1
Stop.
make[2]: stopped in /usr/pkgsrc/wip/rust185
*** Error code 1
and an overview of the different phases already completed:
: {149} egrep '^[B0-9]' list.31
Based on these variables, the following variables have been set:
Building bootstrap
Building LLVM for mipsel-unknown-netbsd
Building LLVM for x86_64-unknown-netbsd
Basic/CMakeFiles/obj.LLVMTableGenBasic.dir/CodeGenIntrinsics.cpp.o
Basic/CMakeFiles/obj.LLVMTableGenBasic.dir/SDNodeProperties.cpp.o
Building stage0 library artifacts (x86_64-unknown-netbsd)
Building compiler artifacts (stage0 -> stage1, x86_64-unknown-netbsd)
Building stage0 tool lld-wrapper (x86_64-unknown-netbsd)
Building LLD for x86_64-unknown-netbsd
Building stage0 tool wasm-component-ld (x86_64-unknown-netbsd)
Building tool llvm-bitcode-linker (stage0 -> stage1, x86_64-unknown-netbsd)
Building stage1 library artifacts (x86_64-unknown-netbsd -> mipsel-unknown-netbsd)
Building stage1 library artifacts (x86_64-unknown-netbsd)
Building compiler artifacts (stage1:x86_64-unknown-netbsd -> stage2:mipsel-unknown-netbsd)
Building stage1 tool lld-wrapper (x86_64-unknown-netbsd -> mipsel-unknown-netbsd)
Building LLD for mipsel-unknown-netbsd
Building stage1 tool wasm-component-ld (x86_64-unknown-netbsd -> mipsel-unknown-netbsd)
Building tool llvm-bitcode-linker (stage1:x86_64-unknown-netbsd -> stage2:mipsel-unknown-netbsd)
Building tool rustdoc (stage1 -> stage2, mipsel-unknown-netbsd)
Building tool rust-analyzer-proc-macro-srv (stage1:x86_64-unknown-netbsd -> stage2:mipsel-unknown-netbsd)
Building stage0 tool rust-installer (x86_64-unknown-netbsd)
Building tool cargo (stage1:x86_64-unknown-netbsd -> stage2:mipsel-unknown-netbsd)
Building tool rls (stage1:x86_64-unknown-netbsd -> stage2:mipsel-unknown-netbsd)
Building tool rust-analyzer (stage1:x86_64-unknown-netbsd -> stage2:mipsel-unknown-netbsd)
Building tool rustfmt (stage1:x86_64-unknown-netbsd -> stage2:mipsel-unknown-netbsd)
Building tool cargo-fmt (stage1:x86_64-unknown-netbsd -> stage2:mipsel-unknown-netbsd)
Building tool clippy-driver (stage1:x86_64-unknown-netbsd -> stage2:mipsel-unknown-netbsd)
Build completed unsuccessfully in 1:24:08
81994.208u 5484.812s 1:27:59.08 1657.0% 29+5k 450+1805352io 21651pf+0w
: {150}