-
Notifications
You must be signed in to change notification settings - Fork 37
Conversation
Pin build to x86 since it is broken on ARM. Required on for M1 users.
Looks like there is a build error, looking into it. Making docker image rvt_solvers:latest using Dockerfile
../mkimage: line 20: [: -v: unary operator expected
[+] Building 0.4s (6/17)
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 1.76kB 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/rvt_base:latest 0.0s
=> [ 1/13] FROM docker.io/library/rvt_base:latest 0.0s
=> importing cache manifest from rvt_solvers:latest 0.0s
=> ERROR [ 2/13] RUN mkdir /home/root/minisat 0.2s
------
> [ 2/13] RUN mkdir /home/root/minisat:
#4 0.184 /usr/bin/mkdir: cannot create directory '/home/root/minisat': No such file or directory |
Apparently /home/root didn't exist. Spammed a mkdir -p /home/root, crossing fingers. |
Brilliant, thanks for this! |
Um, it doesn't work yet, why I pulled the PR. First issue is you need to set up a non-root user under Ubuntu or else change the paths on /root/ vs /home/root. Second issue was a lot of compiler errors in Rust. Setting "-C codegen-units=1" fixed the termcolor error, but there was another memory out of bounds issue on rust demangle. For now running https://mac.getutm.app/gallery/ubuntu-20-04 (rebuilt as x86) might be the best option for M1 users. |
I'm not sure what is going on with /root vs /home/root - the docker building step should not be doing anything with either of those directories. Instead, everything should be built inside /home/${USERNAME} where ${USERNAME} is your account name. So if your login was 'chad', it should all be in /home/chad docker/mkimage
and docker/base/Dockerfile
And then various docker/*/Dockerfile scripts do things like this at the start
|
I'm guessing that the problem you are hitting is due to the way we (mis?)use docker. Our process of building a docker container is intended to create a container that is customized for one specific user (usually the person who built it). We haven't tried to make a more general/flexible container that can be shared with others – we're trying to strike a balance between having something that is easy for us to use when developing RVT and something that is easy to install on a range of platforms. We also have not put much effort into creating small images that are suitable for sharing with others. (eg by copying the pattern in the KLEE Dockerfile of building all the binaries in one docker image and then COPYing the binaries over. This seemed like a good choice when we started because it forced us to use Docker on a day to day basis - which made it less likely that we would break Docker. |
The M1 is macOS zsh by default, so it is probably passing environment information differently than Ubuntu/bash. In other projects I set up a "builder" user in the base image that is added to the sudoers file. I'll resubmit when I figure out the rest of the Rust compile errors. |
Pin build to x86 since it is broken on ARM. Required for M1 users.