I was picking up a stale PR and started getting this failure when trying to build the compiler
Compiling roc_bitcode_bc v0.0.1 (/Users/hdharam/Documents/dev/roc/crates/compiler/builtins/bitcode/bc)
error: failed to run custom build command for `roc_bitcode v0.0.1 (/Users/hdharam/Documents/dev/roc/crates/compiler/builtins/bitcode)`
Caused by:
process didn't exit successfully: `/Users/hdharam/Documents/dev/roc/target/debug/build/roc_bitcode-e1214b17feff2496/build-script-build` (exit status: 1)
--- stdout
cargo:rerun-if-changed=build.rs
Compiling zig object `object` to: /Users/hdharam/Documents/dev/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>
zig build object -Drelease=true failed with:
error: Unexpected
Location: crates/compiler/builtins/bitcode/build.rs:188:21
this is after running cargo clean
and nix develop
. I saw that other folks ran into similar issues while doing manual installs with an incorrect zig version, but I confirmed my zig version in the nix shell is correct.
$ which zig
/nix/store/xvw8ikyvk7jn2f3vj6xd9n1yxpgvk02r-zig-0.11.0/bin/zig
Can you execute git clean -X -d -f
and try again?
that worked, thanks! just curious, do you have a guess why?
Hrishikesh Dharam has marked this topic as resolved.
Your previous compilation outside of nix could have done weird stuff and cargo clean
does not remove all files
Last updated: Jul 06 2025 at 12:14 UTC