Stream: beginners

Topic: Getting started with nightlies


view this post on Zulip Ed Kelly (Nov 22 2021 at 18:10):

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?

view this post on Zulip Brendan Hansknecht (Nov 22 2021 at 18:13):

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.

view this post on Zulip Brendan Hansknecht (Nov 22 2021 at 18:15):

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.

view this post on Zulip Ed Kelly (Nov 22 2021 at 18:15):

I just did sudo apt install clang and it works now! Thanks so much!

view this post on Zulip Brendan Hansknecht (Nov 22 2021 at 18:16):

Interesting. I guess we do already package the builtins correctly.

view this post on Zulip Ed Kelly (Nov 22 2021 at 18:20):

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.

view this post on Zulip Brendan Hansknecht (Nov 22 2021 at 18:27):

yep

view this post on Zulip Anton (Nov 22 2021 at 18:33):

@Ed Kelly I just added documentation(start at the main README) for this on the nightly_examples branch :)

view this post on Zulip Ed Kelly (Nov 22 2021 at 18:47):

That's awesome, thank you! (I spotted one little typo: nighly -> nightly)

view this post on Zulip Jason Hobbs (Dec 01 2021 at 15:26):

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?

view this post on Zulip Anton (Dec 01 2021 at 15:31):

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.

view this post on Zulip Jason Hobbs (Dec 01 2021 at 15:36):

~/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

view this post on Zulip Jason Hobbs (Dec 01 2021 at 15:36):

@Anton There you go... thanks for the help!

view this post on Zulip Anton (Dec 01 2021 at 15:55):

I'll generate you a nightly for 11th Gen Intel processors.

view this post on Zulip Jason Hobbs (Dec 01 2021 at 15:57):

oh wow! Thank you!

view this post on Zulip Anton (Dec 01 2021 at 16:05):

https://www.dropbox.com/s/jvyv5n7w3z1y4dp/roc?dl=0

roc

view this post on Zulip Anton (Dec 01 2021 at 16:06):

You can swap this roc binary for the one in the decompressed nightly archive.

view this post on Zulip Anton (Dec 01 2021 at 16:08):

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.

view this post on Zulip Jason Hobbs (Dec 01 2021 at 16:11):

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!

view this post on Zulip Anton (Dec 01 2021 at 16:31):

Awesome :tada: you're welcome :)


Last updated: Jul 06 2025 at 12:14 UTC