Start-testnet-client.sh build fails (Ubuntu)

Hi, I’m trying to build the TestNet Watcher Node from a checked out tree.

I’m on commit c7c01be64d8e927ce3d40d404f74c3c5b268a087 (on master).

running ./start-testnet-client.sh after mob prompt fails at:

error: failed to run custom build command for `typenum v1.12.0`

Caused by:
  process didn't exit successfully: `/tmp/mobilenode/target/release/build/typenum-9dc34601e022a02e/build-script-main` (signal: 4, SIGILL: illegal instruction)
--- stdout
cargo:rustc-env=TYPENUM_BUILD_CONSTS=/tmp/mobilenode/target/release/build/typenum-eeba9b3bd89174d5/out/consts.rs

warning: build failed, waiting for other jobs to finish...
error: build failed
Terminated```

Any suggestions as to what I am doing wrong?

Thanks
1 Like

I am on the wrong (old) hardware. The target-cpu for the cargo build is set to newer hardware. That explains the illegal instruction I was seeing.

Prefixing RUSTFLAGS="-C target-cpu=native" to the cargo build in the script results in the build completing (and the mobilecoind running and synchronizing the ledger).

I am not sure how this is going to work with the existing SGX_MODE=HW and IAS_MODE=PROD prefixes to the cargo build … but I will leave that alone for now…

Update: It is easier to edit .cargo/config to switch the target-cpu from skylake to native.

1 Like