Stream: beginners

Topic: Fresh build fails on NixOS


view this post on Zulip dank (Jan 25 2023 at 09:00):

Hello everyone! For the first time, I tried to build the compiler. I cloned the repository, ran nix develop, then cargo run help.
The cargo build seems to fail with

error[E0432]: unresolved import `crate::expr::AccessorData`
  --> crates/compiler/can/src/def.rs:14:5
   |
14 | use crate::expr::AccessorData;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^ no `AccessorData` in `expr`

error[E0425]: cannot find function, tuple struct or tuple variant `Accessor` in this scope
    --> crates/compiler/can/src/def.rs:2324:25
     |
2324 |                         Accessor(AccessorData {
     |                         ^^^^^^^^ not found in this scope

   Compiling target-lexicon v0.12.4
   Compiling strum_macros v0.24.3
   Compiling crossbeam-epoch v0.9.9
Some errors have detailed explanations: E0425, E0432.
For more information about an error, try `rustc --explain E0425`.
error: could not compile `roc_can` due to 2 previous errors
warning: build failed, waiting for other jobs to finish...

view this post on Zulip Anton (Jan 25 2023 at 09:04):

Hi @dank, there's a build failure on main because we have not found a good merge queue solution yet, it should be resolved soon.
In the meantime you can check out the branch fix-record-accessor which contains the fix.

view this post on Zulip dank (Jan 25 2023 at 09:12):

Anton said:

Hi dank, there's a build failure on main because we have not found a good merge queue solution yet, it should be resolved soon.
In the meantime you can check out the branch fix-record-accessor which contains the fix.

thank you! Now that I've checked out the fix-record-accessor branch, build fails with a different error;

error: linking with `cc` failed: exit status: 1
  |
...
  = note: Terminated
          collect2: error: ld returned 143 exit status


error: could not compile `roc_cli` due to previous error

perhaps you can help me with this error aswell?
thanks for the reply!

view this post on Zulip Anton (Jan 25 2023 at 10:34):

Hmm, I can't reproduce this error and I'm on NixOS as well. I assume this second error was thrown when using the command cargo run help?

view this post on Zulip dank (Jan 25 2023 at 10:44):

Anton said:

Hmm, I can't reproduce this error and I'm on NixOS as well. I assume this second error was thrown when using the command cargo run help?

yes

view this post on Zulip Anton (Jan 25 2023 at 10:45):

Are you on NixOS 22.11?

view this post on Zulip dank (Jan 25 2023 at 10:46):

22.11.1705.b83e7f5a04a (Raccoon)

view this post on Zulip Anton (Jan 25 2023 at 10:47):

Quite the mystery :p can you do cargo clean followed by cargo build --release?

view this post on Zulip Anton (Jan 25 2023 at 10:59):

Can you share the output of the lscpu command?

view this post on Zulip dank (Jan 25 2023 at 11:04):

Anton said:

Quite the mystery :p can you do cargo clean followed by cargo build --release?

wow that actually worked

view this post on Zulip dank (Jan 25 2023 at 11:06):

Anton said:

Can you share the output of the lscpu command?

if you wanna see anyway it's here https://termbin.com/e14x

view this post on Zulip Anton (Jan 25 2023 at 11:06):

Great :) does cargo run help work as well now?

view this post on Zulip dank (Jan 25 2023 at 11:07):

let me see.. (slow computer)

view this post on Zulip dank (Jan 25 2023 at 11:11):

yes that works aswell

view this post on Zulip dank (Jan 25 2023 at 11:12):

weird that issue's just gone lol

view this post on Zulip dank (Jan 25 2023 at 11:12):

but thanks a lot!!

view this post on Zulip Anton (Jan 25 2023 at 11:14):

Happy to help :)

view this post on Zulip dank (Jan 25 2023 at 22:15):

Anton said:

Happy to help :)

Hey Anton, this is half related but- I want to start contributing to Roc . so now to PR it means I would need to checkout fix-record-accessor and then you guys cherry pick my commit from the new branch? like what's the workflow now with main being broken?

view this post on Zulip Folkert de Vries (Jan 25 2023 at 22:18):

main is fixed again

view this post on Zulip Folkert de Vries (Jan 25 2023 at 22:19):

so if you use latest main, you should be good

view this post on Zulip dank (Jan 25 2023 at 22:20):

Folkert de Vries said:

so if you use latest main, you should be good

ahh great. thanks

view this post on Zulip Anton (Jan 26 2023 at 08:34):

Hey Anton, this is half related but- I want to start contributing to Roc .

@dank awesome :) feel free to post something to #contributing if you need help!


Last updated: Jul 06 2025 at 12:14 UTC