roc-lang / roc

A fast, friendly, functional language.
https://roc-lang.org
Universal Permissive License v1.0
4.47k stars 315 forks source link

failed to build compiler on raspberry pi 5 #6514

Open Anton-4 opened 9 months ago

Anton-4 commented 9 months ago
$ cargo build --bin roc
   Compiling inkwell v0.2.0 (https://github.com/roc-lang/inkwell?branch=inkwell-llvm-16#d1a59639)
   Compiling llvm-sys v160.1.3
   Compiling roc_bitcode_bc v0.0.1 (/home/username/gitrepos/roc-no-nix/roc/crates/compiler/builtins/bitcode/bc)
   Compiling packed_struct v0.10.1
   Compiling wasi_libc_sys v0.0.1 (/home/username/gitrepos/roc-no-nix/roc/crates/wasi-libc-sys)
   Compiling roc_bitcode v0.0.1 (/home/username/gitrepos/roc-no-nix/roc/crates/compiler/builtins/bitcode)
   Compiling roc_alias_analysis v0.0.1 (/home/username/gitrepos/roc-no-nix/roc/crates/compiler/alias_analysis)
   Compiling iced-x86 v1.20.0
   Compiling bincode v1.3.3
   Compiling roc_wasm_module v0.0.1 (/home/username/gitrepos/roc-no-nix/roc/crates/wasm_module)
error: failed to run custom build command for `roc_bitcode v0.0.1 (/home/username/gitrepos/roc-no-nix/roc/crates/compiler/builtins/bitcode)`

Caused by:
  process didn't exit successfully: `/home/username/gitrepos/roc-no-nix/roc/target/debug/build/roc_bitcode-8ad3ad2d9259ea18/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-changed=build.rs
  Compiling zig object `object` to: /home/username/gitrepos/roc-no-nix/roc/crates/compiler/builtins/bitcode/zig-out/builtins-host.o

  --- stderr
  An internal compiler expectation was broken.
  This is definitely a compiler bug.
  Please file an issue here: https://github.com/roc-lang/roc/issues/new/choose
  thread 'main' panicked at 'zig build object -Drelease=true failed with:

    thread 43475 panic: reached unreachable code
  Panicked during a panic. Aborting.
  error: the following build command crashed:
  /home/username/gitrepos/roc-no-nix/roc/crates/compiler/builtins/bitcode/zig-cache/o/186ff62e22bee449d32f9bb2eaf03785/build /home/username/Downloads/zig-linux-aarch64-0.11.0/zig /home/username/gitrepos/roc-no-nix/roc/crates/compiler/builtins/bitcode /home/username/gitrepos/roc-no-nix/roc/crates/compiler/builtins/bitcode/zig-cache /home/username/.cache/zig object -Drelease=true

  ', crates/compiler/builtins/bitcode/build.rs:188:21
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: failed to run custom build command for `roc_bitcode_bc v0.0.1 (/home/username/gitrepos/roc-no-nix/roc/crates/compiler/builtins/bitcode/bc)`

Caused by:
  process didn't exit successfully: `/home/username/gitrepos/roc-no-nix/roc/target/debug/build/roc_bitcode_bc-067c96be19ad5bbf/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-changed=build.rs
  Compiling host ir to: /home/username/gitrepos/roc-no-nix/roc/crates/compiler/builtins/bitcode/bc/../zig-out/builtins-host.ll
  Compiling 64-bit bitcode to: /home/username/gitrepos/roc-no-nix/roc/crates/compiler/builtins/bitcode/bc/../zig-out/builtins-host.bc

  --- stderr
  An internal compiler expectation was broken.
  This is definitely a compiler bug.
  Please file an issue here: https://github.com/roc-lang/roc/issues/new/choose
  thread 'main' panicked at 'zig build ir -Drelease=true failed with:

    thread 43476 panic: reached unreachable code
  Panicked during a panic. Aborting.
  error: the following build command crashed:
  /home/username/gitrepos/roc-no-nix/roc/crates/compiler/builtins/bitcode/zig-cache/o/186ff62e22bee449d32f9bb2eaf03785/build /home/username/Downloads/zig-linux-aarch64-0.11.0/zig /home/username/gitrepos/roc-no-nix/roc/crates/compiler/builtins/bitcode /home/username/gitrepos/roc-no-nix/roc/crates/compiler/builtins/bitcode/zig-cache /home/username/.cache/zig ir -Drelease=true

  ', crates/compiler/builtins/bitcode/bc/build.rs:126:21
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Anton-4 commented 9 months ago

This should be due to https://github.com/ziglang/zig/issues/16331

Fix is ready in PR https://github.com/ziglang/zig/pull/17382

Ocean-Moist commented 9 months ago

same issue on windows, latest commit