Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

installation of ocaml: gmp-devel and zeromq-devel needed, even if present in libs and include #176

Closed
matthiasbe opened this issue Oct 21, 2021 · 4 comments

Comments

@matthiasbe
Copy link

Hello,

I am trying to install Quantum Package on our cluster.

I issued the commands

git clone https://github.com/QuantumPackage/qp2.git
cd qp2
./configure
./configure --install=all

The installation of OCaml fails with the following log:

++ opam install -y ocamlbuild cryptokit zmq sexplib ppx_sexp_conv ppx_deriving getopt
The following actions will be performed:
  ∗ install conf-pkg-config     2        [required by conf-zlib, conf-zmq]
  ∗ install ocamlfind           1.9.1    [required by getopt, ppx_deriving]
  ∗ install conf-gmp            3        [required by conf-gmp-powm-sec, zarith]
  ∗ install dune                2.9.1    [required by sexplib, ppx_deriving, cryptokit, etc.]
  ∗ install ocamlbuild          0.14.0
  ∗ install conf-zmq            0.1      [required by zmq]
  ∗ install conf-zlib           1        [required by cryptokit]
  ∗ install num                 1.4      [required by sexplib]
  ∗ install zarith              1.12     [required by cryptokit]
  ∗ install conf-gmp-powm-sec   3        [required by cryptokit]
  ∗ install stdlib-shims        0.3.0    [required by ppxlib]
  ∗ install stdint              0.7.0    [required by zmq]
  ∗ install sexplib0            v0.14.0  [required by ppx_sexp_conv, sexplib]
  ∗ install result              1.5      [required by ppx_deriving]
  ∗ install ppx_derivers        1.2.1    [required by ppx_deriving]
  ∗ install ocaml-compiler-libs v0.12.4  [required by ppxlib]
  ∗ install csexp               1.5.1    [required by dune-configurator]
  ∗ install cppo                1.6.8    [required by ppx_deriving]
  ∗ install getopt              20120615
  ∗ install ppxlib              0.23.0   [required by ppx_deriving, ppx_sexp_conv]
  ∗ install dune-configurator   2.9.1    [required by cryptokit, zmq]
  ∗ install ppx_deriving        5.2.1
  ∗ install zmq                 5.1.3
  ∗ install cryptokit           1.16.1
  ∗ install base                v0.14.1  [required by ppx_sexp_conv]
  ∗ install ppx_sexp_conv       v0.14.3
  ∗ install parsexp             v0.14.1  [required by sexplib]
  ∗ install sexplib             v0.14.0
===== ∗ 28 =====

The following system packages will first need to be installed:
    gmp-devel zeromq-devel

<><> Handling external dependencies <><><><><><><><><><><><><><><><><><><><><><>
Let opam run your package manager to install the required system packages?
(answer 'n' for other options) [Y/n] n
[NOTE] Use 'opam option depext-run-installs=false' if you don't want to be prompted again.
These commands should get the requirements installed:

    yum install gmp-devel zeromq-devel
    rpm -q --whatprovides gmp-devel zeromq-devel

You can retry with '--assume-depexts' to skip this check, or run 'opam option depext=false' to permanently disable handling of system packages altogether.
++ exit 1

It seems that 2 packages are missing : gmp-devel and zeromq-devel.
I have no rights to install these package on the machine.

But I see that gmp is already install somehow:

matthias@cluster:~> ldconfig -p | grep gmp
	libgmpxx.so.4 (libc6,x86-64) => /lib64/libgmpxx.so.4
	libgmp.so.10 (libc6,x86-64) => /lib64/libgmp.so.10

I also saw that qp2/libs and qp2/include contains the files for gpm as well as for zeromq.

matthias@cluster:~/qp2> ls lib
libf77zmq.a   libgmp.a   libgmp.so     libgmp.so.10.3.2  libzmq.a   libzmq.so    libzmq.so.5.1.5  libz.so.1       pkgconfig
libf77zmq.so  libgmp.la  libgmp.so.10  libz.a            libzmq.la  libzmq.so.5  libz.so          libz.so.1.2.11
matthias@cluster:~/qp2> ls include
f77_zmq_free.h  gmp.h  sys  zconf.h  zlib.h  zmq.h  zmq_utils.h

Is there a way to specify to opam (ocaml package manager) to use these packages ? Would you happen to see something I missed during the installation ?

Thank you in advance for any help in this issue.

@scemama
Copy link
Member

scemama commented Oct 22, 2021 via email

@matthiasbe
Copy link
Author

Hello Anthony,

Thank you for your answer.

I deleted the whole folder and ran

git clone https://github.com/QuantumPackage/qp2.git
cd qp2
./configure
source quantum_package.rc
./configure --install=all

But got the same exact error at the installation of ocaml/opam, saying that the packages gmp-devel and zeromq-devel are missing.

I checked the environment and the lib and lib64 folder are in the LIBRARY_PATH and LD_LIBRARY_PATH. Moreover the include folder is in the C_INCLUDE_PATH and CPATH environment variables. Is it enough for opam to resolve the dependencies ?

@scemama
Copy link
Member

scemama commented Oct 25, 2021

Hi,
Yes, I agree with you. Setting LIBRARY_PATH and C_INCLUDE_PATH should be enough for opam to detect the installed libraries.

You can try to wipe out everything, log out and in again, and then clone the dev branch. We have improved the installation, and it could work better for you:

git clone https://github.com/QuantumPackage/qp2.git --branch=dev
cd qp2
./configure --install=all

Please let me know if it solves you problem. Good luck!

@matthiasbe
Copy link
Author

Hello Anthony,

I tried using the dev branch the installation of ocaml works fine now 👍

Thank you a lot for your help !

@scemama scemama closed this as completed Nov 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants