Compilation issue
erikmd opened this issue · comments
Dear developers of Certicoq,
I've tried compiling Certicoq master
in order to play with the plugin; but I wasn't able to proceed, maybe because of some linking issue…
I've tried using the dependencies from the Git submodules with different versions of OCaml and Coq in ({4.05.0, 4.06.1, 4.07.0+flambda} × {8.8.1, 8.8.2}), but ended up with the error:
File "./CertiCoq.v", line 3, characters 0-33:
Error:
Anomaly "cannot find tmExistingInstance in module Template.TemplateMonad.Extractable."
Please report at http://coq.inria.fr/bugs/.
I've not investigated further, but FYI I paste below a sample Dockerfile I've been using, with OCaml version 4.06.1 and Coq version 8.8.1 (as suggested in the README.md
).
Do you think this issue is easy to solve?
Kind regards, Erik
Dockerfile
FROM coqorg/base:bare
ENV COMPILER="4.06.1"
ENV COQ_VERSION="8.8.1"
ENV NJOBS="2"
WORKDIR /home/coq
RUN ["/bin/bash", "--login", "-c", "set -x \
&& opam init --auto-setup --yes --jobs=${NJOBS} --compiler=${COMPILER} --disable-sandboxing \
&& eval $(opam env) \
&& opam repository add --all-switches --set-default coq-released https://coq.inria.fr/opam/released \
&& opam repository add --all-switches --set-default coq-extra-dev https://coq.inria.fr/opam/extra-dev \
&& opam repository add --all-switches --set-default coq-core-dev https://coq.inria.fr/opam/core-dev \
&& opam update -y \
&& opam pin add -n -y -k version coq ${COQ_VERSION} \
&& opam install -y -v -j ${NJOBS} coq \
&& opam clean -a -c -s --logs \
&& opam config list && opam repo list && opam list && coqc --version"]
ENV CERTICOQ_VERSION="abd82fd"
RUN ["/bin/bash", "--login", "-c", "set -x \
&& git clone https://github.com/PrincetonUniversity/certicoq.git \
&& cd certicoq && git checkout ${CERTICOQ_VERSION} \
&& git submodule update --init \
&& for dir in paramcoq coq-ext-lib SquiggleEq Template-Coq; \
do \
( cd \"submodules/${dir}\" && make -j ${NJOBS} && make install ); \
done"]
WORKDIR /home/coq/certicoq
RUN ["/bin/bash", "--login", "-c", "set -x \
&& make -j ${NJOBS} && make install"]
Hi Erik,
Thank you for opening this issue. There is some linking issue with MetaCoq at the moment. I have created a rollback branchopam-rollback
that is compatible with the opam version of TemplateCoq (coq-template-coq.2.1~beta3
). Please let us know if that doesn't work for you! We'll update this issue once the master
branch is fixed.
Indeed I hadn't checked that the plugin compiled correctly, I fixed a bunch of things related to the extracted code and it builds correctly now, for me. Can you check @osavaryb ? You might want to remove plugin/extraction/*
and theories/Extraction/*.ml
(then resurrect things there) first.
This is fixed, master should now compile, please reopen if you still have problems after pulling.