Building Internet Identity locally throws error

Hi everyone,

I tried to build and deploy Internet Identity locally as written here: GitHub - dfinity/internet-identity: Internet Identity, the Single Sign On service for the Internet Computer.

The build fails, and an error is thrown as follows. Does anyone know what I am missing?

error: failed to run custom build command for `wabt-sys v0.8.0`

Caused by:
  process didn't exit successfully: `/tmp/cargo-installAdGCBt/release/build/wabt-sys-4f936b85bd067f17/build-script-build` (exit code: 101)
  --- stdout
  running: "cmake" "/home/pr/.cargo/registry/src/" "-DBUILD_TESTS=OFF" "-DBUILD_TOOLS=OFF" "-DCMAKE_INSTALL_PREFIX=/tmp/cargo-installAdGCBt/release/build/wabt-sys-6b69f364317380f8/out" "-DCMAKE_C_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_C_COMPILER=/usr/bin/cc" "-DCMAKE_CXX_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_CXX_COMPILER=/usr/bin/c++" "-DCMAKE_ASM_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_ASM_COMPILER=/usr/bin/cc" "-DCMAKE_BUILD_TYPE=Release"

  --- stderr
  thread 'main' panicked at '
  failed to execute command: No such file or directory (os error 2)
  is `cmake` not installed?

  build script failed, must exit now', /home/pr/.cargo/registry/src/
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: failed to compile `ic-cdk-optimizer v0.2.0`, intermediate artifacts can be found at `/tmp/cargo-installAdGCBt`

Caused by:
  build failed
The build step failed for canister 'rwlgt-iiaaa-aaaaa-aaaaa-cai' with an embedded error: The custom tool failed.



I figured out. I need to install cmake.

sudo snap install cmake --classic

Somebody should add this to README on github, for people like me who know nothing about rust and its ecosystem.

1 Like

cmake is a fairly standard tool for building out bin’s etc - I say this, but I hit the same snag when I did it too so it’s not uncommon. I think updating the readme with deps that aren’t common on all systems, or just having a hail mary apt-get or something in the instructions. Glad you got it working, don’t forget to use the npm script to run the frontend

1 Like

I have the same problem. I’m trying to run the sudo snap install cmake --classic command on macOS and I’m getting the following message: Interacting with snapd is not yet supported on darwin(macOS). This command has been left available for documentation purposes only. does anyone know a workaround for this or am I simply unable to run the Internet Identity repo locally on my mac?