Moonsong-Labs / madara-prover-api

RPC server and client to run the Stone Prover on the Madara sequencer.
10 stars 5 forks source link

`stone-prover` build script is unhelpful when Docker is misconfigured #24

Open notlesh opened 11 months ago

notlesh commented 11 months ago

If Docker is uninstalled/misconfigured, the output is rather unhelpful:

thread 'main' panicked at stone-prover/build.rs:94:40:
Failed to build Stone Prover using Dockerfile: CommandFailed(Output { status: ExitStatus(unix_wait_status(256)), stdout: "", stderr: "DEPRECATED: The legacy builder is deprecated and will be removed in a future release.\n            Install the buildx component to build images with BuildKit:\n            https://docs.docker.com/go/buildx/\n\nunable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /home/stephen/dev/msl/starkware/madara-prover-api/stone-prover/dependencies/stone-prover/Dockerfile: no such file or directory\n" })

I'm not sure what to suggest at this point, in part because I'm not very experienced with Docker. I may also be off the beaten path by trying to use pacman (Arch Linux package manager) to set it up.

Ideas:

notlesh commented 11 months ago

Context: #1

odesenfans commented 11 months ago

This particular error occurs because dependency submodules have not been pulled. The repository must be cloned with git clone --recursive. Alternatively, you can update submodules after the fact with

git submodule init
git submodule update
notlesh commented 11 months ago

I think this was a requirement in my case: https://wiki.archlinux.org/title/Docker#Rootless_Docker_daemon

And it was sufficient to build stone-prover (also after properly initializing the submodule as you mentioned). I think this can be considered part of a sane docker setup, so maybe there's nothing to do here...

notlesh commented 11 months ago

Here's a non-Arch specific bit of documentation on running rootless, FYI: https://docs.docker.com/engine/security/rootless/

Feel free to close this out if you want.

odesenfans commented 11 months ago

I guess you could say that, it's a reasonable expectation.