9
1
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-07-21 10:13:26 +02:00

Fixed opam installation

This commit is contained in:
Anthony Scemama 2019-07-24 08:11:17 +02:00
parent edd2276b75
commit a8dbea61d3
2 changed files with 13 additions and 4 deletions

View File

@ -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

6
configure vendored
View File

@ -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