mmottl / gsl-ocaml

OCaml bindings to the GSL (GNU Scientific Library).
Other
36 stars 10 forks source link

opam installation incompatible with calmp4 #13

Closed sanette closed 7 years ago

sanette commented 7 years ago

Hi,

I am not able anymore to install gsl via opam due to a problem with finding camlp4. if camlp4 is not installed, opam install gsl ==> OK but opam install camlp4 opam install gsl==> ERROR

See errog log below.

thanks!

opam install camlp4
The following actions will be performed:
  ∗  install camlp4 4.02+system
=-=- Gathering sources =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[default] https://opam.ocaml.org/archives/camlp4.4.02+system+opam.tar.gz downloaded

=-=- Processing actions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
∗  installed camlp4.4.02+system
Done.
$ opam install gsl
The following actions will be performed:
  ∗  install gsl 1.19.1

=-=- Gathering sources =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[gsl] Archive in cache

=-=- Processing actions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[ERROR] The compilation of gsl failed at "ocaml setup.ml -configure --prefix /home/XXX/.opam/system
        --enable-camlp4".
Processing  1/1: [gsl: ocamlfind remove]
#=== ERROR while installing gsl.1.19.1 ========================================#
# opam-version 1.2.2
# os           linux
# command      ocaml setup.ml -configure --prefix /home/XXX/.opam/system --enable-camlp4
# path         /home/XXX/.opam/system/build/gsl.1.19.1
# compiler     system (4.02.3)
# exit-code    1
# env-file     /home/XXX/.opam/system/build/gsl.1.19.1/gsl-10062-6d07ae.env
# stdout-file  /home/XXX/.opam/system/build/gsl.1.19.1/gsl-10062-6d07ae.out
# stderr-file  /home/XXX/.opam/system/build/gsl.1.19.1/gsl-10062-6d07ae.err
### stderr ###
# W: Field 'pkg_camlp4' is not set: When looking for findlib package camlp4, directory /usr/lib/ocaml/camlp4 return doesn't exist
# E: Cannot find findlib package camlp4
# E: Failure("1 configuration error")
mmottl commented 7 years ago

I'm afraid, but I haven't been able to replicate the problem. I've tried with the 4.03.0 opam switch though. You may want to consider upgrading, maybe this will solve your problem. If not, the problem doesn't seem to be related to the GSL package. Maybe there is an issue with the findlib configuration on your platform. If you find out how to solve the problem and it's something that can be changed in the GSL distribution, please feel free to submit a pull request.

sanette commented 7 years ago

hi, thanks for the answer. I'm on a quasi-fresh install of Mint KDE 18 (ie ubuntu 16.04). In fact, after installing the ubuntu camlp4 package via 'apt-get install camlp4', then it works. Good. [But this is not supposed to work like this, right ? I thought opam camlp4 installation should be enough, and in fact I thought it was not a good practice to install ubuntu packages along the way.]

mmottl commented 7 years ago

opam camlp4 should do the job. Maybe findlib is configured or even installed differently on your platform, which is why it expected to find camlp4 in the system path rather than in your local opam installation. Anyway, I don't think this issue requires any changes to the GSL-library itself. Feel free to reopen the issue if necessary.