mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-12-21 11:03:29 +01:00
Added gmp installation in configure
This commit is contained in:
parent
1097b4489b
commit
e11b04e519
29
INSTALL.rst
29
INSTALL.rst
@ -43,6 +43,7 @@ Requirements
|
||||
- `Zlib`_
|
||||
- `GNU Patch`_
|
||||
- |ZeroMQ| : networking library
|
||||
- `GMP <https://gmplib.org/>`_ : Gnu Multiple Precision Arithmetic Library
|
||||
- |OCaml| compiler with |OPAM| package manager
|
||||
- |Ninja| : a parallel build system
|
||||
|
||||
@ -84,6 +85,7 @@ The following packages are supported by the :command:`configure` installer:
|
||||
* irpf90
|
||||
* zeromq
|
||||
* f77zmq
|
||||
* gmp
|
||||
* ocaml ( :math:`\approx` 10 minutes)
|
||||
* ezfio
|
||||
* docopt
|
||||
@ -110,11 +112,11 @@ If the :command:`configure` executable fails to install a specific dependency
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
If the :command:`configure` executable does not succeed to install a specific dependency,
|
||||
there are some proposition of how to download and install the minimal dependencies to compile and use the |QP|
|
||||
there are some proposition of how to download and install the minimal dependencies to compile and use the |QP|.
|
||||
|
||||
|
||||
Before doing anything below, try to install the packages with your package manager
|
||||
(:command:`apt`, :command:`yum`, etc)
|
||||
(:command:`apt`, :command:`yum`, etc).
|
||||
|
||||
|
||||
Ninja
|
||||
@ -216,6 +218,29 @@ With Debian or Ubuntu, you can use
|
||||
|
||||
sudo apt install zlib1g-dev
|
||||
|
||||
GMP
|
||||
---
|
||||
|
||||
GMP is the GNU Multiple Precision Arithmetic Library.
|
||||
|
||||
* Download the latest version of gmp here:
|
||||
`<ftp://ftp.gnu.org/gnu/gmp/gmp-6.1.2.tar.bz2>`_
|
||||
and move it in the :file:`${QP_ROOT}/external` directory
|
||||
|
||||
* Extract the archive, go into the :file:`gmp-*` directory and run
|
||||
the following commands
|
||||
|
||||
.. code:: bash
|
||||
|
||||
./configure --prefix=${QP_ROOT}
|
||||
make
|
||||
make install
|
||||
|
||||
With Debian or Ubuntu, you can use
|
||||
|
||||
.. code:: bash
|
||||
|
||||
sudo apt install libgmp-dev
|
||||
|
||||
|
||||
OCaml
|
||||
|
23
configure
vendored
23
configure
vendored
@ -175,7 +175,7 @@ if [[ "${PACKAGES}.x" != ".x" ]] ; then
|
||||
fi
|
||||
|
||||
if [[ ${PACKAGES} = all ]] ; then
|
||||
PACKAGES="zlib ninja irpf90 zeromq f77zmq ocaml ezfio docopt resultsFile bats"
|
||||
PACKAGES="zlib ninja irpf90 zeromq f77zmq gmp ocaml ezfio docopt resultsFile bats"
|
||||
fi
|
||||
|
||||
|
||||
@ -192,6 +192,21 @@ for PACKAGE in ${PACKAGES} ; do
|
||||
EOF
|
||||
|
||||
|
||||
elif [[ ${PACKAGE} = gmp ]] ; then
|
||||
|
||||
download \
|
||||
"ftp://ftp.gnu.org/gnu/gmp/gmp-6.1.2.tar.bz2" \
|
||||
"${QP_ROOT}"/external/gmp.tar.bz2
|
||||
execute << EOF
|
||||
cd "\${QP_ROOT}"/external
|
||||
tar --bzip2 --extract --file gmp.tar.bz2
|
||||
rm gmp.tar.bz2
|
||||
cd gmp*
|
||||
./configure --prefix=$QP_ROOT && make -j 8
|
||||
make install
|
||||
EOF
|
||||
|
||||
|
||||
elif [[ ${PACKAGE} = irpf90 ]] ; then
|
||||
|
||||
# When changing version of irpf90, don't forget to update etc/irpf90.rc
|
||||
@ -380,6 +395,12 @@ if [[ ${F77ZMQ} = $(not_found) ]] ; then
|
||||
fail
|
||||
fi
|
||||
|
||||
GMP=$(find_lib -lgmp)
|
||||
if [[ ${ZLIB} = $(not_found) ]] ; then
|
||||
error "GMP (gmp) is not installed."
|
||||
fail
|
||||
fi
|
||||
|
||||
OPAM=$(find_exe opam)
|
||||
if [[ ${OPAM} = $(not_found) ]] ; then
|
||||
error "OPAM (ocaml) package manager is not installed."
|
||||
|
Loading…
Reference in New Issue
Block a user