Closed yuval-k closed 7 years ago
Sorry for the delayed response, @uvgroovy . The current master of fat-filesystem
is built against the upcoming MirageOS 3 API, and won't build without the accompanying set of tools in that universe. Until MirageOS 3 is available in the public opam
repository, you'll need to amend your RUN statement to get the right set of dependencies for the current master:
RUN opam init -y && cd /tmp/ && \
opam remote add mirage-dev https://github.com/mirage/mirage-dev.git && \
opam update && \
git clone https://github.com/mirage/ocaml-fat && \
cd /tmp/ocaml-fat && \
opam pin add ocaml-fat . -n -y && \
opam install ocaml-fat --verbose
That seems to work. Thanks!
Is there any way to pin the specific version of mirage-dev in "opam remote add mirage-dev https://github.com/mirage/mirage-dev.git"? My goal is to guarantee that the container build will not fail in the future.
Unfortunately mirage-dev
itself is pointing at the current master of a whole bunch of packages, so pinning a specific commit won't be too helpful. If you can use the last released version of the package (the one you get via opam install fat-filesystem
), the better thing to do would be this, which will get you the source for the latest released version of fat-filesystem
:
RUN opam init -y && cd /tmp/ && \
opam source fat-filesystem --dir ocaml-fat && \
cd /tmp/ocaml-fat && \
opam pin add ocaml-fat . -n -y && \
opam install ocaml-fat --verbose
That last example gave me build errors - so going to use the previous one. Thanks!
Sorry to bring this thread back from the dead.
@yomimono I'm running the command as you've typed it:
RUN opam init -y && cd /tmp/ && \
opam remote add mirage-dev https://github.com/mirage/mirage-dev.git && \
opam update && \
git clone https://github.com/mirage/ocaml-fat && \
cd /tmp/ocaml-fat && \
opam pin add ocaml-fat . -n -y && \
opam install ocaml-fat --verbose
I've also tried your other suggestion:
RUN opam init -y && cd /tmp/ && \
opam source fat-filesystem --dir ocaml-fat && \
cd /tmp/ocaml-fat && \
opam pin add ocaml-fat . -n -y && \
opam install ocaml-fat --verbose
But am getting the following error:
[NOTE] No package definition found for ocaml-fat.~dev: please complete the template
Error opening terminal: unknown.
[ERROR] Empty file or editor error, aborting.
[ERROR] No valid package definition found
I don't quite understand the error about a missing package def for ocaml-fat.~dev.
Thanks for any help.
dear @adam-hanna, the opam package name of this repository is fat-filesystem
. it used to use other names (e.g. ocaml-fat
). there's no need to add the mirage-dev
remote. you should just be able to run opam install fat-filesystem
(and depend in your library on fat-filesystem
).
Got an error trying to build mirage-fat, (I am trying to get the fat binary built), I get this error message:
I used this Dockerfile to build mirage-fat:
(place it in an empty folder and do
docker build .
)I tried checking out and building old versions, going back to early September, all failed..
Help is appreciated! Yuval