I can't compile `ic`

I am trying to compile dfinity/ic from Git. It produces an unhelpful error message. How to overcome this?

   Compiling walrus-macro v0.19.0
error: failed to run custom build command for `lifeline v0.8.0 (/home/porton/t/ic/rs/nns/handlers/lifeline/impl)`

Caused by:
  process didn't exit successfully: `/home/porton/t/ic/target/debug/build/lifeline-6bc0ecd3b8171598/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-changed=lifeline.mo
  cargo:rerun-if-changed=lifeline.did
  cargo:rerun-if-changed=build.rs
  cargo:rerun-if-changed=../../root/impl/canister/root.did
  cargo:rerun-if-changed=../../../governance/canister/governance.did
  cargo:rerun-if-changed=../../../governance/canister/governance.did
  did_file_path="../../../governance/canister/governance.did"
  cargo:rerun-if-changed=../../root/impl/canister/root.did
  did_file_path="../../root/impl/canister/root.did"

  --- stderr
  Could not build the Wasm for the lifeline canister. Error:
  IO error: Os { code: 2, kind: NotFound, message: "No such file or directory" }
  The current directory is Ok("/home/porton/t/ic/rs/nns/handlers/lifeline/impl").
  `moc --version` output: Err(Os { code: 2, kind: NotFound, message: "No such file or directory" }).
  IN_NIX_SHELL=Err(NotPresent).
  NIX_BUILD_TOP=Err(NotPresent).
  lifeline.mo exists? Ok(true).
  "/home/porton/t/ic/target/debug/build/lifeline-ca90de2bb5bf92ca/out/rrkah-fqaaa-aaaaa-aaaaq-cai.did" exists? true.
  "/home/porton/t/ic/target/debug/build/lifeline-ca90de2bb5bf92ca/out/r7inp-6aaaa-aaaaa-aaabq-cai.did" exists? true.
  PATH=Ok("/home/porton/bin:/home/porton/.nvm/versions/node/v16.16.0/bin:/home/porton/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/home/porton/.local/share/dfx/bin:/home/porton/.daml/bin:/home/porton/.elan/bin:/home/porton/.local/share/solana/install/active_release/bin:/home/porton/.cargo/bin:/home/porton/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin:/home/porton/.local/bin:/home/porton/.local/bin").
  `ls` output: Ok(Output { status: ExitStatus(unix_wait_status(0)), stdout: "BUILD.bazel\nbuild.rs\nCargo.toml\nlifeline.did\nlifeline.mo\nREADME.md\nsrc\ntests\n", stderr: "" }).
  thread 'main' panicked at 'explicit panic', rs/nns/handlers/lifeline/impl/build.rs:171:9
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
1 Like

this is just a wild guess, but is moc installed on your system? Releases · dfinity/motoko · GitHub

1 Like

moc is indeed installed.