Hi all, I just downloaded the latest nightly build from https://github.com/rtfeldman/roc/releases/tag/nightly and am having trouble working with files. If I type roc
I get the editor, and roc repl
seems to work fine, but roc [Filename.roc]
panics with
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', compiler/build/src/link.rs:312:22
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Any { .. }', cli/src/build.rs:223:50
Is this expected? Am I doing something wrong?
Based on where it failed, my guess is that you don't have clang
installed, which is used for building c hosts. Though it could also be that a file clang is trying to load is missing.
Actually, I just realized that clang depends on loading bitcode::BUILTINS_HOST_OBJ_PATH
. That definitely isn't packed with the nightly build. We probably need to modify the compiler to include those bytes and write it to a temporary file.
I just did sudo apt install clang
and it works now! Thanks so much!
Interesting. I guess we do already package the builtins correctly.
It seems to work on the hello-world example , but not hello-zig or hello-rust - but that probably figures, as I have neither Zig nor Rust installed yet.
yep
@Ed Kelly I just added documentation(start at the main README) for this on the nightly_examples branch :)
That's awesome, thank you! (I spotted one little typo: nighly -> nightly)
I'm having some trouble Getting Started. Following https://github.com/rtfeldman/roc/blob/trunk/getting_started/linux_x86.md, when I run the examples (tried Rust and Clang; tried 1130 and 1201 builds) both produce: Illegal instruction (core dumped)
. I'm running XUbuntu on a VirtualBox VM. Any idea how to fix this?
Hi @Jason Hobbs, can you tell me what cpu you're using? Executing lscpu
inside a terminal in XUbuntu should give me everything I need.
~/projects/exploration/roc1130 132 (108ms)
$ lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
Address sizes: 39 bits physical, 48 bits virtual
CPU(s): 1
On-line CPU(s) list: 0
Thread(s) per core: 1
Core(s) per socket: 1
Socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 140
Model name: 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz
Stepping: 1
CPU MHz: 2803.196
BogoMIPS: 5606.39
Hypervisor vendor: KVM
Virtualization type: full
L1d cache: 48 KiB
L1i cache: 32 KiB
L2 cache: 1.3 MiB
L3 cache: 12 MiB
NUMA node0 CPU(s): 0
Vulnerability Itlb multihit: Not affected
Vulnerability L1tf: Not affected
Vulnerability Mds: Not affected
Vulnerability Meltdown: Not affected
Vulnerability Spec store bypass: Vulnerable
Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user
pointer sanitization
Vulnerability Spectre v2: Mitigation; Enhanced IBRS, RSB filling
Vulnerability Srbds: Not affected
Vulnerability Tsx async abort: Not affected
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtr
r pge mca cmov pat pse36 clflush mmx fxsr sse s
se2 ht syscall nx rdtscp lm constant_tsc rep_go
od nopl xtopology nonstop_tsc cpuid tsc_known_f
req pni ssse3 pcid sse4_1 sse4_2 hypervisor lah
f_lm invpcid_single ibrs_enhanced fsgsbase invp
cid md_clear flush_l1d arch_capabilities
@Anton There you go... thanks for the help!
I'll generate you a nightly for 11th Gen Intel processors.
oh wow! Thank you!
https://www.dropbox.com/s/jvyv5n7w3z1y4dp/roc?dl=0
You can swap this roc binary for the one in the decompressed nightly archive.
I built the binary for generic x86-64 processors this may run a tad slower. I was not able to build for 11th gen intel because I also encountered the illegal instruction in a dependency. I'll make an issue for this.
Looks great @Anton! Just tested it and I'm getting "Hello, World!" for Rust and C. Took 3s for Rust on 1st run (400ms after); C was 132ms 1st (87ms after). Not bad :-) Thanks!
Awesome :tada: you're welcome :)
Last updated: Jul 06 2025 at 12:14 UTC