From a8dbea61d3d542089fb61c7392b5060508735d33 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Wed, 24 Jul 2019 08:11:17 +0200 Subject: [PATCH] Fixed opam installation --- INSTALL.rst | 11 +++++++++-- configure | 6 ++++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/INSTALL.rst b/INSTALL.rst index c91b184f..10f583db 100644 --- a/INSTALL.rst +++ b/INSTALL.rst @@ -328,7 +328,7 @@ OCaml echo ${QP_ROOT}/bin ${QP_ROOT}/external/opam_installer.sh --no-backup --fresh - You the :command:`opam` command can be installed in the :file:`${QP_ROOT}/bin` + The :command:`opam` command can be installed in the :file:`${QP_ROOT}/bin` directory. To do this, take the output of ``echo ${QP_ROOT}/bin`` and use it as an answer to where :command:`opam` should be installed. @@ -337,7 +337,14 @@ OCaml .. code:: bash - opam init --disable-sandboxing --comp=4.07.0 + opam init --comp=4.07.1 + eval `${QP_ROOT}/bin/opam env` + + If the installation fails because of bwrap, the you can initialize opam using: + + .. code:: bash + + opam init --disable-sandboxing --comp=4.07.1 eval `${QP_ROOT}/bin/opam env` * Install the required external OCaml libraries diff --git a/configure b/configure index c343c243..c3ff8942 100755 --- a/configure +++ b/configure @@ -297,12 +297,13 @@ EOF ${QP_ROOT}/bin + EOF rm ${QP_ROOT}/external/opam_installer.sh source ${OPAMROOT}/opam-init/init.sh > /dev/null 2> /dev/null || true - ${QP_ROOT}/bin/opam init --verbose --yes + ${QP_ROOT}/bin/opam init --verbose --yes --comp=4.07.1 --disable-sandboxing eval $(${QP_ROOT}/bin/opam env) opam install -y ${OCAML_PACKAGES} || exit 1 @@ -310,13 +311,14 @@ EOF # Conventional commands execute << EOF chmod +x "\${QP_ROOT}"/external/opam_installer.sh + "\${QP_ROOT}"/external/opam_installer.sh --no-backup rm --force \${QP_ROOT}/bin/opam export OPAMROOT=\${OPAMROOT:-\${QP_ROOT}/external/opam} echo \${QP_ROOT}/bin \ | sh \${QP_ROOT}/external/opam_installer.sh rm \${QP_ROOT}/external/opam_installer.sh source \${OPAMROOT}/opam-init/init.sh > /dev/null 2> /dev/null || true - \${QP_ROOT}/bin/opam init --verbose --yes + \${QP_ROOT}/bin/opam init --verbose --yes --comp=4.07.1 --disable-sandboxing eval \$(\${QP_ROOT}/bin/opam env) opam install -y \${OCAML_PACKAGES} || exit 1 EOF