Skip to content
GitLab
  • Explore
  • Sign in
  • The Tor Project
  • Applications
  • tor-browser-build
  • Issues
  • #40094

Aarch64 fenix rust cross-compilation fails

While building fenix-rust-android-aarch64:

  = note: /var/tmp/build/rustc-1.43.0-src/build/build/x86_64-unknown-linux-gnu/stage2-std/armv7-linux-androideabi/release/deps/std-0c290f22c43402b2.std.e84jh5q4-cgu.0.rcgu.o: error adding symbols: File in wrong format
          clang: error: linker command failed with exit code 1 (use -v to see invocation)


error: aborting due to previous error

error: could not compile `std`.

To learn more, run the command again with --verbose.
command did not execute successfully: "/var/tmp/dist/fenix-rust-rust-old/bin/cargo" "build" "-Zconfig-profile" "--target" "armv7-linux-androideabi" "-Zbinary-dep-depinfo" "-j" "8" "--release" "--frozen" "--features" "panic-unwind backtrace compiler-builtins-c" "--manifest-path" "/var/tmp/build/rustc-1.43.0-src/src/libtest/Cargo.toml" "--message-format" "json-render-diagnostics"                           
expected success, got: exit code: 101
failed to run: /var/tmp/build/rustc-1.43.0-src/build/build/bootstrap/debug/bootstrap build

And, this seems to be a result of a mismatch in the configured toolchain (in the container's build script):

mkdir build
cd build
../configure --prefix=$distdir --enable-local-rust --enable-vendor --enable-extended --release-channel=stable --sysconfdir=etc --target=armv7-linux-androideabi --set=target.armv7-linux-androideabi.cc=aarch64-linux-android21-clang --set=target.armv7-linux-androideabi.ar=aarch64-linux-android-ar

We should be building for aarch64, but we're targetting armv7 and using the aarch64 toolchain.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking