<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Package: rustc<br>
Version: 1.37.0+dfsg1-1<br>
<br>
I recently tried to crossbuild rust for Debian armhf on Debian
bullseye amd64. To build I used the command<br>
<br>
CONFIG_SITE=/etc/dpkg-cross/cross-config.armhf dpkg-buildpackage
-a armhf -Pcross,nocheck 2>&1 | tee ../rustc-debarmhf.log<br>
<br>
Unfortunately it failed to link llvm, it looks like it was trying
to link the amd64 llvm into an armhf binary.<br>
<blockquote type="cite">
<pre>error: linking with `arm-linux-gnueabihf-gcc` failed: exit code: 1
|
= note: "arm-linux-gnueabihf-gcc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-L" "/rustc-1.37.0+dfsg1/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/armv7-unknown-linux-gnueabihf/lib" "/rustc-1.37.0+dfsg1/build/x86_64-unknown-linux-gnu/stage1-codegen/armv7-unknown-linux-gnueabihf/release/deps/rustc_codegen_llvm-473de3cc23195500.rustc_codegen_llvm.ae2gk157-cgu.0.rcgu.o" "/rustc-1.37.0+dfsg1/build/x86_64-unknown-linux-gnu/stage1-codegen/armv7-unknown-linux-gnueabihf/release/deps/rustc_codegen_llvm-473de3cc23195500.rustc_codegen_llvm.ae2gk157-cgu.1.rcgu.o" "/rustc-1.37.0+dfsg1/build/x86_64-unknown-linux-gnu/stage1-codegen/armv7-unknown-linux-gnueabihf/release/deps/rustc_codegen_llvm-473de3cc23195500.rustc_codegen_llvm.ae2gk157-cgu.10.rcgu.o" "/rustc-1.37.0+dfsg1/build/x86_64-unknown-linux-gnu/stage1-codegen/armv7-unknown-linux-gnueabihf/release/deps/rustc_codegen_llvm-473de3cc23195500.rustc_codegen_llvm.ae2gk157-cgu.11.rcgu.o" "/rustc-1.37.0+dfsg1/build/x86_64-unknown-linux-gnu/stage1-codegen/armv7-unknown-linux-gnueabihf/release/deps/rustc_codegen_llvm-473de3cc23195500.rustc_codegen_llvm.ae2gk157-cgu.12.rcgu.o" "/rustc-1.37.0+dfsg1/build/x86_64-unknown-linux-gnu/stage1-codegen/armv7-unknown-linux-gnueabihf/release/deps/rustc_codegen_llvm-473de3cc23195500.rustc_codegen_llvm.ae2gk157-cgu.13.rcgu.o" "/rustc-1.37.0+dfsg1/build/x86_64-unknown-linux-gnu/stage1-codegen/armv7-unknown-linux-gnueabihf/release/deps/rustc_codegen_llvm-473de3cc23195500.rustc_codegen_llvm.ae2gk157-cgu.14.rcgu.o" "/rustc-1.37.0+dfsg1/build/x86_64-unknown-linux-gnu/stage1-codegen/armv7-unknown-linux-gnueabihf/release/deps/rustc_codegen_llvm-473de3cc23195500.rustc_codegen_llvm.ae2gk157-cgu.15.rcgu.o" "/rustc-1.37.0+dfsg1/build/x86_64-unknown-linux-gnu/stage1-codegen/armv7-unknown-linux-gnueabihf/release/deps/rustc_codegen_llvm-473de3cc23195500.rustc_codegen_llvm.ae2gk157-cgu.2.rcgu.o" "/rustc-1.37.0+dfsg1/build/x86_64-unknown-linux-gnu/stage1-codegen/armv7-unknown-linux-gnueabihf/release/deps/rustc_codegen_llvm-473de3cc23195500.rustc_codegen_llvm.ae2gk157-cgu.3.rcgu.o" "/rustc-1.37.0+dfsg1/build/x86_64-unknown-linux-gnu/stage1-codegen/armv7-unknown-linux-gnueabihf/release/deps/rustc_codegen_llvm-473de3cc23195500.rustc_codegen_llvm.ae2gk157-cgu.4.rcgu.o" "/rustc-1.37.0+dfsg1/build/x86_64-unknown-linux-gnu/stage1-codegen/armv7-unknown-linux-gnueabihf/release/deps/rustc_codegen_llvm-473de3cc23195500.rustc_codegen_llvm.ae2gk157-cgu.5.rcgu.o" "/rustc-1.37.0+dfsg1/build/x86_64-unknown-linux-gnu/stage1-codegen/armv7-unknown-linux-gnueabihf/release/deps/rustc_codegen_llvm-473de3cc23195500.rustc_codegen_llvm.ae2gk157-cgu.6.rcgu.o" "/rustc-1.37.0+dfsg1/build/x86_64-unknown-linux-gnu/stage1-codegen/armv7-unknown-linux-gnueabihf/release/deps/rustc_codegen_llvm-473de3cc23195500.rustc_codegen_llvm.ae2gk157-cgu.7.rcgu.o" "/rustc-1.37.0+dfsg1/build/x86_64-unknown-linux-gnu/stage1-codegen/armv7-unknown-linux-gnueabihf/release/deps/rustc_codegen_llvm-473de3cc23195500.rustc_codegen_llvm.ae2gk157-cgu.8.rcgu.o" "/rustc-1.37.0+dfsg1/build/x86_64-unknown-linux-gnu/stage1-codegen/armv7-unknown-linux-gnueabihf/release/deps/rustc_codegen_llvm-473de3cc23195500.rustc_codegen_llvm.ae2gk157-cgu.9.rcgu.o" "-o" "/rustc-1.37.0+dfsg1/build/x86_64-unknown-linux-gnu/stage1-codegen/armv7-unknown-linux-gnueabihf/release/deps/librustc_codegen_llvm-473de3cc23195500.so" "-Wl,--version-script=/tmp/rustc31CjYq/list" "/rustc-1.37.0+dfsg1/build/x86_64-unknown-linux-gnu/stage1-codegen/armv7-unknown-linux-gnueabihf/release/deps/rustc_codegen_llvm-473de3cc23195500.41mxidpu0s1cdw9e.rcgu.o" "-Wl,-zrelro" "-Wl,-znow" "-Wl,-O1" "-nodefaultlibs" "-L" "/rustc-1.37.0+dfsg1/build/x86_64-unknown-linux-gnu/stage1-codegen/armv7-unknown-linux-gnueabihf/release/deps" "-L" "/rustc-1.37.0+dfsg1/build/x86_64-unknown-linux-gnu/stage1-codegen/release/deps" "-L" "/rustc-1.37.0+dfsg1/build/x86_64-unknown-linux-gnu/stage1-codegen/armv7-unknown-linux-gnueabihf/release/build/rustc_llvm-d47d526bc110db6b/out" "-L" "/usr/lib/llvm-8/lib" "-L" "/rustc-1.37.0+dfsg1/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/armv7-unknown-linux-gnueabihf/lib" "-Wl,-Bstatic" "-Wl,--whole-archive" "/tmp/rustc31CjYq/librustc_llvm-0cff9626ae17b31e.rlib" "-Wl,--no-whole-archive" "-L" "/rustc-1.37.0+dfsg1/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/armv7-unknown-linux-gnueabihf/lib" "-Wl,-Bdynamic" "-lrustc_codegen_ssa-57ec134f8b5b3198" "-L" "/rustc-1.37.0+dfsg1/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/armv7-unknown-linux-gnueabihf/lib" "-lrustc_codegen_utils-0ebe603ed0ced30f" "-L" "/rustc-1.37.0+dfsg1/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/armv7-unknown-linux-gnueabihf/lib" "-lrustc_metadata-7e4ec8b7bf943908" "-L" "/rustc-1.37.0+dfsg1/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/armv7-unknown-linux-gnueabihf/lib" "-lsyntax_ext-9b68c6dd5a601791" "-L" "/rustc-1.37.0+dfsg1/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/armv7-unknown-linux-gnueabihf/lib" "-lrustc_incremental-7e77724e600173fc" "-L" "/rustc-1.37.0+dfsg1/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/armv7-unknown-linux-gnueabihf/lib" "-lrustc_allocator-7bc1aed0fa9bd9e8" "-L" "/rustc-1.37.0+dfsg1/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/armv7-unknown-linux-gnueabihf/lib" "-lrustc-e76acd7c28f05593" "-L" "/rustc-1.37.0+dfsg1/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/armv7-unknown-linux-gnueabihf/lib" "-lfmt_macros-54c231dafd9778d4" "-L" "/rustc-1.37.0+dfsg1/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/armv7-unknown-linux-gnueabihf/lib" "-lrustc_fs_util-e6b008767783d2bc" "-L" "/rustc-1.37.0+dfsg1/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/armv7-unknown-linux-gnueabihf/lib" "-ltest-88a7c29d3d007981" "-L" "/rustc-1.37.0+dfsg1/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/armv7-unknown-linux-gnueabihf/lib" "-lterm-d2435a6a6f5308fb" "-L" "/rustc-1.37.0+dfsg1/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/armv7-unknown-linux-gnueabihf/lib" "-lsyntax-e1e5881469b6616d" "-L" "/rustc-1.37.0+dfsg1/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/armv7-unknown-linux-gnueabihf/lib" "-lrustc_target-f198399f3894fa00" "-L" "/rustc-1.37.0+dfsg1/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/armv7-unknown-linux-gnueabihf/lib" "-lrustc_errors-7a4942f3928b90c2" "-L" "/rustc-1.37.0+dfsg1/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/armv7-unknown-linux-gnueabihf/lib" "-lsyntax_pos-6717744725272f74" "-L" "/rustc-1.37.0+dfsg1/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/armv7-unknown-linux-gnueabihf/lib" "-larena-a7f526a47e242bb2" "-L" "/rustc-1.37.0+dfsg1/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/armv7-unknown-linux-gnueabihf/lib" "-lrustc_data_structures-24b90b9e3ef9e46e" "-L" "/rustc-1.37.0+dfsg1/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/armv7-unknown-linux-gnueabihf/lib" "-lgraphviz-013067e705447864" "-L" "/rustc-1.37.0+dfsg1/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/armv7-unknown-linux-gnueabihf/lib" "-lrustc_cratesio_shim-4a5f486c1d6c466f" "-L" "/rustc-1.37.0+dfsg1/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/armv7-unknown-linux-gnueabihf/lib" "-lserialize-da4ccce658f6e0d0" "-Wl,--start-group" "-L" "/rustc-1.37.0+dfsg1/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/armv7-unknown-linux-gnueabihf/lib" "-lstd-a115bfa48b458a6e" "-Wl,--end-group" "-Wl,-Bstatic" "/tmp/rustc31CjYq/libcompiler_builtins-96b34887aca7ea28.rlib" "-Wl,-Bdynamic" "-lLLVM-8" "-lstdc++" "-lz" "-lutil" "-lutil" "-ldl" "-lrt" "-lpthread" "-lgcc_s" "-lc" "-lm" "-lrt" "-lpthread" "-lutil" "-lutil" "-shared" "-Wl,-soname=librustc_codegen_llvm-473de3cc23195500.so" "-Wl,-z,relro"
= note: /usr/lib/llvm-8/lib/libLLVM-8.so: file not recognized: file format not recognized
collect2: error: ld returned 1 exit status</pre>
</blockquote>
<br>
<br>
<br>
Full log at <a class="moz-txt-link-freetext" href="http://plugwash.raspbian.org/rustc-debarmhf.log">http://plugwash.raspbian.org/rustc-debarmhf.log</a><br>
</p>
<p>Note: this test was motivated by my work on trying to update
rustc in raspbian, but the test itself did not involve any stuff
from raspbian.<br>
</p>
</body>
</html>